Subject: Re: sdclose should stop unit.
To: None <KLEIPOOL_REINIER/HPITCB_85@belgium.hp.com>
From: Charles M. Hannum <mycroft@ai.mit.edu>
List: netbsd-bugs
Date: 01/22/1995 22:01:42
I have a few problems with this as suggested:

0) send-pr is supposed to send mail to `gnats-bugs', not
`netbsd-bugs'.  If you send it to the latter, it will *not* get put in
the database.  Had someone not reminded me, I would have forgotten
about this report.

1) My interpretation of the SCSI spec with regard to PREVENT/ALLOW and
START/STOP is:

   a) If I send an ALLOW and it's successful, then I *should* be able
   to remove the media.

   b) The *only* case where that shouldn't work is if the drive
   insists on being spun down first, in which case I should get an
   error from the ALLOW command, and in which case you've got the
   operations reversed.

   c) I'd guess that your drive simply doesn't grok PREVENT/ALLOW at
   all.

2) One could theorize (correctly) that the same thing should happen
for CD-ROM drives.  If this is the case, then the device must remain
open for the duration of an audio play command, or else we have to put
in a lot of code to track the audio state while the device is closed.
I'm not really willing to put in that code, so the existing CD player
programs would have to be changed.

3) It seems to me that the STOP command should be done a few seconds
after the device is closed.  Otherwise one could imagine a disk being
spun up and down several times when you reboot and run `fsck -p'.