Handle the MTOFFL request to actually offline a tape rather than just
rewinding it. Tested with an Exabyte 8500 on a 5900/260 (the asc scsi driver).
This commit is contained in:
parent
56f0f92bef
commit
0676f7a9b7
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: scsi.h,v 1.8 1999/04/24 08:01:07 simonb Exp $ */
|
||||
/* $NetBSD: scsi.h,v 1.9 1999/08/31 01:12:51 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -98,6 +98,14 @@
|
|||
#define SCSI_SEND_DIAGNOSTIC 0x1d
|
||||
#define SCSI_PREVENT_ALLOW 0x1e
|
||||
|
||||
/*
|
||||
* Arguments to SCSI_LOAD_UNLOAD command. These are passed in byte
|
||||
* 5 (the blockCount) of a Group0 command block.
|
||||
*/
|
||||
#define SCSI_LD_UNLOAD 0x00
|
||||
#define SCSI_LD_LOAD 0x01
|
||||
#define SCSI_LD_RETENSION 0x02
|
||||
|
||||
/*
|
||||
* Group1 commands are all 10 bytes and have a format according to
|
||||
* struct ScsiGroup1Cmd.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tz.c,v 1.19 1999/04/24 08:01:08 simonb Exp $ */
|
||||
/* $NetBSD: tz.c,v 1.20 1999/08/31 01:12:52 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -785,7 +785,7 @@ tzioctl(dev, cmd, data, flag, p)
|
|||
int code, count;
|
||||
static int tzops[] = {
|
||||
SCSI_WRITE_EOF, SCSI_SPACE, SCSI_SPACE, SCSI_SPACE, SCSI_SPACE,
|
||||
SCSI_REWIND, SCSI_REWIND, SCSI_TEST_UNIT_READY
|
||||
SCSI_REWIND, SCSI_LOAD_UNLOAD, SCSI_TEST_UNIT_READY
|
||||
};
|
||||
|
||||
switch (cmd) {
|
||||
|
@ -822,12 +822,16 @@ tzioctl(dev, cmd, data, flag, p)
|
|||
break;
|
||||
|
||||
case MTREW:
|
||||
case MTOFFL:
|
||||
case MTNOP:
|
||||
code = 0;
|
||||
count = 0;
|
||||
break;
|
||||
|
||||
case MTOFFL:
|
||||
code = 0;
|
||||
count = SCSI_LD_UNLOAD;
|
||||
break;
|
||||
|
||||
default:
|
||||
return (EINVAL);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue