From: Christoph Hellwig Date: Fri, 3 Oct 2014 08:47:09 +0000 (-0700) Subject: [SCSI] uas: disable use of blk-mq I/O path X-Git-Tag: firefly_0821_release~176^2~3146^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2c2d831c81ec75a7b0d8e28caa8e3d9c1fe546f9;p=firefly-linux-kernel-4.4.55.git [SCSI] uas: disable use of blk-mq I/O path The uas driver uses the block layer tag for USB3 stream IDs. With blk-mq we can get larger tag numbers that the queue depth, which breaks this assumption. A fix is under way for 3.18, but sits on top of large changes so can't easily be backported. Set the disable_blk_mq path so that a uas device can't easily crash the system when using blk-mq for SCSI. Signed-off-by: Christoph Hellwig Acked-by: Hans de Goede Signed-off-by: James Bottomley --- diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 3f42785f653c..9bfa7252f7f9 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers/usb/storage/uas.c @@ -970,6 +970,13 @@ static struct scsi_host_template uas_host_template = { .cmd_per_lun = 1, /* until we override it */ .skip_settle_delay = 1, .ordered_tag = 1, + + /* + * The uas drivers expects tags not to be bigger than the maximum + * per-device queue depth, which is not true with the blk-mq tag + * allocator. + */ + .disable_blk_mq = true, }; #define UNUSUAL_DEV(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax, \