Re: PATCH; make sr.c respect use_10_for_ms

Matthew Dharm
2003-06-22T04:10:05Z

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

On Sat, Jun 21, 2003 at 09:54:46PM -0500, James Bottomley wrote:
> @@ -702,7 +692,7 @@
> printk("%s: scsi-1 drive\n", cd->cdi.name);
> return;
> }
> - n = buffer[3] + 4;
> + n = rc;
> cd->cdi.speed = ((buffer[n + 8] << 8) + buffer[n + 9]) / 176;
> cd->readcd_known = 1;
> cd->readcd_cdda = buffer[n + 5] & 0x01;

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.

If you look at my patch, you can see the correct offsets you need.

Matt

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

We can customize our colonels.
-- Tux
User Friendly, 12/1/1998