aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/uas.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2012-09-25 10:47:05 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-25 15:32:23 -0700
commit03939864954cdfccf41c0a8c20e5f2ba623cc482 (patch)
tree53cc4c54fbc0f4dd5c0e8e0139289c8222be316a /drivers/usb/storage/uas.c
parenta0e39e346822d115b2446a7c0032d799c48ac1a5 (diff)
downloadlinux-03939864954cdfccf41c0a8c20e5f2ba623cc482.tar.gz
USB: uas: fix task management
Allocate one tag for task management functions and use it properly. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/storage/uas.c')
-rw-r--r--drivers/usb/storage/uas.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index ab66365adb96ce..1d326c5e6dea76 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -611,7 +611,7 @@ static int uas_eh_task_mgmt(struct scsi_cmnd *cmnd,
{
struct Scsi_Host *shost = cmnd->device->host;
struct uas_dev_info *devinfo = (void *)shost->hostdata[0];
- u16 tag = 9999; /* FIXME */
+ u16 tag = devinfo->qdepth - 1;
memset(&devinfo->response, 0, sizeof(devinfo->response));
if (uas_submit_sense_urb(shost, GFP_NOIO, tag)) {
@@ -701,7 +701,7 @@ static int uas_slave_configure(struct scsi_device *sdev)
{
struct uas_dev_info *devinfo = sdev->hostdata;
scsi_set_tag_type(sdev, MSG_ORDERED_TAG);
- scsi_activate_tcq(sdev, devinfo->qdepth - 2);
+ scsi_activate_tcq(sdev, devinfo->qdepth - 3);
return 0;
}
@@ -880,7 +880,7 @@ static int uas_probe(struct usb_interface *intf, const struct usb_device_id *id)
init_usb_anchor(&devinfo->data_urbs);
uas_configure_endpoints(devinfo);
- result = scsi_init_shared_tag_map(shost, devinfo->qdepth - 2);
+ result = scsi_init_shared_tag_map(shost, devinfo->qdepth - 3);
if (result)
goto free;