linux/drivers/usb/storage
Hans de Goede e28e2f2f7c uas: Make uas work with blk-mq
With uas over usb-3 the tags inside the uas iu-s must match the usb-3 stream
ids, and those go from 1 - qdepth.

Before blk-mq calling scsi_activate_tcq(sdev, qdepth) guaranteed that we would
only get cmnd->request->tag from 0 - (qdepth - 1), and we used those as
uas-tags / stream-ids.

With blk-mq however we are guaranteed to never get more then qdepth commands
queued at the same time, but the cmnd->request->tag values may be much larger,
which breaks uas.

This commit fixes this by generating uas tags in the 1 - qdepth range ourselves
instead of using cmnd->request->tag.

While touching all involved code anyways also rename the uas_cmd_info stream
field to uas_tag, because when using uas over usb-2 streams are not used.

Cc: Christoph Hellwig <hch@infradead.org>
Reported-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>

--
Changes in v2:
-Remove ".disable_blk_mq = true" from uas_host_template
Changes in v3:
-Rebased on top of Linus' current master branch
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 15:34:00 -08:00
..
alauda.c USB: storage: use %*ph specifier to dump small buffers 2014-09-23 22:15:18 -07:00
cypress_atacb.c
datafab.c
debug.c
debug.h
ene_ub6250.c staging: keucr: remove driver 2014-07-23 19:01:36 -07:00
freecom.c
initializers.c storage: Replace magic number with define in usb_stor_euscsi_init() 2014-09-23 22:29:27 -07:00
initializers.h
isd200.c
jumpshot.c
karma.c
Kconfig SCSI misc on 20140806 2014-08-06 20:10:32 -07:00
Makefile
onetouch.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
option_ms.c
option_ms.h
protocol.c
protocol.h
realtek_cr.c usb: Fixed a few typos 2014-09-23 22:15:18 -07:00
scsiglue.c usb: Fixed a few typos 2014-09-23 22:15:18 -07:00
scsiglue.h
sddr09.c USB: storage: use %*ph specifier to dump small buffers 2014-09-23 22:15:18 -07:00
sddr55.c
shuttle_usbat.c usb: storage: shuttle_usbat: fix discs being detected twice 2014-05-03 18:04:28 -04:00
sierra_ms.c
sierra_ms.h
transport.c
transport.h
uas-detect.h uas: Add missing le16_to_cpu calls to asm1051 / asm1053 usb-id check 2014-09-11 14:21:43 -07:00
uas.c uas: Make uas work with blk-mq 2014-11-03 15:34:00 -08:00
unusual_alauda.h
unusual_cypress.h usb-storage: restrict bcdDevice range for Super Top in Cypress ATACB 2014-02-04 12:59:14 -08:00
unusual_datafab.h
unusual_devs.h storage: Add quirk for another SCM-based USB-SCSI converter 2014-09-23 22:29:27 -07:00
unusual_ene_ub6250.h
unusual_freecom.h
unusual_isd200.h
unusual_jumpshot.h
unusual_karma.h
unusual_onetouch.h
unusual_realtek.h
unusual_sddr09.h
unusual_sddr55.h
unusual_uas.h uas: Add another ASM1051 usb-id to the uas blacklist 2014-09-23 21:40:48 -07:00
unusual_usbat.h
usb.c USB patches for 3.18-rc1 2014-10-08 06:47:31 -04:00
usb.h usb-storage: Modify and export adjust_quirks so that it can be used by uas 2014-03-04 15:38:17 -08:00
usual-tables.c