aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_os.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2014-11-03 08:09:02 -0500
committerChristoph Hellwig <hch@lst.de>2014-11-12 05:19:43 -0500
commit2ecb204d07ac8debe3893c362415919bc78bebd6 (patch)
treeeef99b324201b21de358dffdab8bfc0453358d5f /drivers/scsi/qla2xxx/qla_os.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/qla2xxx/qla_os.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 1e34fcf68e77..eb0465305f8d 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -269,6 +269,7 @@ struct scsi_host_template qla2xxx_driver_template = {
269 .shost_attrs = qla2x00_host_attrs, 269 .shost_attrs = qla2x00_host_attrs,
270 270
271 .supported_mode = MODE_INITIATOR, 271 .supported_mode = MODE_INITIATOR,
272 .use_blk_tags = 1,
272}; 273};
273 274
274static struct scsi_transport_template *qla2xxx_transport_template = NULL; 275static struct scsi_transport_template *qla2xxx_transport_template = NULL;
@@ -1404,10 +1405,7 @@ qla2xxx_slave_configure(struct scsi_device *sdev)
1404 if (IS_T10_PI_CAPABLE(vha->hw)) 1405 if (IS_T10_PI_CAPABLE(vha->hw))
1405 blk_queue_update_dma_alignment(sdev->request_queue, 0x7); 1406 blk_queue_update_dma_alignment(sdev->request_queue, 0x7);
1406 1407
1407 if (sdev->tagged_supported) 1408 scsi_adjust_queue_depth(sdev, 0, req->max_q_depth);
1408 scsi_activate_tcq(sdev, req->max_q_depth);
1409 else
1410 scsi_deactivate_tcq(sdev, req->max_q_depth);
1411 return 0; 1409 return 0;
1412} 1410}
1413 1411