On Wed, Jul 30, 2003 at 10:08:27AM -0400, Alan Stern wrote: > Matt: > > Daniel reports that the patch to change the length of the > cache-determination MODE-SENSE worked (patch included below). Here is the > relevant part of the system log. It turns out that only the first 11 > bytes of the cache page are needed... [...] > Do you think I should submit this to James Bottomley? The way I see it, > the code should be fine either way, for conformant devices. At least one > device (Daniel's) works with the patch but not without it. I'm worried > that other devices might turn out to do exactly the opposite. > > Maybe a better approach would be: > > len = data.length; > if (len > 512) > len = data.header_length + data.block_descriptor_length + 3;
My guess is that the vast majority of devices will be fine with any length
over the header size -- some of James' code tries to guarantee that.
Do we have any idea how large that page is supposed to be?
Whatever length you request should also be a multiple of 4, just to make
sure devices stay happy.
Other than that, I say send it to James.
Matt
--
Matthew Dharm Home: [EMAIL PROTECTED]
Maintainer, Linux USB Mass Storage Driver
Now payink attention, please. This is mouse. Click-click. Easy to
use, da? Now you try...
-- Pitr to Miranda
User Friendly, 10/11/1998
pgp00000.pgp
Description: PGP signature
