linux-kernel-test/drivers/usb/storage
Sebastian Andrzej Siewior e4d8318a85 usb/uas: make sure data urb is gone if we receive status before that
Just run into the following:
- new disk arrived in the system
- udev couldn't wait to get its hands on to to run ata_id /dev/sda
- this sent the cdb 0xa1 to the device.
- my UAS-gadget recevied the cdb and had no idea what to do with it. It
  decided to send a status URB back with sense set to invalid opcode.
- the host side received it status and completed the scsi command.
- the host sent another scsi with 4kib data buffer
- Now I was confused why the data transfer is only 512 bytes instead of
  4kib since the host is always allocating the complete transfer in one
  go.
- Finally the system crashed while walking through the sg list.

This patch adds three new flags in order to distinguish between DATA
URB completed and outstanding. If we receive status before data, we
cancel data and let data complete the command.
This solves the problem for IN and OUT transfers but does not work for
BIDI.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2012-02-02 14:51:30 -08:00
..
alauda.c usb: Disable dynamic id of USB storage subdrivers 2012-01-24 14:31:03 -08:00
cypress_atacb.c usb: Disable dynamic id of USB storage subdrivers 2012-01-24 14:31:03 -08:00
datafab.c usb: Disable dynamic id of USB storage subdrivers 2012-01-24 14:31:03 -08:00
debug.c
debug.h
ene_ub6250.c usb: Disable dynamic id of USB storage subdrivers 2012-01-24 14:31:03 -08:00
freecom.c usb: Disable dynamic id of USB storage subdrivers 2012-01-24 14:31:03 -08:00
initializers.c
initializers.h
isd200.c usb: Disable dynamic id of USB storage subdrivers 2012-01-24 14:31:03 -08:00
jumpshot.c usb: Disable dynamic id of USB storage subdrivers 2012-01-24 14:31:03 -08:00
karma.c usb: Disable dynamic id of USB storage subdrivers 2012-01-24 14:31:03 -08:00
Kconfig usb-storage: fix realtek cr configuration 2011-09-18 01:33:07 -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: Disable dynamic id of USB storage subdrivers 2012-01-24 14:31:03 -08:00
option_ms.c usb: Add module.h to drivers/usb consumers who really use it. 2011-10-31 19:31:25 -04:00
option_ms.h
protocol.c usb-storage: Accept 8020i-protocol commands longer than 12 bytes 2011-11-14 17:05:03 -08:00
protocol.h
realtek_cr.c usb: Disable dynamic id of USB storage subdrivers 2012-01-24 14:31:03 -08:00
scsiglue.c Fix common misspellings 2011-03-31 11:26:23 -03:00
scsiglue.h
sddr09.c usb: Disable dynamic id of USB storage subdrivers 2012-01-24 14:31:03 -08:00
sddr55.c usb: Disable dynamic id of USB storage subdrivers 2012-01-24 14:31:03 -08:00
shuttle_usbat.c usb: Disable dynamic id of USB storage subdrivers 2012-01-24 14:31:03 -08:00
sierra_ms.c usb: Add module.h to drivers/usb consumers who really use it. 2011-10-31 19:31:25 -04:00
sierra_ms.h
transport.c usb: Add export.h for EXPORT_SYMBOL/THIS_MODULE where needed 2011-10-31 19:31:25 -04:00
transport.h
uas.c usb/uas: make sure data urb is gone if we receive status before that 2012-02-02 14:51:30 -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 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-01-08 13:21:22 -08: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: Re-enable usb-storage support dynamic id 2012-01-24 14:31:04 -08: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