On Tue, 10 Apr 2012, Norman Diamond wrote: > Alan Stern wrote: > > On Mon, 9 Apr 2012, Norman Diamond wrote: > >> I suggest that quirk processing should only try to read 1 block, the last block which is asserted to exist, and decrement if the read fails due to non-existence.� If the read fails for a different reason then the block exists and the count should not be decremented. > > > > I have tried to explain before that this is a very bad idea.� Bridges that crash when attempting to read beyond the end of the device would become totally unusable. > > In cases where a bridge has been observed to crash when trying to read a SINGLE block which the bridge asserted to exist but which didn't actually exist, I agree that an aggressive quirk is needed. > > In cases where a bridge has been observed to crash when trying to read MULTIPLE blocks among which one block had a problem, there is no evidence yet to judge that my idea is very bad. Those bridges need to be tested again with single block reads, and need to be tested on reading the last block number which the bridge asserts to exist rather than attempting to read an existing bad block (by coincidence the two might be the same block, but not usually). It sounds like you are suggesting that we have a new quirk, something like TEST_CAPACITY. When this quirk is present, we could attempt to read the last block when the drive (or media) is first detected, thereby determining whether the reported capacity needs to be adjusted. The existing FIX_CAPACITY and CAPACITY_HEURISTICS quirk entries could be changed to TEST_CAPACITY as people report the results of their testing. However this would be a very slow process. Is that what you want? Alan Stern -- 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