Re: [patch] datafab fix and unusual devices

From: Matthew Dharm
Date: Mon Mar 29 2004 - 18:17:18 EST


On Tue, Mar 30, 2004 at 12:44:09AM +0200, Andries.Brouwer@xxxxxx wrote:
> datafab.c has an often-seen bug: the SCSI READ_CAPACITY command
> does not need the number of sectors but the last sector.

The first part of the patch (which fixes this bug) certainly looks good to
me for 2.6 -- we need to check that 2.4 doesn't also have the problem.

> I just tried the CF and SM parts of a 5-in-1 card reader.
> The CF part works with US_PR_DATAFAB when the bug mentioned is fixed.
> The SM part works with US_PR_SDDR55.
> (Revision Number is 17.08 - that in case the 0000-ffff
> should prove to be too optimistic.)
>
> We still must discuss what setup to use for readers like this -
> I have several of them - that require different drivers for
> different LUNs. As it is now one has to compile usb-storage
> twice, once with CONFIG_USB_STORAGE_DATAFAB defined and once
> without, and remove one usb-storage.ko and insert the other
> to go from CF to SM. (And that hangs with 2.6.4 so a reboot
> is required..)

The second part of your patch I don't like (it seems to violate the
'principal of least suprise' to me).... but I'm also ready and willing to
consider a beter alternative. What do you suggest?

Matt

--
Matthew Dharm Home: mdharm-usb@xxxxxxxxxxxxxxxxxx
Maintainer, Linux USB Mass Storage Driver

It was a new hope.
-- Dust Puppy
User Friendly, 12/25/1998

Attachment: pgp00000.pgp
Description: PGP signature