Re: sd_mod or usb-storage fails to read a single good block (was: ehci_hcd fails to read a single good block)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alan Stern wrote:
> On Tue, 17 Apr 2012, Norman Diamond wrote:
>> Yes it does look like changing this bridge to CAPACITY_HEURISTICS from FIX_CAPACITY is likely to help a bit.
> 
> That's easy enough.

Yeah I know, even I could do that one  ^_^

>> I think that heuristics should also accept multiples of 63 even if the total is odd.  This doesn't solve everything but will probably help more.
> 
> Okay, if nobody objects.

I'm nobody and I don't object  ^_^
(Of course we have to wait to see if anyone knows a real reason that this would be a problem.)

>> I think that handling of FIX_CAPACITY should check for multiples of 63 and report the apparent likelihood that FIX_CAPACITY probably wasn't the right setting for the bridge (if it's a bridge).  This doesn't solve everything but will probably help more.
> 
> The FIX_CAPACITY code runs in a different module.  It has no way to know whether the device is a bridge or not.

The quirks table could be made available, but values stored in the table don't say if the device is a bridge.  OK, then I still think this:  I think that handling of FIX_CAPACITY should check for multiples of 63 and report the apparent likelihood that FIX_CAPACITY probably wasn't the right setting for the device.

In addition, I have a feeling that if a device has FIX_CAPACITY but the number of reported blocks is even then I doubt the accuracy of FIX_CAPACITY.  The reason is that flash memory devices tend to have physical sectors that are even multiples of logical sectors.

I do think the handling of FIX_CAPACITY should report when devices report capacities that are either multiples of 63 or 2 (or both), so that further testing can be done.  The existing code to do the decrement anyway can remain the same until further testing is done.

>> The addition of TEST_CAPACITY doesn't solve everything but will probably help more.
> 
> That will require a certain amount of work, with the possibility of breaking some systems.  I'd rather not do it if there's no clear and pressing need.

Two indistinguishable versions of the Prolific bridge show that there is a need.  One version needs the decrement (probably) and the other version doesn't (definitely).
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux