summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/tmscsim.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2014-11-03 14:09:02 +0100
committerChristoph Hellwig <hch@lst.de>2014-11-12 11:19:43 +0100
commit2ecb204d07ac8debe3893c362415919bc78bebd6 (patch)
treeeef99b324201b21de358dffdab8bfc0453358d5f /drivers/scsi/tmscsim.c
parentscsi: remove use_blk_tcq Scsi_Host field (diff)
downloadlinux-2ecb204d07ac8debe3893c362415919bc78bebd6.tar.xz
linux-2ecb204d07ac8debe3893c362415919bc78bebd6.zip
scsi: always assign block layer tags if enabled
Allow a driver to ask for block layer tags by setting .use_blk_tags in the host template, in which case it will always see a valid value in request->tag, similar to the behavior when using blk-mq. This means even SCSI "untagged" commands will now have a tag, which is especially useful when using a host-wide tag map. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Hannes Reinecke <hare@suse.de>
Diffstat (limited to 'drivers/scsi/tmscsim.c')
-rw-r--r--drivers/scsi/tmscsim.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/tmscsim.c b/drivers/scsi/tmscsim.c
index 547812437a7c..6369f9a282f1 100644
--- a/drivers/scsi/tmscsim.c
+++ b/drivers/scsi/tmscsim.c
@@ -2187,7 +2187,7 @@ static int dc390_slave_configure(struct scsi_device *sdev)
acb->scan_devices = 0;
if (sdev->tagged_supported && (dcb->DevMode & TAG_QUEUEING_)) {
dcb->SyncMode |= EN_TAG_QUEUEING;
- scsi_activate_tcq(sdev, acb->TagMaxNum);
+ scsi_adjust_queue_depth(sdev, 0, acb->TagMaxNum);
}
return 0;
@@ -2209,6 +2209,7 @@ static struct scsi_host_template driver_template = {
.cmd_per_lun = 1,
.use_clustering = ENABLE_CLUSTERING,
.max_sectors = 0x4000, /* 8MiB = 16 * 1024 * 512 */
+ .use_blk_tags = 1,
};
/***********************************************************************