On Tue, Jan 10, 2006 at 10:50:15AM -0500, Alan Stern wrote: > [Moved to linux-scsi] > > On Mon, 9 Jan 2006, Matthew Dharm wrote: > > > A long time ago, I noticed a quirk of the UFI specification in regards to > > one of the options for how to indicate a LUN isn't there. Something about > > a special PDT, I think, in the INQUIRY respose. I don't recall the > > details, but I do recall thinking something along the lines of "that's > > odd.. and it's going to confuse the SCSI core." > > > > If I can find some time to search for that oddity of spec, then modify the > > UFI protocol handler to translate that oddity into a result code the SCSI > > core can understand, you can close the #2 case. > > I see what you mean. The UFI spec requires a device to return 0x1f in the > first byte of the INQUIRY response if no device is present at the LUN. > That's Peripheral Qualifier = 0 and PDT = 0x1f (unknown or no device). > Now SCSI-2 requires the value to be 0x7f to indicate no device, but UFI > also requires the returned SCSI level to be 0, and I don't know what > SCSI-0 says about reporting no device at a LUN. SCSI-0 doesn't exist. SCSI level 0 means "not really SCSI". > Does anybody among the SCSI developers have the answer? Should > scsi_probe_and_add_lun() check for (result[0] & 0x1f) == 0x1f whenever > (result[2] & 0x07) == 0? > > If not, perhaps usb-storage should alter the returned value and max_lun > for a UFI device whenever we see 0x1f. That was my intention. I've just never gotten around to doing it and testing it. Matt -- Matthew Dharm Home: mdharm-usb@xxxxxxxxxxxxxxxxxx Maintainer, Linux USB Mass Storage Driver Ye gods! I have feet??! -- Dust Puppy User Friendly, 12/4/1997
Attachment:
pgp5eDy8ma6Q8.pgp
Description: PGP signature