[PATCH] sd.c: adjust READ_CAPACITY for broken devices
A number of USB mass storage devices return the wrong value in response to READ CAPACITY: They give the total number of blocks rather than the highest block number. Currently the usb-storage driver tries to adjust for this by altering the contents of the reply buffer. That's not a very good idea because it prevents users from seeing what the device actually has to say; it violates the principle that a transport should do nothing more than transfer data. This patch moves the responsibility for adjusting the capacity to the sd driver instead, by adding a new device flag. After this has been merged the corresponding change (to set the flag) will be made to the usb-storage driver. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Showing
Please register or sign in to comment