linux/drivers/usb/storage
Alan Stern 21c13a4f7b usb-storage: redo incorrect reads
Some USB mass-storage devices have bugs that cause them not to handle
the first READ(10) command they receive correctly.  The Corsair
Padlock v2 returns completely bogus data for its first read (possibly
it returns the data in encrypted form even though the device is
supposed to be unlocked).  The Feiya SD/SDHC card reader fails to
complete the first READ(10) command after it is plugged in or after a
new card is inserted, returning a status code that indicates it thinks
the command was invalid, which prevents the kernel from retrying the
read.

Since the first read of a new device or a new medium is for the
partition sector, the kernel is unable to retrieve the device's
partition table.  Users have to manually issue an "hdparm -z" or
"blockdev --rereadpt" command before they can access the device.

This patch (as1470) works around the problem.  It adds a new quirk
flag, US_FL_INVALID_READ10, indicating that the first READ(10) should
always be retried immediately, as should any failing READ(10) commands
(provided the preceding READ(10) command succeeded, to avoid getting
stuck in a loop).  The patch also adds appropriate unusual_devs
entries containing the new flag.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Sven Geggus <sven-usbst@geggus.net>
Tested-by: Paul Hartman <paul.hartman+linux@gmail.com>
CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
CC: <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 09:05:42 -07:00
..
alauda.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
cypress_atacb.c USB: usb-storage: added missing MODULE_LICENSE("GPL") for usb-storage ums-* modules 2009-03-24 16:20:35 -07:00
datafab.c USB: storage: Drop an unneeded a NULL test 2009-09-23 06:46:29 -07:00
debug.c
debug.h
ene_ub6250.c treewide: cleanup continuations and remove logging message whitespace 2011-04-26 10:24:37 +02:00
freecom.c usb: storage: freecom: Fixed several coding style issues. 2010-08-10 14:35:39 -07:00
initializers.c USB: usb-storage fails to attach to Huawei Datacard cdrom device 2009-09-23 06:46:32 -07:00
initializers.h
isd200.c [SCSI] usb-storage: do not increment cmd->serial_number 2011-05-01 10:23:09 -05:00
jumpshot.c USB: storage: Drop an unneeded a NULL test 2009-09-23 06:46:29 -07:00
karma.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
Kconfig Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 2011-03-16 15:19:35 -07:00
libusual.c
Makefile Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 2011-03-16 15:19:35 -07:00
onetouch.c USB: rename usb_buffer_alloc() and usb_buffer_free() users 2010-05-20 13:21:38 -07:00
option_ms.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
option_ms.h
protocol.c
protocol.h
realtek_cr.c usb_storage: realtek_cr patch: add const modifier 2011-02-17 10:53:26 -08:00
scsiglue.c Fix common misspellings 2011-03-31 11:26:23 -03:00
scsiglue.h
sddr09.c USB: storage: Use USB_ prefix instead of US_ prefix 2010-10-22 10:21:49 -07:00
sddr55.c USB: usb-storage: added missing MODULE_LICENSE("GPL") for usb-storage ums-* modules 2009-03-24 16:20:35 -07:00
shuttle_usbat.c Fix common misspellings 2011-03-31 11:26:23 -03:00
sierra_ms.c USB: Remove delay_t unused variable from sierra_ms.c driver initialisation code 2011-03-02 19:52:29 -05:00
sierra_ms.h
transport.c usb-storage: redo incorrect reads 2011-06-07 09:05:42 -07:00
transport.h
uas.c Merge branch 'usb-next' into musb-merge 2010-12-16 10:05:06 -08:00
unusual_alauda.h USB: storage: Use USB_ prefix instead of US_ prefix 2010-10-22 10:21:49 -07:00
unusual_cypress.h USB: usb-storage: unusual_devs update for Cypress ATACB 2011-01-22 18:31:26 -08:00
unusual_datafab.h USB: storage: Use USB_ prefix instead of US_ prefix 2010-10-22 10:21:49 -07:00
unusual_devs.h usb-storage: redo incorrect reads 2011-06-07 09:05:42 -07:00
unusual_ene_ub6250.h Staging: Merge ENE UB6250 SD card codes from keucr to drivers/usb/storage 2011-03-07 13:40:59 -08:00
unusual_freecom.h USB: storage: Use USB_ prefix instead of US_ prefix 2010-10-22 10:21:49 -07:00
unusual_isd200.h USB: storage: Use USB_ prefix instead of US_ prefix 2010-10-22 10:21:49 -07:00
unusual_jumpshot.h USB: storage: Use USB_ prefix instead of US_ prefix 2010-10-22 10:21:49 -07:00
unusual_karma.h USB: storage: Use USB_ prefix instead of US_ prefix 2010-10-22 10:21:49 -07:00
unusual_onetouch.h USB: storage: Use USB_ prefix instead of US_ prefix 2010-10-22 10:21:49 -07:00
unusual_realtek.h usb-storage: fix up the unusual_realtek device list 2011-05-17 11:56:28 -07:00
unusual_sddr09.h USB: storage: Use USB_ prefix instead of US_ prefix 2010-10-22 10:21:49 -07:00
unusual_sddr55.h USB: storage: Use USB_ prefix instead of US_ prefix 2010-10-22 10:21:49 -07:00
unusual_usbat.h USB: storage: Use USB_ prefix instead of US_ prefix 2010-10-22 10:21:49 -07:00
usb.c usb-storage: redo incorrect reads 2011-06-07 09:05:42 -07:00
usb.h usb-storage: redo incorrect reads 2011-06-07 09:05:42 -07:00
usual-tables.c Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 2011-03-16 15:19:35 -07:00