5ce524bdff
I seem to have a knack for digging up buggy usb devices which don't work with Linux, and I'm crazy enough to try to make them work. So this time a friend of mine asked me to get an mp4 player (an mp3 player which can play videos on a small screen) to work with Linux. It is based on the well known rockbox chipset for which we already have an unusual devs entries to work around some of its bugs. But this model comes with an additional twist. This model chokes on read_capacity_16 calls. Now normally we don't make those calls, but this model comes with an sdcard slot and when there is no card in there (and shipped from the factory there is none), it reports a size of 0. However this time the programmers actually got the read_capacity_10 response right! So they substract one from the size as stored internally in the mp3 player before reporting it back, resulting in an answer of ... 0xffffffff sectors, causing sd.c to try a read_capacity_16, on which the device crashes. This patch adds a flag to scsi_device to indicate that a a device cannot handle read_capacity_16, and when this flag is set if a device reports an lba of 0xffffffff as answer to a read_capacity_10, assumes it tries to report a size of 0. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> |
||
---|---|---|
.. | ||
fc | ||
fc_encode.h | ||
fc_frame.h | ||
iscsi_if.h | ||
iscsi_proto.h | ||
Kbuild | ||
libfc.h | ||
libfcoe.h | ||
libiscsi_tcp.h | ||
libiscsi.h | ||
libsas.h | ||
libsrp.h | ||
osd_attributes.h | ||
osd_initiator.h | ||
osd_protocol.h | ||
osd_sec.h | ||
osd_sense.h | ||
osd_types.h | ||
sas_ata.h | ||
sas.h | ||
scsi_bsg_fc.h | ||
scsi_cmnd.h | ||
scsi_dbg.h | ||
scsi_device.h | ||
scsi_devinfo.h | ||
scsi_dh.h | ||
scsi_driver.h | ||
scsi_eh.h | ||
scsi_host.h | ||
scsi_ioctl.h | ||
scsi_netlink_fc.h | ||
scsi_netlink.h | ||
scsi_scan.h | ||
scsi_tcq.h | ||
scsi_tgt_if.h | ||
scsi_tgt.h | ||
scsi_transport_fc.h | ||
scsi_transport_iscsi.h | ||
scsi_transport_sas.h | ||
scsi_transport_spi.h | ||
scsi_transport_srp.h | ||
scsi_transport.h | ||
scsi.h | ||
scsicam.h | ||
sg.h | ||
srp.h |