usb/uas: use unique tags for all LUNs
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Mon, 19 Dec 2011 16:06:08 +0000 (17:06 +0100)
committerLuis Henriques <luis.henriques@canonical.com>
Mon, 30 Apr 2012 18:15:14 +0000 (19:15 +0100)
commite1d6b6cad73a450503f1696b54f356a5cbaca8dd
treea3cc983ee2e45bea25f2a397db41cc4a7c6f462b
parenteafe3cf13dd5920112174a3bb3b0f1881d3443fe
usb/uas: use unique tags for all LUNs

BugLink: http://bugs.launchpad.net/bugs/901215

I observed that on a device with multiple LUNs UAS was re-using the same
tag number for requests which were issued at the same time to both LUNs.
This patch uses scsi_init_shared_tag_map() to use unique tags for all
LUNs. With this patch I haven't seen the same tag number during the init
sequence anymore. Tag 1 is used for devices which do not adverise
command queueing.
This patch initilizes the queue before adding the scsi host like the
other two user in tree.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
(cherry picked from commit dae51546b6564b06cbae4191d4f2dee7136be3c1)

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Herton Krzesinski <herton.krzesinski@canonical.com>
drivers/usb/storage/uas.c