On Sat, 6 Mar 1999, Michael Vogt wrote:
> Dear scsi-developers,
>
> while trying out devfs-93 (kernel 2.2.2) I got lots of annoying errors (READ
> CAPACITTY failed) from my MO drive.
> I am used to that error, it always ocours when there is no medium in drive.
> But I always wondered if it's right to do a "READ CAPACITTY" when no
> medium is present. Today I looked at the specs for SCSI-2. I found, that
> "the inititator may check whether a volume is mounted by issuning TEST UNIT
> READY command ... A device using removeable media is usually not ready
> until a volume is mounted. Such a device normally returns CHECK CONDITION
> status and sets the sense key to NOT READY."
> [from: SMALL COMPUTER SYSTEM INTERFACE - 2, March 9, 1990]
>
> I think, that the current behaviour in sd.c didn't get this right. What is
> the opinion of the scsi-gurus on that issue ?
Actually, we do both. We first do a TEST_UNIT_READY to see if a
device even exists. If we get back "NOT_READY", then for non-removable
disks we assume that it needs to be spun up. For removable disks we
currently skip that.
The place where we are failing is that we always fall through and
trying a READ_CAPACITY, no matter what. In the event that we got a
NOT_READY, we should instead initialize the thing with sane defaults and
then skip the READ_CAPACITY.
-Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]