summaryrefslogtreecommitdiff
path: root/drivers/scsi/esp_scsi.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/esp_scsi.c
parente2eddf4d530df745019fded0fedfb78f6d3e33ca (diff)
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/esp_scsi.c')
-rw-r--r--drivers/scsi/esp_scsi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c
index b23101b28bfa..66b6ce10b259 100644
--- a/drivers/scsi/esp_scsi.c
+++ b/drivers/scsi/esp_scsi.c
@@ -2419,10 +2419,9 @@ static int esp_slave_configure(struct scsi_device *dev)
queue_depth = dev->host->cmd_per_lun;
if (goal_tags) {
- scsi_set_tag_type(dev, MSG_ORDERED_TAG);
- scsi_activate_tcq(dev, queue_depth);
+ scsi_adjust_queue_depth(dev, MSG_ORDERED_TAG, queue_depth);
} else {
- scsi_deactivate_tcq(dev, queue_depth);
+ scsi_adjust_queue_depth(dev, 0, queue_depth);
}
tp->flags |= ESP_TGT_DISCONNECT;
@@ -2631,6 +2630,7 @@ struct scsi_host_template scsi_esp_template = {
.use_clustering = ENABLE_CLUSTERING,
.max_sectors = 0xffff,
.skip_settle_delay = 1,
+ .use_blk_tags = 1,
};
EXPORT_SYMBOL(scsi_esp_template);