From: Douglas Gilbert <dougg@torque.net>
To: p.lavarre@ieee.org
Cc: linux-usb-devel@lists.sourceforge.net,
usb-storage@one-eyed-alien.net, linux-scsi@vger.kernel.org
Subject: Re: [usb-storage] Re: PATCH: exclude certain commands from emulated SCSI hosts
Date: Wed, 09 Apr 2003 17:45:04 +1000 [thread overview]
Message-ID: <3E93CF80.5050904@torque.net> (raw)
In-Reply-To: 20030408132949.36191.qmail@web21103.mail.yahoo.com
Pat LaVarre wrote:
>>From: Patrick Mansfield [mailto:patmans@us.ibm.com]
>>Sent: Mon 4/7/2003 4:33 PM ...
>>
>>Besides the current b/w listed items (except for
>>the BLIST_INQUIRY_36/58 flags), we have:
>>
>>... too long an INQUIRY request,
>>... report back wrong INQUIRY length
>>... don't like EVPD INQUIRY
>
>
> And more. Talk like Windows means say -x "12 0 0 0 24
> 0" -i x24 // op x12 Inquiry for 36, nothing else, at
> least until broken 64-bit motherboards force us to x20
> or x28.
>
>
>>Why can't usb storage conditionally modify the
>>INQUIRY to request no more than 36 bytes
>>(allocation length), and modify any results to be
>><= 36 (additional length)?
>
>
> sd.c isn't the only client of usb storage.
>
> In particular, we need to hold on to some way of
> letting sg pass thru op x12 Inquiry arbitrary enough
> to copy In the vendor-specific data out past 36 bytes.
> Or to copy In the Ans-specified data out there that
> lets an SFF/ ANSI MMC compliant device report an
> attempt to comply simultaneously with the somewhat
> contradictory ANSI SPC.
>
> No?
Pat,
The sg policy is basically "you want, you got it" **. Andre
Hedrick found out that in some dark corner of the ATA
instruction set it was possible to overspeed an ATA disk.
He proposed filtering out that instruction but the linux-kernel
list consensus was not to do that.
Back to one of my favourite subjects: replacing the emulated
flag with a protocol identifier. Table 237 in section 8.5
(Protocol Specific parameters) of a recent SPC-3 draft
has a table of transport protocol identifiers:
0 Fibre Channel
1 Parallel SCSI
2 SSA
3 IEEE 1394
4 RDMA (infiniband)
5 Internet SCSI
6 SAS
7-15 reserved
Perhaps we could borrow 15 for ATAPI and 14 for USB mass storage
and we should have current transports covered. As for the OO
encapsulation counter argument, the transport protocol _is_
significant for parts of the SCSI command set (see SAM-3 and
SPC-3) as well as device identification/discovery, async
error notification ....
So then we could associate a "quality of implementation" metric
with each protocol and program defensively within the kernel
accordingly. For those using the pass through interface (i.e.
sg [and the SG_IO ioctl now in the block layer]) it remains
'caveat emptor'.
There are many other uses for a protocol identifier: a "bus scan"
based device discovery on protocol 5 doesn't make much sense.
** There is a little magic inside sg's SG_IO ioctl that
only allows through non-modifying SCSI commands (e.g. INQUIRY
and READ) when a file is opened O_RDONLY.
Doug Gilbert
next prev parent reply other threads:[~2003-04-09 7:33 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-08 13:29 [usb-storage] Re: PATCH: exclude certain commands from emulated SCSI hosts Pat LaVarre
2003-04-09 7:45 ` Douglas Gilbert [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-04-22 18:44 Andries.Brouwer
2003-04-22 17:38 Andries.Brouwer
2003-04-22 18:23 ` Alan Stern
2003-04-22 17:22 Andries.Brouwer
2003-04-22 17:34 ` Mike Bursell
2003-04-22 17:37 ` James Bottomley
2003-04-22 18:50 ` Matthew Dharm
2003-04-22 17:08 Andries.Brouwer
2003-04-22 1:09 Andries.Brouwer
2003-04-22 1:17 ` Matthew Dharm
2003-04-22 14:31 ` Alan Cox
2003-04-22 15:36 ` Matthew Dharm
2003-04-22 16:07 ` James Bottomley
2003-04-09 15:15 Pat LaVarre
2003-04-09 15:08 Pat LaVarre
2003-03-24 19:16 Pat LaVarre
2003-03-24 20:20 ` Matthew Dharm
2003-03-24 18:17 Pat LaVarre
2003-03-24 18:19 ` Jens Axboe
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
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=3E93CF80.5050904@torque.net \
--to=dougg@torque.net \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=p.lavarre@ieee.org \
--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