From: Douglas Gilbert <dgilbert@interlog.com>
To: Linus Torvalds <torvalds@linux-foundation.org>,
ltuikov@yahoo.com, linux-kernel@vger.kernel.org,
linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org,
Greg KH <greg@kroah.com>,
James Bottomley <James.Bottomley@suse.de>
Subject: Re: [PATCH repost 3] [SCSI] Retrieve the Caching mode page
Date: Tue, 23 Nov 2010 13:40:21 -0500 [thread overview]
Message-ID: <4CEC0A95.5020201@interlog.com> (raw)
In-Reply-To: <20101123045900.GK20296@one-eyed-alien.net>
On 10-11-22 11:59 PM, Matthew Dharm wrote:
> On Mon, Nov 22, 2010 at 02:02:06PM -0500, Douglas Gilbert wrote:
>> On 10-11-22 12:07 PM, Linus Torvalds wrote:
>>> On Mon, Nov 22, 2010 at 8:56 AM, Luben Tuikov<ltuikov@yahoo.com> wrote:
>>>>
>>>> Some kernel transport drivers unconditionally disable
>>>> retrieval of the Caching mode page. One such for example is
>>>> the BBB/CBI transport over USB.
>>>
>>> One reason for that is that historically we've seen devices that
>>> simply go crazy - to the point of simply stopping to respond to
>>> anything - when you ask for pages that Windows doesn't ask for.
>>>
>>> It's especially common on USB storage, but it happens elsewhere too.
>>> The device firmware simply hasn't ever been tested in that situation,
>>> and it's buggy.
>>>
>>> So I don't mind the patch per se, but I think it's potentially way
>>> more dangerous than it looks.
>>
>> The vast majority of USB mass storage devices are based
>> on SCSI-2 (1994) or a particularly nasty standard
>> called RBC (Reduced Block Commands, 1999) which is a
>> partial subset of the block commands (i.e. disk related).
>> We are all aware of the quality of most of the device
>> end implementations out in the wild.
>
> Not true. The vast majority of USB mass storage devices adhere to no SCSI
> or T10 specification at all. The official definition of the "Transparent
> SCSI" operating mode of the USB Mass Storage Class is "that which
> microsoft/sun/other major vendors use". Of course, that's not written down
> anywhere, but it was the intent of the committee and that is the reason why
> the committee rejected all attempts by people like me to implement a
> command-based compliance test.
Okay.
>> I believe what Luben is working with is a new standard
>> called UAS (soon to be ratified) which is based on
>> www.t10.org work in the last few years. It seems to be
>> an attempt to throw out the older USB mass storage
>> transport and do it again, properly.
>
> Luben's patch changes the behavior of sd-mod, which would affect both
> usb-storage and UAS.
>
> The primary thing that UAS adds is support for USB 3.0 streams and TCQ,
> which are both designed to improve performance. I consider it likely that
> the quality of device firmware will be equally poor as older devices.
That depends on how low we, and particularly W7, set
the bar. And W7 has a similar set of problems to
us. For example, how to detect an SSD supporting
trim behind a USB transport.
Doug Gilbert
> That said, Luben's patch is kinda slick. sd-mod already asks for a lot of
> mode page data; it does this so that it's request matches the observed
> behavior of a "popular" Redmond, WA-based OS. Luben's patch just searches
> through that data to see if it can find what it is looking for, rather than
> rqeuesting a specific mode page later (which may not be supported).
>
> That said, I still consider this somewhat risky. We've seen devices with
> grossly inaccurate data before.
>
> But, to my thinking, as long as the devices don't see any change in the
> command stream, then I think the risk has been properly mitigated. To my
> understanding, this is the case.
>
> Matt
>
next prev parent reply other threads:[~2010-11-23 18:40 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-22 16:56 [PATCH repost 3] [SCSI] Retrieve the Caching mode page Luben Tuikov
2010-11-22 17:07 ` Linus Torvalds
2010-11-22 19:02 ` Douglas Gilbert
2010-11-23 4:59 ` Matthew Dharm
2010-11-23 18:40 ` Douglas Gilbert [this message]
2010-11-22 20:02 ` Luben Tuikov
2010-11-23 5:00 ` Matthew Dharm
2010-11-23 9:25 ` Luben Tuikov
2010-11-23 14:30 ` Matthew Dharm
2010-11-24 9:02 ` Luben Tuikov
2010-11-24 10:10 ` James Bottomley
2010-11-24 14:48 ` Christoph Hellwig
2010-11-24 14:49 ` Alan Stern
2010-11-24 14:58 ` James Bottomley
2010-11-24 16:55 ` Luben Tuikov
-- strict thread matches above, loose matches on Subject: below --
2010-11-23 8:43 Luben Tuikov
2010-12-05 20:53 Luben Tuikov
2010-12-08 0:02 Luben Tuikov
2010-12-08 0:12 ` Greg KH
2010-12-08 5:05 ` James Bottomley
2010-12-08 8:01 ` Luben Tuikov
2010-12-08 15:16 ` Alan Stern
2010-12-08 15:43 ` James Bottomley
2010-12-08 15:57 ` Alan Stern
2010-12-08 16:00 ` Matthew Wilcox
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=4CEC0A95.5020201@interlog.com \
--to=dgilbert@interlog.com \
--cc=James.Bottomley@suse.de \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=ltuikov@yahoo.com \
--cc=torvalds@linux-foundation.org \
/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