diff options
author | Christoph Hellwig <hch@lst.de> | 2014-11-03 08:09:02 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-11-12 05:19:43 -0500 |
commit | 2ecb204d07ac8debe3893c362415919bc78bebd6 (patch) | |
tree | eef99b324201b21de358dffdab8bfc0453358d5f /drivers/target/loopback/tcm_loop.c | |
parent | e2eddf4d530df745019fded0fedfb78f6d3e33ca (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/target/loopback/tcm_loop.c')
-rw-r--r-- | drivers/target/loopback/tcm_loop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c index e30932f989a1..120a851df0d7 100644 --- a/drivers/target/loopback/tcm_loop.c +++ b/drivers/target/loopback/tcm_loop.c | |||
@@ -407,7 +407,6 @@ static int tcm_loop_slave_alloc(struct scsi_device *sd) | |||
407 | static int tcm_loop_slave_configure(struct scsi_device *sd) | 407 | static int tcm_loop_slave_configure(struct scsi_device *sd) |
408 | { | 408 | { |
409 | if (sd->tagged_supported) { | 409 | if (sd->tagged_supported) { |
410 | scsi_activate_tcq(sd, sd->queue_depth); | ||
411 | scsi_adjust_queue_depth(sd, MSG_SIMPLE_TAG, | 410 | scsi_adjust_queue_depth(sd, MSG_SIMPLE_TAG, |
412 | sd->host->cmd_per_lun); | 411 | sd->host->cmd_per_lun); |
413 | } else { | 412 | } else { |
@@ -437,6 +436,7 @@ static struct scsi_host_template tcm_loop_driver_template = { | |||
437 | .slave_alloc = tcm_loop_slave_alloc, | 436 | .slave_alloc = tcm_loop_slave_alloc, |
438 | .slave_configure = tcm_loop_slave_configure, | 437 | .slave_configure = tcm_loop_slave_configure, |
439 | .module = THIS_MODULE, | 438 | .module = THIS_MODULE, |
439 | .use_blk_tags = 1, | ||
440 | }; | 440 | }; |
441 | 441 | ||
442 | static int tcm_loop_driver_probe(struct device *dev) | 442 | static int tcm_loop_driver_probe(struct device *dev) |