linux-kernel-test/include/scsi
Hans de Goede 5ce524bdff scsi/sd: add a no_read_capacity_16 scsi_device flag
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>
2010-10-22 10:22:05 -07:00
..
fc [SCSI] libfcoe: add protocol description of FIP VN2VN mode 2010-07-28 09:05:55 -05:00
fc_encode.h [SCSI] libfc: add fc_fill_reply_hdr() and fc_fill_hdr() 2010-07-28 09:06:00 -05:00
fc_frame.h [SCSI] libfc: add fc_frame_sid() and fc_frame_did() functions 2010-07-28 09:05:59 -05:00
iscsi_if.h [SCSI] iscsi_transport: added new iscsi_param to display target alias in sysfs 2010-07-28 09:05:25 -05:00
iscsi_proto.h [SCSI] libiscsi: Check TMF state before sending PDU 2009-12-04 12:01:36 -06:00
Kbuild [SCSI] Unexport scsi/scsi.h from headers_install 2010-05-02 11:45:12 -04:00
libfc.h [SCSI] libfc: don't require a local exchange for incoming requests 2010-07-28 09:06:02 -05:00
libfcoe.h [SCSI] libfcoe: fcoe: fnic: add FIP VN2VN point-to-multipoint support 2010-07-28 09:05:56 -05:00
libiscsi_tcp.h kfifo: move struct kfifo in place 2009-12-22 14:17:55 -08:00
libiscsi.h [SCSI] libiscsi: Make iscsi_eh_target_reset start with session reset 2010-03-03 17:39:04 +05:30
libsas.h [SCSI] Unify SAM_ and SAM_STAT_ macros 2010-07-28 09:07:49 -05:00
libsrp.h libsrp: fix compile failure 2009-12-30 12:23:27 -08:00
osd_attributes.h [SCSI] libosd: OSD2r05: Attribute definitions 2009-06-10 08:54:07 -05:00
osd_initiator.h [SCSI] libosd: Fix blk_put_request locking again 2009-12-10 08:54:17 -06:00
osd_protocol.h [SCSI] osd_protocol.h: Add missing #include 2009-12-04 12:01:48 -06:00
osd_sec.h [SCSI] libosd: OSDv1 Headers 2009-03-12 12:58:06 -05:00
osd_sense.h [SCSI] libosd: osd_sense: OSD_CFO_PERMISSIONS 2009-12-04 12:01:44 -06:00
osd_types.h [SCSI] libosd: OSDv1 Headers 2009-03-12 12:58:06 -05:00
sas_ata.h [SCSI] libsas: fix missing inlines in header file 2008-04-07 12:19:10 -05:00
sas.h [SCSI] libsas: Convert sas_proto users to sas_protocol 2008-01-11 18:22:41 -06:00
scsi_bsg_fc.h [SCSI] fc-transport: Use packed modifier for fc_bsg_request structure. 2010-01-17 12:36:33 -06:00
scsi_cmnd.h [SCSI] Deprecate SCSI_PROT_*_CONVERT operations 2009-10-02 09:46:25 -05:00
scsi_dbg.h [SCSI] Fix device not ready printk 2007-10-12 14:51:56 -04:00
scsi_device.h scsi/sd: add a no_read_capacity_16 scsi_device flag 2010-10-22 10:22:05 -07:00
scsi_devinfo.h Merge ../scsi-rc-fixes-2.6 2006-04-14 15:47:45 -05:00
scsi_dh.h [SCSI] scsi_dh: Change the scsidh_activate interface to be asynchronous 2009-12-04 12:00:46 -06:00
scsi_driver.h sd, sr: fix Driver 'sd' needs updating message 2009-06-21 12:01:27 -05:00
scsi_eh.h [SCSI] scsi_eh_prep_cmnd should save scmd->underflow 2008-07-26 15:14:56 -04:00
scsi_host.h SCSI: implement sd_unlock_native_capacity() 2010-06-02 13:50:04 -04:00
scsi_ioctl.h [PATCH] don't mess with file in scsi_nonblockable_ioctl() 2008-10-21 07:47:28 -04:00
scsi_netlink_fc.h [SCSI] SCSI & FC transport: extend event vendor id's to 64bits 2006-09-02 15:35:15 -05:00
scsi_netlink.h scsi: use __uX types for headers exported to user space 2010-08-11 08:59:01 -07:00
scsi_scan.h PM/Hibernate: Wait for SCSI devices scan to complete during resume 2009-04-13 11:37:07 -07:00
scsi_tcq.h scsi: make sure that scsi_init_shared_tag_map() doesn't overwrite existing map 2008-10-27 19:25:30 +01:00
scsi_tgt_if.h [SCSI] tgt: add I_T nexus support 2007-10-12 14:37:50 -04:00
scsi_tgt.h [SCSI] tgt: add I_T nexus support 2007-10-12 14:37:50 -04:00
scsi_transport_fc.h [SCSI] Allow FC LLD to fast-fail scsi eh by introducing new eh return 2010-04-11 09:49:33 -05:00
scsi_transport_iscsi.h [SCSI] iscsi_transport: wait on session in error handler path 2010-07-28 09:06:06 -05:00
scsi_transport_sas.h [SCSI] scsi_transport_sas: add support for transport layer retries (TLR) 2010-02-08 17:15:19 -06:00
scsi_transport_spi.h [SCSI] aic79xx: make driver respect nvram for IU and QAS settings 2009-06-15 10:09:35 -05:00
scsi_transport_srp.h [SCSI] tgt: move tsk_mgmt_response callback to transport class 2007-10-12 14:38:01 -04:00
scsi_transport.h block: unify request timeout handling 2008-10-09 08:56:13 +02:00
scsi.h scsi: use __uX types for headers exported to user space 2010-08-11 08:59:01 -07:00
scsicam.h
sg.h sysctl extern cleanup: sg 2010-03-12 15:53:10 -08:00
srp.h [SCSI] srp.h: Add I/O Class values 2006-06-17 20:37:38 -07:00