mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
s390/tape: Rename tape_34xx.c to tape_3490.c
The driver now exclusively supports 3490 tape devices, given support for 3480 tape devices has been removed. Update the device driver name, its source file name, and change any occurrences of "34xx/34XX" to "3490" in the source code and comments. Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com> Reviewed-by: Jens Remus <jremus@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
This commit is contained in:
parent
13391069bd
commit
9872dae610
|
|
@ -121,7 +121,7 @@ config S390_TAPE
|
||||||
comment "S/390 tape hardware support"
|
comment "S/390 tape hardware support"
|
||||||
depends on S390_TAPE
|
depends on S390_TAPE
|
||||||
|
|
||||||
config S390_TAPE_34XX
|
config S390_TAPE_3490
|
||||||
def_tristate m
|
def_tristate m
|
||||||
prompt "Support for 3490 tape hardware"
|
prompt "Support for 3490 tape hardware"
|
||||||
depends on S390_TAPE
|
depends on S390_TAPE
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ obj-$(CONFIG_VMCP) += vmcp.o
|
||||||
tape-$(CONFIG_PROC_FS) += tape_proc.o
|
tape-$(CONFIG_PROC_FS) += tape_proc.o
|
||||||
tape-objs := tape_core.o tape_std.o tape_char.o $(tape-y)
|
tape-objs := tape_core.o tape_std.o tape_char.o $(tape-y)
|
||||||
obj-$(CONFIG_S390_TAPE) += tape.o tape_class.o
|
obj-$(CONFIG_S390_TAPE) += tape.o tape_class.o
|
||||||
obj-$(CONFIG_S390_TAPE_34XX) += tape_34xx.o
|
obj-$(CONFIG_S390_TAPE_3490) += tape_3490.o
|
||||||
obj-$(CONFIG_MONREADER) += monreader.o
|
obj-$(CONFIG_MONREADER) += monreader.o
|
||||||
obj-$(CONFIG_MONWRITER) += monwriter.o
|
obj-$(CONFIG_MONWRITER) += monwriter.o
|
||||||
obj-$(CONFIG_S390_VMUR) += vmur.o
|
obj-$(CONFIG_S390_VMUR) += vmur.o
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
* Martin Schwidefsky <schwidefsky@de.ibm.com>
|
* Martin Schwidefsky <schwidefsky@de.ibm.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define pr_fmt(fmt) "tape_34xx: " fmt
|
#define pr_fmt(fmt) "tape_3490: " fmt
|
||||||
|
|
||||||
#include <linux/export.h>
|
#include <linux/export.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
#include <linux/workqueue.h>
|
#include <linux/workqueue.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
|
||||||
#define TAPE_DBF_AREA tape_34xx_dbf
|
#define TAPE_DBF_AREA tape_3490_dbf
|
||||||
|
|
||||||
#include "tape.h"
|
#include "tape.h"
|
||||||
#include "tape_std.h"
|
#include "tape_std.h"
|
||||||
|
|
@ -28,16 +28,16 @@
|
||||||
debug_info_t *TAPE_DBF_AREA = NULL;
|
debug_info_t *TAPE_DBF_AREA = NULL;
|
||||||
EXPORT_SYMBOL(TAPE_DBF_AREA);
|
EXPORT_SYMBOL(TAPE_DBF_AREA);
|
||||||
|
|
||||||
struct tape_34xx_block_id {
|
struct tape_3490_block_id {
|
||||||
unsigned int unused : 10;
|
unsigned int unused : 10;
|
||||||
unsigned int block : 22;
|
unsigned int block : 22;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Medium sense for 34xx tapes. There is no 'real' medium sense call.
|
* Medium sense for 3490 tapes. There is no 'real' medium sense call.
|
||||||
* So we just do a normal sense.
|
* So we just do a normal sense.
|
||||||
*/
|
*/
|
||||||
static void __tape_34xx_medium_sense(struct tape_request *request)
|
static void __tape_3490_medium_sense(struct tape_request *request)
|
||||||
{
|
{
|
||||||
struct tape_device *device = request->device;
|
struct tape_device *device = request->device;
|
||||||
unsigned char *sense;
|
unsigned char *sense;
|
||||||
|
|
@ -61,12 +61,12 @@ static void __tape_34xx_medium_sense(struct tape_request *request)
|
||||||
else
|
else
|
||||||
device->tape_generic_status &= ~GMT_WR_PROT(~0);
|
device->tape_generic_status &= ~GMT_WR_PROT(~0);
|
||||||
} else
|
} else
|
||||||
DBF_EVENT(4, "tape_34xx: medium sense failed with rc=%d\n",
|
DBF_EVENT(4, "tape_3490: medium sense failed with rc=%d\n",
|
||||||
request->rc);
|
request->rc);
|
||||||
tape_free_request(request);
|
tape_free_request(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int tape_34xx_medium_sense(struct tape_device *device)
|
static int tape_3490_medium_sense(struct tape_device *device)
|
||||||
{
|
{
|
||||||
struct tape_request *request;
|
struct tape_request *request;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
@ -80,11 +80,11 @@ static int tape_34xx_medium_sense(struct tape_device *device)
|
||||||
request->op = TO_MSEN;
|
request->op = TO_MSEN;
|
||||||
tape_ccw_end(request->cpaddr, SENSE, 32, request->cpdata);
|
tape_ccw_end(request->cpaddr, SENSE, 32, request->cpdata);
|
||||||
rc = tape_do_io_interruptible(device, request);
|
rc = tape_do_io_interruptible(device, request);
|
||||||
__tape_34xx_medium_sense(request);
|
__tape_3490_medium_sense(request);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tape_34xx_medium_sense_async(struct tape_device *device)
|
static void tape_3490_medium_sense_async(struct tape_device *device)
|
||||||
{
|
{
|
||||||
struct tape_request *request;
|
struct tape_request *request;
|
||||||
|
|
||||||
|
|
@ -96,12 +96,12 @@ static void tape_34xx_medium_sense_async(struct tape_device *device)
|
||||||
|
|
||||||
request->op = TO_MSEN;
|
request->op = TO_MSEN;
|
||||||
tape_ccw_end(request->cpaddr, SENSE, 32, request->cpdata);
|
tape_ccw_end(request->cpaddr, SENSE, 32, request->cpdata);
|
||||||
request->callback = (void *) __tape_34xx_medium_sense;
|
request->callback = (void *) __tape_3490_medium_sense;
|
||||||
request->callback_data = NULL;
|
request->callback_data = NULL;
|
||||||
tape_do_io_async(device, request);
|
tape_do_io_async(device, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct tape_34xx_work {
|
struct tape_3490_work {
|
||||||
struct tape_device *device;
|
struct tape_device *device;
|
||||||
enum tape_op op;
|
enum tape_op op;
|
||||||
struct work_struct work;
|
struct work_struct work;
|
||||||
|
|
@ -118,32 +118,32 @@ struct tape_34xx_work {
|
||||||
* a deadlock can occur e.g. in case of a deferred cc=1 (see __tape_do_irq).
|
* a deadlock can occur e.g. in case of a deferred cc=1 (see __tape_do_irq).
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
tape_34xx_work_handler(struct work_struct *work)
|
tape_3490_work_handler(struct work_struct *work)
|
||||||
{
|
{
|
||||||
struct tape_34xx_work *p =
|
struct tape_3490_work *p =
|
||||||
container_of(work, struct tape_34xx_work, work);
|
container_of(work, struct tape_3490_work, work);
|
||||||
struct tape_device *device = p->device;
|
struct tape_device *device = p->device;
|
||||||
|
|
||||||
switch(p->op) {
|
switch(p->op) {
|
||||||
case TO_MSEN:
|
case TO_MSEN:
|
||||||
tape_34xx_medium_sense_async(device);
|
tape_3490_medium_sense_async(device);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
DBF_EVENT(3, "T34XX: internal error: unknown work\n");
|
DBF_EVENT(3, "T3490: internal error: unknown work\n");
|
||||||
}
|
}
|
||||||
tape_put_device(device);
|
tape_put_device(device);
|
||||||
kfree(p);
|
kfree(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
tape_34xx_schedule_work(struct tape_device *device, enum tape_op op)
|
tape_3490_schedule_work(struct tape_device *device, enum tape_op op)
|
||||||
{
|
{
|
||||||
struct tape_34xx_work *p;
|
struct tape_3490_work *p;
|
||||||
|
|
||||||
if ((p = kzalloc(sizeof(*p), GFP_ATOMIC)) == NULL)
|
if ((p = kzalloc(sizeof(*p), GFP_ATOMIC)) == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
INIT_WORK(&p->work, tape_34xx_work_handler);
|
INIT_WORK(&p->work, tape_3490_work_handler);
|
||||||
|
|
||||||
p->device = tape_get_device(device);
|
p->device = tape_get_device(device);
|
||||||
p->op = op;
|
p->op = op;
|
||||||
|
|
@ -156,14 +156,14 @@ tape_34xx_schedule_work(struct tape_device *device, enum tape_op op)
|
||||||
* Done Handler is called when dev stat = DEVICE-END (successful operation)
|
* Done Handler is called when dev stat = DEVICE-END (successful operation)
|
||||||
*/
|
*/
|
||||||
static inline int
|
static inline int
|
||||||
tape_34xx_done(struct tape_request *request)
|
tape_3490_done(struct tape_request *request)
|
||||||
{
|
{
|
||||||
DBF_EVENT(6, "%s done\n", tape_op_verbose[request->op]);
|
DBF_EVENT(6, "%s done\n", tape_op_verbose[request->op]);
|
||||||
return TAPE_IO_SUCCESS;
|
return TAPE_IO_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
tape_34xx_erp_failed(struct tape_request *request, int rc)
|
tape_3490_erp_failed(struct tape_request *request, int rc)
|
||||||
{
|
{
|
||||||
DBF_EVENT(3, "Error recovery failed for %s (RC=%d)\n",
|
DBF_EVENT(3, "Error recovery failed for %s (RC=%d)\n",
|
||||||
tape_op_verbose[request->op], rc);
|
tape_op_verbose[request->op], rc);
|
||||||
|
|
@ -171,15 +171,15 @@ tape_34xx_erp_failed(struct tape_request *request, int rc)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
tape_34xx_erp_succeeded(struct tape_request *request)
|
tape_3490_erp_succeeded(struct tape_request *request)
|
||||||
{
|
{
|
||||||
DBF_EVENT(3, "Error Recovery successful for %s\n",
|
DBF_EVENT(3, "Error Recovery successful for %s\n",
|
||||||
tape_op_verbose[request->op]);
|
tape_op_verbose[request->op]);
|
||||||
return tape_34xx_done(request);
|
return tape_3490_done(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
tape_34xx_erp_retry(struct tape_request *request)
|
tape_3490_erp_retry(struct tape_request *request)
|
||||||
{
|
{
|
||||||
DBF_EVENT(3, "xerp retr %s\n", tape_op_verbose[request->op]);
|
DBF_EVENT(3, "xerp retr %s\n", tape_op_verbose[request->op]);
|
||||||
return TAPE_IO_RETRY;
|
return TAPE_IO_RETRY;
|
||||||
|
|
@ -190,12 +190,12 @@ tape_34xx_erp_retry(struct tape_request *request)
|
||||||
* interrupt
|
* interrupt
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
tape_34xx_unsolicited_irq(struct tape_device *device, struct irb *irb)
|
tape_3490_unsolicited_irq(struct tape_device *device, struct irb *irb)
|
||||||
{
|
{
|
||||||
if (irb->scsw.cmd.dstat == 0x85) { /* READY */
|
if (irb->scsw.cmd.dstat == 0x85) { /* READY */
|
||||||
/* A medium was inserted in the drive. */
|
/* A medium was inserted in the drive. */
|
||||||
DBF_EVENT(6, "xuud med\n");
|
DBF_EVENT(6, "xuud med\n");
|
||||||
tape_34xx_schedule_work(device, TO_MSEN);
|
tape_3490_schedule_work(device, TO_MSEN);
|
||||||
} else {
|
} else {
|
||||||
DBF_EVENT(3, "unsol.irq! dev end: %08x\n", device->cdev_id);
|
DBF_EVENT(3, "unsol.irq! dev end: %08x\n", device->cdev_id);
|
||||||
tape_dump_sense_dbf(device, NULL, irb);
|
tape_dump_sense_dbf(device, NULL, irb);
|
||||||
|
|
@ -204,7 +204,7 @@ tape_34xx_unsolicited_irq(struct tape_device *device, struct irb *irb)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
tape_34xx_erp_bug(struct tape_device *device, struct tape_request *request,
|
tape_3490_erp_bug(struct tape_device *device, struct tape_request *request,
|
||||||
struct irb *irb, int no)
|
struct irb *irb, int no)
|
||||||
{
|
{
|
||||||
if (request->op != TO_ASSIGN) {
|
if (request->op != TO_ASSIGN) {
|
||||||
|
|
@ -212,7 +212,7 @@ tape_34xx_erp_bug(struct tape_device *device, struct tape_request *request,
|
||||||
"occurred in tape error recovery\n", no);
|
"occurred in tape error recovery\n", no);
|
||||||
tape_dump_sense_dbf(device, request, irb);
|
tape_dump_sense_dbf(device, request, irb);
|
||||||
}
|
}
|
||||||
return tape_34xx_erp_failed(request, -EIO);
|
return tape_3490_erp_failed(request, -EIO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -220,22 +220,22 @@ tape_34xx_erp_bug(struct tape_device *device, struct tape_request *request,
|
||||||
* be too slow.
|
* be too slow.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
tape_34xx_erp_overrun(struct tape_device *device, struct tape_request *request,
|
tape_3490_erp_overrun(struct tape_device *device, struct tape_request *request,
|
||||||
struct irb *irb)
|
struct irb *irb)
|
||||||
{
|
{
|
||||||
if (irb->ecw[3] == 0x40) {
|
if (irb->ecw[3] == 0x40) {
|
||||||
dev_warn (&device->cdev->dev, "A data overrun occurred between"
|
dev_warn (&device->cdev->dev, "A data overrun occurred between"
|
||||||
" the control unit and tape unit\n");
|
" the control unit and tape unit\n");
|
||||||
return tape_34xx_erp_failed(request, -EIO);
|
return tape_3490_erp_failed(request, -EIO);
|
||||||
}
|
}
|
||||||
return tape_34xx_erp_bug(device, request, irb, -1);
|
return tape_3490_erp_bug(device, request, irb, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Handle record sequence error.
|
* Handle record sequence error.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
tape_34xx_erp_sequence(struct tape_device *device,
|
tape_3490_erp_sequence(struct tape_device *device,
|
||||||
struct tape_request *request, struct irb *irb)
|
struct tape_request *request, struct irb *irb)
|
||||||
{
|
{
|
||||||
if (irb->ecw[3] == 0x41) {
|
if (irb->ecw[3] == 0x41) {
|
||||||
|
|
@ -244,13 +244,13 @@ tape_34xx_erp_sequence(struct tape_device *device,
|
||||||
*/
|
*/
|
||||||
dev_warn (&device->cdev->dev, "The block ID sequence on the "
|
dev_warn (&device->cdev->dev, "The block ID sequence on the "
|
||||||
"tape is incorrect\n");
|
"tape is incorrect\n");
|
||||||
return tape_34xx_erp_failed(request, -EIO);
|
return tape_3490_erp_failed(request, -EIO);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Record sequence error bit is set, but erpa does not
|
* Record sequence error bit is set, but erpa does not
|
||||||
* show record sequence error.
|
* show record sequence error.
|
||||||
*/
|
*/
|
||||||
return tape_34xx_erp_bug(device, request, irb, -2);
|
return tape_3490_erp_bug(device, request, irb, -2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -259,7 +259,7 @@ tape_34xx_erp_sequence(struct tape_device *device,
|
||||||
* informed about the problem.
|
* informed about the problem.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
|
tape_3490_unit_check(struct tape_device *device, struct tape_request *request,
|
||||||
struct irb *irb)
|
struct irb *irb)
|
||||||
{
|
{
|
||||||
int inhibit_cu_recovery;
|
int inhibit_cu_recovery;
|
||||||
|
|
@ -278,9 +278,9 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
|
||||||
request->op == TO_WTM
|
request->op == TO_WTM
|
||||||
) {
|
) {
|
||||||
/* medium is write protected */
|
/* medium is write protected */
|
||||||
return tape_34xx_erp_failed(request, -EACCES);
|
return tape_3490_erp_failed(request, -EACCES);
|
||||||
} else {
|
} else {
|
||||||
return tape_34xx_erp_bug(device, request, irb, -3);
|
return tape_3490_erp_bug(device, request, irb, -3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -315,9 +315,9 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
|
||||||
case TO_FSF:
|
case TO_FSF:
|
||||||
case TO_FSB:
|
case TO_FSB:
|
||||||
/* Trying to seek beyond end of recorded area */
|
/* Trying to seek beyond end of recorded area */
|
||||||
return tape_34xx_erp_failed(request, -ENOSPC);
|
return tape_3490_erp_failed(request, -ENOSPC);
|
||||||
case TO_BSB:
|
case TO_BSB:
|
||||||
return tape_34xx_erp_retry(request);
|
return tape_3490_erp_retry(request);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* sense[0] == SENSE_DATA_CHECK &&
|
* sense[0] == SENSE_DATA_CHECK &&
|
||||||
|
|
@ -326,11 +326,11 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
|
||||||
*/
|
*/
|
||||||
case TO_LBL:
|
case TO_LBL:
|
||||||
/* Block could not be located. */
|
/* Block could not be located. */
|
||||||
return tape_34xx_erp_failed(request, -EIO);
|
return tape_3490_erp_failed(request, -EIO);
|
||||||
|
|
||||||
case TO_RFO:
|
case TO_RFO:
|
||||||
/* Read beyond end of recorded area -> 0 bytes read */
|
/* Read beyond end of recorded area -> 0 bytes read */
|
||||||
return tape_34xx_erp_failed(request, 0);
|
return tape_3490_erp_failed(request, 0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* sense[0] == SENSE_EQUIPMENT_CHECK &&
|
* sense[0] == SENSE_EQUIPMENT_CHECK &&
|
||||||
|
|
@ -339,15 +339,15 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
|
||||||
*/
|
*/
|
||||||
case TO_WRI:
|
case TO_WRI:
|
||||||
/* Writing at physical end of volume */
|
/* Writing at physical end of volume */
|
||||||
return tape_34xx_erp_failed(request, -ENOSPC);
|
return tape_3490_erp_failed(request, -ENOSPC);
|
||||||
default:
|
default:
|
||||||
return tape_34xx_erp_failed(request, 0);
|
return tape_3490_erp_failed(request, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sensing special bits */
|
/* Sensing special bits */
|
||||||
if (sense[0] & SENSE_BUS_OUT_CHECK)
|
if (sense[0] & SENSE_BUS_OUT_CHECK)
|
||||||
return tape_34xx_erp_retry(request);
|
return tape_3490_erp_retry(request);
|
||||||
|
|
||||||
if (sense[0] & SENSE_DATA_CHECK) {
|
if (sense[0] & SENSE_DATA_CHECK) {
|
||||||
/*
|
/*
|
||||||
|
|
@ -362,13 +362,13 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
|
||||||
// data check is not permanent, may be
|
// data check is not permanent, may be
|
||||||
// recovered. We always use async-mode with
|
// recovered. We always use async-mode with
|
||||||
// cu-recovery, so this should *never* happen.
|
// cu-recovery, so this should *never* happen.
|
||||||
return tape_34xx_erp_bug(device, request,
|
return tape_3490_erp_bug(device, request,
|
||||||
irb, -4);
|
irb, -4);
|
||||||
|
|
||||||
/* data check is permanent, CU recovery has failed */
|
/* data check is permanent, CU recovery has failed */
|
||||||
dev_warn (&device->cdev->dev, "A read error occurred "
|
dev_warn (&device->cdev->dev, "A read error occurred "
|
||||||
"that cannot be recovered\n");
|
"that cannot be recovered\n");
|
||||||
return tape_34xx_erp_failed(request, -EIO);
|
return tape_3490_erp_failed(request, -EIO);
|
||||||
case 0x25:
|
case 0x25:
|
||||||
// a write data check occurred
|
// a write data check occurred
|
||||||
if ((sense[2] & SENSE_TAPE_SYNC_MODE) ||
|
if ((sense[2] & SENSE_TAPE_SYNC_MODE) ||
|
||||||
|
|
@ -376,36 +376,36 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
|
||||||
// data check is not permanent, may be
|
// data check is not permanent, may be
|
||||||
// recovered. We always use async-mode with
|
// recovered. We always use async-mode with
|
||||||
// cu-recovery, so this should *never* happen.
|
// cu-recovery, so this should *never* happen.
|
||||||
return tape_34xx_erp_bug(device, request,
|
return tape_3490_erp_bug(device, request,
|
||||||
irb, -5);
|
irb, -5);
|
||||||
|
|
||||||
// data check is permanent, cu-recovery has failed
|
// data check is permanent, cu-recovery has failed
|
||||||
dev_warn (&device->cdev->dev, "A write error on the "
|
dev_warn (&device->cdev->dev, "A write error on the "
|
||||||
"tape cannot be recovered\n");
|
"tape cannot be recovered\n");
|
||||||
return tape_34xx_erp_failed(request, -EIO);
|
return tape_3490_erp_failed(request, -EIO);
|
||||||
case 0x28:
|
case 0x28:
|
||||||
/* ID-Mark at tape start couldn't be written */
|
/* ID-Mark at tape start couldn't be written */
|
||||||
dev_warn (&device->cdev->dev, "Writing the ID-mark "
|
dev_warn (&device->cdev->dev, "Writing the ID-mark "
|
||||||
"failed\n");
|
"failed\n");
|
||||||
return tape_34xx_erp_failed(request, -EIO);
|
return tape_3490_erp_failed(request, -EIO);
|
||||||
case 0x31:
|
case 0x31:
|
||||||
/* Tape void. Tried to read beyond end of device. */
|
/* Tape void. Tried to read beyond end of device. */
|
||||||
dev_warn (&device->cdev->dev, "Reading the tape beyond"
|
dev_warn (&device->cdev->dev, "Reading the tape beyond"
|
||||||
" the end of the recorded area failed\n");
|
" the end of the recorded area failed\n");
|
||||||
return tape_34xx_erp_failed(request, -ENOSPC);
|
return tape_3490_erp_failed(request, -ENOSPC);
|
||||||
case 0x41:
|
case 0x41:
|
||||||
/* Record sequence error. */
|
/* Record sequence error. */
|
||||||
dev_warn (&device->cdev->dev, "The tape contains an "
|
dev_warn (&device->cdev->dev, "The tape contains an "
|
||||||
"incorrect block ID sequence\n");
|
"incorrect block ID sequence\n");
|
||||||
return tape_34xx_erp_failed(request, -EIO);
|
return tape_3490_erp_failed(request, -EIO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sense[0] & SENSE_OVERRUN)
|
if (sense[0] & SENSE_OVERRUN)
|
||||||
return tape_34xx_erp_overrun(device, request, irb);
|
return tape_3490_erp_overrun(device, request, irb);
|
||||||
|
|
||||||
if (sense[1] & SENSE_RECORD_SEQUENCE_ERR)
|
if (sense[1] & SENSE_RECORD_SEQUENCE_ERR)
|
||||||
return tape_34xx_erp_sequence(device, request, irb);
|
return tape_3490_erp_sequence(device, request, irb);
|
||||||
|
|
||||||
/* Sensing erpa codes */
|
/* Sensing erpa codes */
|
||||||
switch (sense[3]) {
|
switch (sense[3]) {
|
||||||
|
|
@ -419,14 +419,14 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
|
||||||
* issued by this driver and ought be correct, we assume a
|
* issued by this driver and ought be correct, we assume a
|
||||||
* over/underrun situation and retry the channel program.
|
* over/underrun situation and retry the channel program.
|
||||||
*/
|
*/
|
||||||
return tape_34xx_erp_retry(request);
|
return tape_3490_erp_retry(request);
|
||||||
case 0x29:
|
case 0x29:
|
||||||
/*
|
/*
|
||||||
* Function incompatible. Either the tape is idrc compressed
|
* Function incompatible. Either the tape is idrc compressed
|
||||||
* but the hardware isn't capable to do idrc, or a perform
|
* but the hardware isn't capable to do idrc, or a perform
|
||||||
* subsystem func is issued and the CU is not on-line.
|
* subsystem func is issued and the CU is not on-line.
|
||||||
*/
|
*/
|
||||||
return tape_34xx_erp_failed(request, -EIO);
|
return tape_3490_erp_failed(request, -EIO);
|
||||||
case 0x2b:
|
case 0x2b:
|
||||||
/*
|
/*
|
||||||
* Environmental data present. Indicates either unload
|
* Environmental data present. Indicates either unload
|
||||||
|
|
@ -435,22 +435,22 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
|
||||||
if (request->op == TO_RUN) {
|
if (request->op == TO_RUN) {
|
||||||
/* Rewind unload completed ok. */
|
/* Rewind unload completed ok. */
|
||||||
tape_med_state_set(device, MS_UNLOADED);
|
tape_med_state_set(device, MS_UNLOADED);
|
||||||
return tape_34xx_erp_succeeded(request);
|
return tape_3490_erp_succeeded(request);
|
||||||
}
|
}
|
||||||
/* tape_34xx doesn't use read buffered log commands. */
|
/* tape_3490 doesn't use read buffered log commands. */
|
||||||
return tape_34xx_erp_bug(device, request, irb, sense[3]);
|
return tape_3490_erp_bug(device, request, irb, sense[3]);
|
||||||
case 0x2c:
|
case 0x2c:
|
||||||
/*
|
/*
|
||||||
* Permanent equipment check. CU has tried recovery, but
|
* Permanent equipment check. CU has tried recovery, but
|
||||||
* did not succeed.
|
* did not succeed.
|
||||||
*/
|
*/
|
||||||
return tape_34xx_erp_failed(request, -EIO);
|
return tape_3490_erp_failed(request, -EIO);
|
||||||
case 0x2d:
|
case 0x2d:
|
||||||
/* Data security erase failure. */
|
/* Data security erase failure. */
|
||||||
if (request->op == TO_DSE)
|
if (request->op == TO_DSE)
|
||||||
return tape_34xx_erp_failed(request, -EIO);
|
return tape_3490_erp_failed(request, -EIO);
|
||||||
/* Data security erase failure, but no such command issued. */
|
/* Data security erase failure, but no such command issued. */
|
||||||
return tape_34xx_erp_bug(device, request, irb, sense[3]);
|
return tape_3490_erp_bug(device, request, irb, sense[3]);
|
||||||
case 0x2e:
|
case 0x2e:
|
||||||
/*
|
/*
|
||||||
* Not capable. This indicates either that the drive fails
|
* Not capable. This indicates either that the drive fails
|
||||||
|
|
@ -459,12 +459,12 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
|
||||||
*/
|
*/
|
||||||
dev_warn (&device->cdev->dev, "The tape unit cannot process "
|
dev_warn (&device->cdev->dev, "The tape unit cannot process "
|
||||||
"the tape format\n");
|
"the tape format\n");
|
||||||
return tape_34xx_erp_failed(request, -EMEDIUMTYPE);
|
return tape_3490_erp_failed(request, -EMEDIUMTYPE);
|
||||||
case 0x30:
|
case 0x30:
|
||||||
/* The medium is write protected. */
|
/* The medium is write protected. */
|
||||||
dev_warn (&device->cdev->dev, "The tape medium is write-"
|
dev_warn (&device->cdev->dev, "The tape medium is write-"
|
||||||
"protected\n");
|
"protected\n");
|
||||||
return tape_34xx_erp_failed(request, -EACCES);
|
return tape_3490_erp_failed(request, -EACCES);
|
||||||
case 0x35:
|
case 0x35:
|
||||||
/*
|
/*
|
||||||
* Drive equipment check. One of the following:
|
* Drive equipment check. One of the following:
|
||||||
|
|
@ -475,10 +475,10 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
|
||||||
*/
|
*/
|
||||||
dev_warn (&device->cdev->dev, "An equipment check has occurred"
|
dev_warn (&device->cdev->dev, "An equipment check has occurred"
|
||||||
" on the tape unit\n");
|
" on the tape unit\n");
|
||||||
return tape_34xx_erp_failed(request, -EIO);
|
return tape_3490_erp_failed(request, -EIO);
|
||||||
case 0x36:
|
case 0x36:
|
||||||
/* End of data. */
|
/* End of data. */
|
||||||
return tape_34xx_erp_failed(request, -EIO);
|
return tape_3490_erp_failed(request, -EIO);
|
||||||
case 0x38:
|
case 0x38:
|
||||||
/*
|
/*
|
||||||
* Physical end of tape. A read/write operation reached
|
* Physical end of tape. A read/write operation reached
|
||||||
|
|
@ -487,11 +487,11 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
|
||||||
if (request->op==TO_WRI ||
|
if (request->op==TO_WRI ||
|
||||||
request->op==TO_DSE ||
|
request->op==TO_DSE ||
|
||||||
request->op==TO_WTM)
|
request->op==TO_WTM)
|
||||||
return tape_34xx_erp_failed(request, -ENOSPC);
|
return tape_3490_erp_failed(request, -ENOSPC);
|
||||||
return tape_34xx_erp_failed(request, -EIO);
|
return tape_3490_erp_failed(request, -EIO);
|
||||||
case 0x39:
|
case 0x39:
|
||||||
/* Backward at Beginning of tape. */
|
/* Backward at Beginning of tape. */
|
||||||
return tape_34xx_erp_failed(request, -EIO);
|
return tape_3490_erp_failed(request, -EIO);
|
||||||
case 0x42:
|
case 0x42:
|
||||||
/*
|
/*
|
||||||
* Degraded mode. A condition that can cause degraded
|
* Degraded mode. A condition that can cause degraded
|
||||||
|
|
@ -499,7 +499,7 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
|
||||||
*/
|
*/
|
||||||
dev_warn (&device->cdev->dev, "The tape subsystem is running "
|
dev_warn (&device->cdev->dev, "The tape subsystem is running "
|
||||||
"in degraded mode\n");
|
"in degraded mode\n");
|
||||||
return tape_34xx_erp_retry(request);
|
return tape_3490_erp_retry(request);
|
||||||
case 0x43:
|
case 0x43:
|
||||||
/* Drive not ready. */
|
/* Drive not ready. */
|
||||||
tape_med_state_set(device, MS_UNLOADED);
|
tape_med_state_set(device, MS_UNLOADED);
|
||||||
|
|
@ -510,40 +510,40 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
|
||||||
case TO_UNASSIGN:
|
case TO_UNASSIGN:
|
||||||
case TO_DIS:
|
case TO_DIS:
|
||||||
case TO_NOP:
|
case TO_NOP:
|
||||||
return tape_34xx_done(request);
|
return tape_3490_done(request);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tape_34xx_erp_failed(request, -ENOMEDIUM);
|
return tape_3490_erp_failed(request, -ENOMEDIUM);
|
||||||
case 0x44:
|
case 0x44:
|
||||||
/* Locate Block unsuccessful. */
|
/* Locate Block unsuccessful. */
|
||||||
if (request->op != TO_BLOCK && request->op != TO_LBL)
|
if (request->op != TO_BLOCK && request->op != TO_LBL)
|
||||||
/* No locate block was issued. */
|
/* No locate block was issued. */
|
||||||
return tape_34xx_erp_bug(device, request,
|
return tape_3490_erp_bug(device, request,
|
||||||
irb, sense[3]);
|
irb, sense[3]);
|
||||||
return tape_34xx_erp_failed(request, -EIO);
|
return tape_3490_erp_failed(request, -EIO);
|
||||||
case 0x45:
|
case 0x45:
|
||||||
/* The drive is assigned to a different channel path. */
|
/* The drive is assigned to a different channel path. */
|
||||||
dev_warn (&device->cdev->dev, "The tape unit is already "
|
dev_warn (&device->cdev->dev, "The tape unit is already "
|
||||||
"assigned\n");
|
"assigned\n");
|
||||||
return tape_34xx_erp_failed(request, -EIO);
|
return tape_3490_erp_failed(request, -EIO);
|
||||||
case 0x47:
|
case 0x47:
|
||||||
/* Volume fenced. CU reports volume integrity is lost. */
|
/* Volume fenced. CU reports volume integrity is lost. */
|
||||||
dev_warn (&device->cdev->dev, "The control unit has fenced "
|
dev_warn (&device->cdev->dev, "The control unit has fenced "
|
||||||
"access to the tape volume\n");
|
"access to the tape volume\n");
|
||||||
return tape_34xx_erp_failed(request, -EIO);
|
return tape_3490_erp_failed(request, -EIO);
|
||||||
case 0x48:
|
case 0x48:
|
||||||
/* Log sense data and retry request. */
|
/* Log sense data and retry request. */
|
||||||
return tape_34xx_erp_retry(request);
|
return tape_3490_erp_retry(request);
|
||||||
case 0x4d:
|
case 0x4d:
|
||||||
/*
|
/*
|
||||||
* Resetting event received. Since the driver does
|
* Resetting event received. Since the driver does
|
||||||
* not support resetting event recovery (which has to
|
* not support resetting event recovery (which has to
|
||||||
* be handled by the I/O Layer), retry our command.
|
* be handled by the I/O Layer), retry our command.
|
||||||
*/
|
*/
|
||||||
return tape_34xx_erp_retry(request);
|
return tape_3490_erp_retry(request);
|
||||||
case 0x4e:
|
case 0x4e:
|
||||||
/*
|
/*
|
||||||
* Maximum block size exceeded. This indicates, that
|
* Maximum block size exceeded. This indicates, that
|
||||||
|
|
@ -552,7 +552,7 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
|
||||||
*/
|
*/
|
||||||
dev_warn (&device->cdev->dev,
|
dev_warn (&device->cdev->dev,
|
||||||
"The maximum block size for buffered mode is exceeded\n");
|
"The maximum block size for buffered mode is exceeded\n");
|
||||||
return tape_34xx_erp_failed(request, -ENOBUFS);
|
return tape_3490_erp_failed(request, -ENOBUFS);
|
||||||
case 0x50:
|
case 0x50:
|
||||||
/*
|
/*
|
||||||
* Read buffered log (Overflow). CU is running in extended
|
* Read buffered log (Overflow). CU is running in extended
|
||||||
|
|
@ -560,7 +560,7 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
|
||||||
* never happen, since we're never running in extended
|
* never happen, since we're never running in extended
|
||||||
* buffered log mode.
|
* buffered log mode.
|
||||||
*/
|
*/
|
||||||
return tape_34xx_erp_retry(request);
|
return tape_3490_erp_retry(request);
|
||||||
case 0x51:
|
case 0x51:
|
||||||
/*
|
/*
|
||||||
* Read buffered log (EOV). EOF processing occurs while the
|
* Read buffered log (EOV). EOF processing occurs while the
|
||||||
|
|
@ -568,33 +568,33 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
|
||||||
* happen, since we're never running in extended buffered
|
* happen, since we're never running in extended buffered
|
||||||
* log mode.
|
* log mode.
|
||||||
*/
|
*/
|
||||||
return tape_34xx_erp_retry(request);
|
return tape_3490_erp_retry(request);
|
||||||
case 0x52:
|
case 0x52:
|
||||||
/* End of Volume complete. Rewind unload completed ok. */
|
/* End of Volume complete. Rewind unload completed ok. */
|
||||||
if (request->op == TO_RUN) {
|
if (request->op == TO_RUN) {
|
||||||
tape_med_state_set(device, MS_UNLOADED);
|
tape_med_state_set(device, MS_UNLOADED);
|
||||||
return tape_34xx_erp_succeeded(request);
|
return tape_3490_erp_succeeded(request);
|
||||||
}
|
}
|
||||||
return tape_34xx_erp_bug(device, request, irb, sense[3]);
|
return tape_3490_erp_bug(device, request, irb, sense[3]);
|
||||||
case 0x53:
|
case 0x53:
|
||||||
/* Global command intercept. */
|
/* Global command intercept. */
|
||||||
return tape_34xx_erp_retry(request);
|
return tape_3490_erp_retry(request);
|
||||||
case 0x54:
|
case 0x54:
|
||||||
/* Channel interface recovery (temporary). */
|
/* Channel interface recovery (temporary). */
|
||||||
return tape_34xx_erp_retry(request);
|
return tape_3490_erp_retry(request);
|
||||||
case 0x55:
|
case 0x55:
|
||||||
/* Channel interface recovery (permanent). */
|
/* Channel interface recovery (permanent). */
|
||||||
dev_warn (&device->cdev->dev, "A channel interface error cannot be"
|
dev_warn (&device->cdev->dev, "A channel interface error cannot be"
|
||||||
" recovered\n");
|
" recovered\n");
|
||||||
return tape_34xx_erp_failed(request, -EIO);
|
return tape_3490_erp_failed(request, -EIO);
|
||||||
case 0x56:
|
case 0x56:
|
||||||
/* Channel protocol error. */
|
/* Channel protocol error. */
|
||||||
dev_warn (&device->cdev->dev, "A channel protocol error "
|
dev_warn (&device->cdev->dev, "A channel protocol error "
|
||||||
"occurred\n");
|
"occurred\n");
|
||||||
return tape_34xx_erp_failed(request, -EIO);
|
return tape_3490_erp_failed(request, -EIO);
|
||||||
case 0x57:
|
case 0x57:
|
||||||
/* Global status intercept. */
|
/* Global status intercept. */
|
||||||
return tape_34xx_erp_retry(request);
|
return tape_3490_erp_retry(request);
|
||||||
/* The following erpas should have been covered earlier. */
|
/* The following erpas should have been covered earlier. */
|
||||||
case 0x23: /* Read data check. */
|
case 0x23: /* Read data check. */
|
||||||
case 0x25: /* Write data check. */
|
case 0x25: /* Write data check. */
|
||||||
|
|
@ -604,7 +604,7 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
|
||||||
case 0x41: /* Record sequence error. */
|
case 0x41: /* Record sequence error. */
|
||||||
/* All other erpas are reserved for future use. */
|
/* All other erpas are reserved for future use. */
|
||||||
default:
|
default:
|
||||||
return tape_34xx_erp_bug(device, request, irb, sense[3]);
|
return tape_3490_erp_bug(device, request, irb, sense[3]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -612,21 +612,21 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
|
||||||
* 3490 interrupt handler
|
* 3490 interrupt handler
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
tape_34xx_irq(struct tape_device *device, struct tape_request *request,
|
tape_3490_irq(struct tape_device *device, struct tape_request *request,
|
||||||
struct irb *irb)
|
struct irb *irb)
|
||||||
{
|
{
|
||||||
if (request == NULL)
|
if (request == NULL)
|
||||||
return tape_34xx_unsolicited_irq(device, irb);
|
return tape_3490_unsolicited_irq(device, irb);
|
||||||
|
|
||||||
if ((irb->scsw.cmd.dstat & DEV_STAT_UNIT_EXCEP) &&
|
if ((irb->scsw.cmd.dstat & DEV_STAT_UNIT_EXCEP) &&
|
||||||
(irb->scsw.cmd.dstat & DEV_STAT_DEV_END) &&
|
(irb->scsw.cmd.dstat & DEV_STAT_DEV_END) &&
|
||||||
(request->op == TO_WRI)) {
|
(request->op == TO_WRI)) {
|
||||||
/* Write at end of volume */
|
/* Write at end of volume */
|
||||||
return tape_34xx_erp_failed(request, -ENOSPC);
|
return tape_3490_erp_failed(request, -ENOSPC);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (irb->scsw.cmd.dstat & DEV_STAT_UNIT_CHECK)
|
if (irb->scsw.cmd.dstat & DEV_STAT_UNIT_CHECK)
|
||||||
return tape_34xx_unit_check(device, request, irb);
|
return tape_3490_unit_check(device, request, irb);
|
||||||
|
|
||||||
if (irb->scsw.cmd.dstat & DEV_STAT_DEV_END) {
|
if (irb->scsw.cmd.dstat & DEV_STAT_DEV_END) {
|
||||||
/*
|
/*
|
||||||
|
|
@ -638,7 +638,7 @@ tape_34xx_irq(struct tape_device *device, struct tape_request *request,
|
||||||
else
|
else
|
||||||
DBF_EVENT(5, "Unit Exception!\n");
|
DBF_EVENT(5, "Unit Exception!\n");
|
||||||
}
|
}
|
||||||
return tape_34xx_done(request);
|
return tape_3490_done(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
DBF_EVENT(6, "xunknownirq\n");
|
DBF_EVENT(6, "xunknownirq\n");
|
||||||
|
|
@ -647,21 +647,21 @@ tape_34xx_irq(struct tape_device *device, struct tape_request *request,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
tape_34xx_setup_device(struct tape_device * device)
|
tape_3490_setup_device(struct tape_device * device)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
DBF_EVENT(6, "34xx device setup\n");
|
DBF_EVENT(6, "3490 device setup\n");
|
||||||
if ((rc = tape_std_assign(device)) == 0) {
|
if ((rc = tape_std_assign(device)) == 0) {
|
||||||
if ((rc = tape_34xx_medium_sense(device)) != 0) {
|
if ((rc = tape_3490_medium_sense(device)) != 0) {
|
||||||
DBF_LH(3, "34xx medium sense returned %d\n", rc);
|
DBF_LH(3, "3490 medium sense returned %d\n", rc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tape_34xx_cleanup_device(struct tape_device *device)
|
tape_3490_cleanup_device(struct tape_device *device)
|
||||||
{
|
{
|
||||||
tape_std_unassign(device);
|
tape_std_unassign(device);
|
||||||
}
|
}
|
||||||
|
|
@ -671,11 +671,11 @@ tape_34xx_cleanup_device(struct tape_device *device)
|
||||||
* MTTELL: Tell block. Return the number of block relative to current file.
|
* MTTELL: Tell block. Return the number of block relative to current file.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
tape_34xx_mttell(struct tape_device *device, int mt_count)
|
tape_3490_mttell(struct tape_device *device, int mt_count)
|
||||||
{
|
{
|
||||||
struct {
|
struct {
|
||||||
struct tape_34xx_block_id cbid;
|
struct tape_3490_block_id cbid;
|
||||||
struct tape_34xx_block_id dbid;
|
struct tape_3490_block_id dbid;
|
||||||
} __attribute__ ((packed)) block_id;
|
} __attribute__ ((packed)) block_id;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
|
@ -690,10 +690,10 @@ tape_34xx_mttell(struct tape_device *device, int mt_count)
|
||||||
* MTSEEK: seek to the specified block.
|
* MTSEEK: seek to the specified block.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
tape_34xx_mtseek(struct tape_device *device, int mt_count)
|
tape_3490_mtseek(struct tape_device *device, int mt_count)
|
||||||
{
|
{
|
||||||
struct tape_request *request;
|
struct tape_request *request;
|
||||||
struct tape_34xx_block_id * bid;
|
struct tape_3490_block_id * bid;
|
||||||
|
|
||||||
if (mt_count > 0x3fffff) {
|
if (mt_count > 0x3fffff) {
|
||||||
DBF_EXCEPTION(6, "xsee parm\n");
|
DBF_EXCEPTION(6, "xsee parm\n");
|
||||||
|
|
@ -705,7 +705,7 @@ tape_34xx_mtseek(struct tape_device *device, int mt_count)
|
||||||
|
|
||||||
/* setup ccws */
|
/* setup ccws */
|
||||||
request->op = TO_LBL;
|
request->op = TO_LBL;
|
||||||
bid = (struct tape_34xx_block_id *) request->cpdata;
|
bid = (struct tape_3490_block_id *) request->cpdata;
|
||||||
bid->block = mt_count;
|
bid->block = mt_count;
|
||||||
|
|
||||||
tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte);
|
tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte);
|
||||||
|
|
@ -719,7 +719,7 @@ tape_34xx_mtseek(struct tape_device *device, int mt_count)
|
||||||
/*
|
/*
|
||||||
* List of 3490 tape commands.
|
* List of 3490 tape commands.
|
||||||
*/
|
*/
|
||||||
static tape_mtop_fn tape_34xx_mtop[TAPE_NR_MTOPS] = {
|
static tape_mtop_fn tape_3490_mtop[TAPE_NR_MTOPS] = {
|
||||||
[MTRESET] = tape_std_mtreset,
|
[MTRESET] = tape_std_mtreset,
|
||||||
[MTFSF] = tape_std_mtfsf,
|
[MTFSF] = tape_std_mtfsf,
|
||||||
[MTBSF] = tape_std_mtbsf,
|
[MTBSF] = tape_std_mtbsf,
|
||||||
|
|
@ -739,8 +739,8 @@ static tape_mtop_fn tape_34xx_mtop[TAPE_NR_MTOPS] = {
|
||||||
[MTRAS3] = NULL,
|
[MTRAS3] = NULL,
|
||||||
[MTSETBLK] = tape_std_mtsetblk,
|
[MTSETBLK] = tape_std_mtsetblk,
|
||||||
[MTSETDENSITY] = NULL,
|
[MTSETDENSITY] = NULL,
|
||||||
[MTSEEK] = tape_34xx_mtseek,
|
[MTSEEK] = tape_3490_mtseek,
|
||||||
[MTTELL] = tape_34xx_mttell,
|
[MTTELL] = tape_3490_mttell,
|
||||||
[MTSETDRVBUFFER] = NULL,
|
[MTSETDRVBUFFER] = NULL,
|
||||||
[MTFSS] = NULL,
|
[MTFSS] = NULL,
|
||||||
[MTBSS] = NULL,
|
[MTBSS] = NULL,
|
||||||
|
|
@ -757,77 +757,77 @@ static tape_mtop_fn tape_34xx_mtop[TAPE_NR_MTOPS] = {
|
||||||
/*
|
/*
|
||||||
* Tape discipline structure for 3490.
|
* Tape discipline structure for 3490.
|
||||||
*/
|
*/
|
||||||
static struct tape_discipline tape_discipline_34xx = {
|
static struct tape_discipline tape_discipline_3490 = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.setup_device = tape_34xx_setup_device,
|
.setup_device = tape_3490_setup_device,
|
||||||
.cleanup_device = tape_34xx_cleanup_device,
|
.cleanup_device = tape_3490_cleanup_device,
|
||||||
.process_eov = tape_std_process_eov,
|
.process_eov = tape_std_process_eov,
|
||||||
.irq = tape_34xx_irq,
|
.irq = tape_3490_irq,
|
||||||
.read_block = tape_std_read_block,
|
.read_block = tape_std_read_block,
|
||||||
.write_block = tape_std_write_block,
|
.write_block = tape_std_write_block,
|
||||||
.mtop_array = tape_34xx_mtop
|
.mtop_array = tape_3490_mtop
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ccw_device_id tape_34xx_ids[] = {
|
static struct ccw_device_id tape_3490_ids[] = {
|
||||||
{ CCW_DEVICE_DEVTYPE(0x3490, 0, 0x3490, 0), .driver_info = tape_3490},
|
{ CCW_DEVICE_DEVTYPE(0x3490, 0, 0x3490, 0), .driver_info = tape_3490},
|
||||||
{ /* end of list */ },
|
{ /* end of list */ },
|
||||||
};
|
};
|
||||||
|
|
||||||
static int
|
static int
|
||||||
tape_34xx_online(struct ccw_device *cdev)
|
tape_3490_online(struct ccw_device *cdev)
|
||||||
{
|
{
|
||||||
return tape_generic_online(
|
return tape_generic_online(
|
||||||
dev_get_drvdata(&cdev->dev),
|
dev_get_drvdata(&cdev->dev),
|
||||||
&tape_discipline_34xx
|
&tape_discipline_3490
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct ccw_driver tape_34xx_driver = {
|
static struct ccw_driver tape_3490_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "tape_34xx",
|
.name = "tape_3490",
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
},
|
},
|
||||||
.ids = tape_34xx_ids,
|
.ids = tape_3490_ids,
|
||||||
.probe = tape_generic_probe,
|
.probe = tape_generic_probe,
|
||||||
.remove = tape_generic_remove,
|
.remove = tape_generic_remove,
|
||||||
.set_online = tape_34xx_online,
|
.set_online = tape_3490_online,
|
||||||
.set_offline = tape_generic_offline,
|
.set_offline = tape_generic_offline,
|
||||||
.int_class = IRQIO_TAP,
|
.int_class = IRQIO_TAP,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int
|
static int
|
||||||
tape_34xx_init (void)
|
tape_3490_init (void)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
TAPE_DBF_AREA = debug_register ( "tape_34xx", 2, 2, 4*sizeof(long));
|
TAPE_DBF_AREA = debug_register ( "tape_3490", 2, 2, 4*sizeof(long));
|
||||||
debug_register_view(TAPE_DBF_AREA, &debug_sprintf_view);
|
debug_register_view(TAPE_DBF_AREA, &debug_sprintf_view);
|
||||||
#ifdef DBF_LIKE_HELL
|
#ifdef DBF_LIKE_HELL
|
||||||
debug_set_level(TAPE_DBF_AREA, 6);
|
debug_set_level(TAPE_DBF_AREA, 6);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DBF_EVENT(3, "34xx init\n");
|
DBF_EVENT(3, "3490 init\n");
|
||||||
/* Register driver for 3490 tapes. */
|
/* Register driver for 3490 tapes. */
|
||||||
rc = ccw_driver_register(&tape_34xx_driver);
|
rc = ccw_driver_register(&tape_3490_driver);
|
||||||
if (rc)
|
if (rc)
|
||||||
DBF_EVENT(3, "34xx init failed\n");
|
DBF_EVENT(3, "3490 init failed\n");
|
||||||
else
|
else
|
||||||
DBF_EVENT(3, "34xx registered\n");
|
DBF_EVENT(3, "3490 registered\n");
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tape_34xx_exit(void)
|
tape_3490_exit(void)
|
||||||
{
|
{
|
||||||
ccw_driver_unregister(&tape_34xx_driver);
|
ccw_driver_unregister(&tape_3490_driver);
|
||||||
|
|
||||||
debug_unregister(TAPE_DBF_AREA);
|
debug_unregister(TAPE_DBF_AREA);
|
||||||
}
|
}
|
||||||
|
|
||||||
MODULE_DEVICE_TABLE(ccw, tape_34xx_ids);
|
MODULE_DEVICE_TABLE(ccw, tape_3490_ids);
|
||||||
MODULE_AUTHOR("(C) 2001-2002 IBM Deutschland Entwicklung GmbH");
|
MODULE_AUTHOR("(C) 2001-2002 IBM Deutschland Entwicklung GmbH");
|
||||||
MODULE_DESCRIPTION("Linux on zSeries channel attached 3490 tape device driver");
|
MODULE_DESCRIPTION("Linux on zSeries channel attached 3490 tape device driver");
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
|
||||||
module_init(tape_34xx_init);
|
module_init(tape_3490_init);
|
||||||
module_exit(tape_34xx_exit);
|
module_exit(tape_3490_exit);
|
||||||
Loading…
Reference in New Issue
Block a user