From: Matthew Dharm <mdharm-scsi@one-eyed-alien.net>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Linus Torvalds <torvalds@transmeta.com>,
USB Developers <linux-usb-devel@lists.sourceforge.net>,
USB Storage List <usb-storage@one-eyed-alien.net>,
Linux SCSI list <linux-scsi@vger.kernel.org>
Subject: Re: PATCH: exclude certain commands from emulated SCSI hosts
Date: Sun, 23 Mar 2003 23:04:38 -0800 [thread overview]
Message-ID: <20030323230438.E24668@one-eyed-alien.net> (raw)
In-Reply-To: <1048469946.1643.2.camel@mulgrave>; from James.Bottomley@SteelEye.com on Sun, Mar 23, 2003 at 07:39:01PM -0600
[-- Attachment #1: Type: text/plain, Size: 1821 bytes --]
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: mdharm-usb@one-eyed-alien.net
Maintainer, Linux USB Mass Storage Driver
Dudes! May the Open Source be with you.
-- Eric S. Raymond
User Friendly, 12/3/1998
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
next prev parent reply other threads:[~2003-03-24 7:04 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20030322193046.A17056@one-eyed-alien.net>
[not found] ` <20030322193149.B17056@one-eyed-alien.net>
2003-03-23 3:37 ` PATCH: exclude certain commands from emulated SCSI hosts Matthew Dharm
2003-03-23 4:09 ` Linus Torvalds
2003-03-23 7:31 ` Matthew Dharm
2003-03-23 7:39 ` Linus Torvalds
2003-03-23 18:13 ` [usb-storage] " Matthew Dharm
2003-03-24 1:05 ` Douglas Gilbert
2003-03-24 1:26 ` James Bottomley
2003-03-24 1:37 ` Matthew Dharm
2003-03-24 1:39 ` James Bottomley
2003-03-24 7:04 ` Matthew Dharm [this message]
2003-03-24 15:15 ` James Bottomley
2003-03-24 16:29 ` Linus Torvalds
2003-03-24 16:43 ` James Bottomley
2003-03-24 16:52 ` Jens Axboe
2003-03-24 16:56 ` James Bottomley
2003-03-24 17:30 ` Matthew Dharm
2003-04-05 15:30 ` James Bottomley
2003-04-05 19:27 ` Matthew Dharm
2003-04-05 19:45 ` James Bottomley
2003-04-05 19:55 ` Matthew Dharm
2003-04-05 20:08 ` James Bottomley
2003-04-06 0:20 ` Matthew Dharm
2003-04-06 0:22 ` Matthew Dharm
2003-04-06 15:39 ` James Bottomley
2003-04-07 22:33 ` Patrick Mansfield
2003-04-07 23:14 ` James Bottomley
2003-04-08 0:51 ` Patrick Mansfield
2003-04-20 21:33 ` Matthew Dharm
2003-04-20 21:35 ` Matthew Dharm
2003-04-21 16:20 ` James Bottomley
2003-04-21 17:02 ` Matthew Dharm
2003-04-21 16:28 ` James Bottomley
2003-04-21 17:01 ` Matthew Dharm
2003-04-21 19:23 ` James Bottomley
2003-04-21 19:35 ` Matthew Dharm
2003-04-21 21:27 ` James Bottomley
2003-04-21 23:37 ` Matthew Dharm
2003-04-21 21:28 ` Patrick Mansfield
2003-04-21 23:45 ` Matthew Dharm
2003-03-24 1:58 ` Linus Torvalds
2003-03-24 6:58 ` Matthew Dharm
2003-04-22 17:37 [usb-storage] " James Bottomley
2003-04-22 18:13 ` Alan Stern
-- strict thread matches above, loose matches on Subject: below --
2003-04-22 19:30 Andries.Brouwer
2003-04-22 19:41 ` James Bottomley
2003-04-22 19:50 Andries.Brouwer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030323230438.E24668@one-eyed-alien.net \
--to=mdharm-scsi@one-eyed-alien.net \
--cc=James.Bottomley@SteelEye.com \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=torvalds@transmeta.com \
--cc=usb-storage@one-eyed-alien.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox