On Mon, Sep 22, 2003 at 09:56:38PM +0200, [EMAIL PROTECTED] wrote: > A scsi device declares its level of scsi compliance. > Most USB storage devices are not very scsi compliant at all, > and report 0 there.
Not exactly. The reporting of 0, 1, 2, or something random in that field appears to be completely unrelated to the capabilities of the device. I've found -zero- correlation between the revision level and how the device functions. Also, sampling my devices, I see a wide range of values reported -- saying 'most report 0' would be incorrect based on my data. > To everybody's surprise USB storage does > > US_DEBUGP("Fixing INQUIRY data to show SCSI rev 2 - was %d\n", > data_ptr[2] & 7); > > /* Change the SCSI revision number */ > data_ptr[2] = (data_ptr[2] & ~7) | 2; > > It claims that the device is SCSI-2 compliant, even when the > device itself does not make that claim at all. > > Suppose that we stop changing this compliance level. > Then getting SCSI-1 or no compliance level could be a > "conservative mode" flag. > > [Of course this was done for a reason - USB storage was written > assuming the SCSI layer given. If we stop changing the SCSI level > that may require changes in the SCSI code. Probably Matt remembers > what the problems were.] It's been a couple of years since I looked at this.... but I positively recall that I added this code to fix definate and clear problems. One that is immediately obvious to me is that if the SCSI level is < 2, we can't address anything beyond the 6-byte command limit. Another that immediately comes to mind is that the display in /proc/scsi/scsi would show version ffffffff I've heard arguments from various people (including Jorge Shilling and some device-vendor folks) that I shouldn't override this value... the argument I used to counter that request was that things break completely if I don't override the value; I don't have a record of what specifically breaks. Matt -- Matthew Dharm Home: [EMAIL PROTECTED] Maintainer, Linux USB Mass Storage Driver A: The most ironic oxymoron wins ... DP: "Microsoft Works" A: Uh, okay, you win. -- A.J. & Dust Puppy User Friendly, 1/18/1998
pgp00000.pgp
Description: PGP signature