scsi: always assign block layer tags if enabled
[linux-2.6-block.git] / drivers / usb / storage / uas.c
index 89b24349269efb66e72bd94b1dd080c81d6138b8..ee69b82fc7d166457bf926b6fc5620d7e795a1be 100644 (file)
@@ -181,7 +181,7 @@ static int uas_get_tag(struct scsi_cmnd *cmnd)
 {
        int tag;
 
-       if (blk_rq_tagged(cmnd->request))
+       if (cmnd->flags & SCMD_TAGGED)
                tag = cmnd->request->tag + 2;
        else
                tag = 1;
@@ -799,8 +799,7 @@ static int uas_slave_configure(struct scsi_device *sdev)
        if (devinfo->flags & US_FL_NO_REPORT_OPCODES)
                sdev->no_report_opcodes = 1;
 
-       scsi_set_tag_type(sdev, MSG_ORDERED_TAG);
-       scsi_activate_tcq(sdev, devinfo->qdepth - 2);
+       scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, devinfo->qdepth - 2);
        return 0;
 }
 
@@ -817,7 +816,6 @@ static struct scsi_host_template uas_host_template = {
        .sg_tablesize = SG_NONE,
        .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
@@ -825,6 +823,7 @@ static struct scsi_host_template uas_host_template = {
         * allocator.
         */
        .disable_blk_mq = true,
+       .use_blk_tags = 1,
 };
 
 #define UNUSUAL_DEV(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax, \