• Alan Stern's avatar
    [PATCH] sd.c: adjust READ_CAPACITY for broken devices · d7768998
    Alan Stern authored
    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: default avatarAlan Stern <stern@rowland.harvard.edu>
    Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
    d7768998
scsi_device.h 9.81 KB