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

Matthew Dharm
2003-11-13T01:56:31Z

[-- Attachment #1: Type: text/plain, Size: 1650 bytes --]

On Wed, Nov 12, 2003 at 04:44:05PM -0800, Patrick Mansfield wrote:
> On Wed, Nov 12, 2003 at 04:13:10PM -0800, Patrick Mansfield wrote:
> > On Wed, Nov 12, 2003 at 04:09:21PM -0800, Matthew Dharm wrote:
> > > On Wed, Nov 12, 2003 at 03:50:29PM -0800, Patrick Mansfield wrote:
> > > > James - can you please apply? This should not affect other devices since
> > > > we are not changing the requested length, just the size of the receive
> > > > buffer.
> > >
> > > This is a terrible idea.
> > >
> > > There is a large number of devices which choke if those two values do not
> > > match.
> >
> > This is what we do in 2.4 - does USB fix it up for 2.4?
> >
> > Oh well.
>
> I think see the 2.4 fixups - it looks like it sets the buffer cmd_len to
> 12, but is (for usb_stor_ufi_command?) setting MODE SENSE 10 to a 8 byte
> length (cmd[8] = 8).

Basically, yes. It's tweaked in a couple of places in 2.4, including some
awful heuristics....

> Can we use a minium buffer length of 12 for any requests of less than 13
> bytes?

You can try.... I don't know if it will work.

> Else, I give up on any other methods, and we should add them to the static
> black list as BLIST_MS_SKIP_PAGE_3F (skip_ms_page_3f) and probably
> BLIST_MS_SKIP_PAGE_08 just to be safe.

I'm starting to think that this may be the best solution -- blacklist all
MODE_SENSE[_10] commands from all Direct-Access devices.

Matt

--
Matthew Dharm Home: mdharm-usb@one-eyed-alien.net
Maintainer, Linux USB Mass Storage Driver

Why am I talking to a toilet brush?
-- CEO
User Friendly, 4/30/1998

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]