Subject: Re: CVS commit: syssrc/sys/dev/scsipi
To: Greg A. Woods; Planix, Inc. <woods@planix.com>
From: Matthew Jacob <mjacob@feral.com>
List: source-changes
Date: 03/21/2002 20:05:01
> [ On Friday, March 22, 2002 at 04:03:30 (+0200), Matthew Jacob wrote: ]
> > Subject: CVS commit: syssrc/sys/dev/scsipi
> >
> > 
> > + Change the prevent/allow ejection code so that if the device
> >   is close the tape can be ejected. This allows robots to eject
> >   the tape even if the tape isn't at BOT.
> 
> does this affect the way those devices which really should (must?) be
> rewound before eject will work (eg. many/most 8mm and 4mm helical scan
> devices), or do those devices usually DTRT?

Those devices DTRT. If they receive an eject, they do actually rewind first.

At any rate, the command to cause an eject is the "LOAD" command set up to
"UNLOAD". The SCSI-2 specification says:

(EOT bit is at offset 4, bit #3)

	An end-of-tape (EOT) bit of one indicates that an unload operation
	(load bit set to zero) shall position the medium at end-of-medium for
	removal from the device. An EOT bit of zero indicates that an unload
	operation shall position the meidum at beginning-of-medium for removal
	from the device.

Since we don't set the EOT bit, this implies that a rewind is implicit
for our usage of LOAD/UNLOAD.

-matt