On Sun, Jun 22, 2003 at 08:58:00AM -0500, James Bottomley wrote:
> On Sat, 2003-06-21 at 23:24, Matthew Dharm wrote:
> > On Sat, Jun 21, 2003 at 09:54:46PM -0500, James Bottomley wrote:
> > >   }
> > > - n = buffer[3] + 4;
> > > + n = rc;
> > >   cd->cdi.speed = ((buffer[n + 8] << 8) + buffer[n + 9]) / 176;
> > 
> > This bit isn't right.  n is supposed to point to the start of the page
> > data, not the page header.  The header is a different size if the command
> > is 6-byte or 10-byte.
> 
> Yes it is.
> 
> That's why I eliminated the dbd bit.  Your patch was calculating the
> offsets past the dbd headers.  However, if you tell the mode sense not
> to send any dbd headers (which are pointless, because the routine isn't
> interested in them), then you don't have to skip past them. and the mode
> data begins just past the mode header.

But (as I read it -- remember I'm not an expert), the old sr.c code didn't
set the DBD bit, just like the new code.  So whatever formula applied to
the old code should apply to the new code, yes?

Matt

-- 
Matthew Dharm                              Home: [EMAIL PROTECTED] 
Maintainer, Linux USB Mass Storage Driver

Stef, you just got beaten by a ball of DIRT.
                                        -- Greg
User Friendly, 12/7/1997

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to