Re: [usb-storage] Re: [PATCH] fix Sony USB mass storage - pass larger receive buffer

Pat LaVarre
2003-11-14T02:02:54Z

> From: Matthew Dharm ...
> How about:
> * Define an absolute bare minimum safe
> subset of SCSI commands and use only
> those commands when communicating with
> a USB device
> ...
> a varient of blacklisting ... I like ...

Yes please, me too.

> From: Matthew Dharm ...
> I suggested something like this a while ago --
> if the emulated flag was set, certain commands
> were not sent. Linus didn't like that, but I
> think he objected more to the 'emulated' flag
> than anything else.

Urgh. What am I missing?

Minimum mostly safe subset works better. Right?

Not just with SCSI over USB. So likewise with SCSI over IDE (aka ATAPI)
and SCSI over 1394/ FireWire/ iLink (aka SBP2 Normative Annex B).
Right?

I'm hoping we will discover for PDT x00 HDD/Flash the minimum mostly
safe subset includes such as that (transcribed-by-hand from CATC USB
Advisor) trace of Win XP SP1 once upon a time with a particular sample
device while disc absent:

> -i xC0 -y "1A 00:1C:00 C0 00" // Mode Sense (6)
> -i xC0 -y "1A 00:3F:00 C0 00" // Mode Sense (6)
> -i x0C -y "1A 00:00:00 0C 00" // Mode Sense (6)
> -i x0C -y "1A 00:3F:00 0C 00" // Mode Sense (6)

I'm not sure how Win translates to MMC op x5A GPCMD_MODE_SENSE_10 from
the SPC op x1A MODE_SENSE 6 of Win SCSI.

To be sure we'd have to trace something other than an x 08 06 50 device
(= Mass Storage, Transparent SCSI, BBB)

I'm thinking I remember seeing the length either doesn't change or else
adds four to account for the growth to 8 byte header from 4 byte header
i.e. either:

-p -i xC0 -y "5A 00 1C:00:00:00 00 00:C0 00 00:00" // Mode Sense (10)
-p -i xC0 -y "5A 00 3F:00:00:00 00 00:C0 00 00:00" // Mode Sense (10)
-p -i x0C -y "5A 00 00:00:00:00 00 00:0C 00 00:00" // Mode Sense (10)
-p -i x0C -y "5A 00 3F:00:00:00 00 00:0C 00 00:00" // Mode Sense (10)

or else:

-p -i xC4 -y "5A 00 1C:00:00:00 00 00:C4 00 00:00" // Mode Sense (10)
-p -i xC4 -y "5A 00 3F:00:00:00 00 00:C4 00 00:00" // Mode Sense (10)
-p -i x10 -y "5A 00 00:00:00:00 00 00:10 00 00:00" // Mode Sense (10)
-p -i x10 -y "5A 00 3F:00:00:00 00 00:10 00 00:00" // Mode Sense (10)

Pat LaVarre