Well, here's my list of what the 'popular OS' uses for all devices:

INQUIRY (for only 36 bytes -- nothing else!)
TEST_UNIT_READY
REQUEST_SENSE
ALLOW_MEDIUM_REMOVAL (mostly for eject purposes)

For disk-like media:

READ_10
WRITE_10

I'd have to go back to my notes for tape and CD media.  But those aren't my
biggest problem areas -- the common probe and the disk driver are my
biggest headaches.

Note that MODE_SENSE isn't on this list.  How does the 'popular OS' test
for write-protect, you ask?  It tries to write and then looks for a
failure, AFAICT.

Note that this data comes from observations about what commands all devices
seem to support.

I'd be willing to write a helper, but I'm a bit out of my element here...
can someone at least suggest a good place to put such a helper (or
volunteer to mock one up for me)?

Matt

On Sun, Mar 23, 2003 at 07:39:01PM -0600, James Bottomley wrote:
> On Sun, 2003-03-23 at 19:37, Matthew Dharm wrote:
> > Actually, there is such a list.  It's the commands that the 'popular OS'
> > uses, and I have a pretty good idea exactly what those are.  That's why my
> > original approach was to just cut out the commands that fell outside that
> > definition.
> 
> Well, if you want to write a helper for the mid layer that checks the
> commands and returns a Check Condition with sense Illegal Reguest on the
> bad ones, that sounds like the best approach.  You can then call the
> helper function in the queuecommand of the problem emulated drivers.
> 
> Can you publish a rough list of these?
> 
> James
> 

-- 
Matthew Dharm                              Home: [EMAIL PROTECTED] 
Maintainer, Linux USB Mass Storage Driver

Dudes! May the Open Source be with you.
                                        -- Eric S. Raymond
User Friendly, 12/3/1998

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to