On Mon, Jan 06, 2003 at 08:18:45PM +0100, [EMAIL PROTECTED] wrote: > > In the case reported, the problem was > > Ha, Alan - it is possible that the two of you are referring > to different things.
That confusion is definatly happening.
> I mentioned two devices, both return 36 bytes when asked for
> 36 bytes, but the first has 0 in the additional length field
> (thus reports length 5), the second has 32 in the additional
> length field (thus reports length 37).
> This second device, when asked for 37 bytes, still only returns 36.
The first case: If the additional length indicates < 36 bytes, we should
never issue the second request (which is where this device choked). This
should be a sanity check in scsi_scan.c, and it works for reasons I've
previously outlined.
The second case: This is a bad device. A classic off-by-one error. But
what can usb-storage do? We don't know that the device is bad. But,
focusing on this case, what happens? Short data is returned... if the
resid field is set to indicate this, then scsi_scan.c should be able to do
something sane here.
Perhaps the "best" fix here is to simply make scsi_scan.c only send 36 byte
inquiry requests if the bus is 'emulated'. That would solve a world of
problems....
Matt
--
Matthew Dharm Home: [EMAIL PROTECTED]
Maintainer, Linux USB Mass Storage Driver
God, root, what is difference?
-- Pitr
User Friendly, 11/11/1999
msg10405/pgp00000.pgp
Description: PGP signature
