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/scsi/bfa | |
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/scsi/bfa')
-rw-r--r-- | drivers/scsi/bfa/bfad_im.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/scsi/bfa/bfad_im.c b/drivers/scsi/bfa/bfad_im.c index 99280e89c289..d8e43c81d19b 100644 --- a/drivers/scsi/bfa/bfad_im.c +++ b/drivers/scsi/bfa/bfad_im.c | |||
@@ -776,11 +776,7 @@ bfad_thread_workq(struct bfad_s *bfad) | |||
776 | static int | 776 | static int |
777 | bfad_im_slave_configure(struct scsi_device *sdev) | 777 | bfad_im_slave_configure(struct scsi_device *sdev) |
778 | { | 778 | { |
779 | if (sdev->tagged_supported) | 779 | scsi_adjust_queue_depth(sdev, 0, bfa_lun_queue_depth); |
780 | scsi_activate_tcq(sdev, bfa_lun_queue_depth); | ||
781 | else | ||
782 | scsi_deactivate_tcq(sdev, bfa_lun_queue_depth); | ||
783 | |||
784 | return 0; | 780 | return 0; |
785 | } | 781 | } |
786 | 782 | ||
@@ -804,6 +800,7 @@ struct scsi_host_template bfad_im_scsi_host_template = { | |||
804 | .shost_attrs = bfad_im_host_attrs, | 800 | .shost_attrs = bfad_im_host_attrs, |
805 | .max_sectors = BFAD_MAX_SECTORS, | 801 | .max_sectors = BFAD_MAX_SECTORS, |
806 | .vendor_id = BFA_PCI_VENDOR_ID_BROCADE, | 802 | .vendor_id = BFA_PCI_VENDOR_ID_BROCADE, |
803 | .use_blk_tags = 1, | ||
807 | }; | 804 | }; |
808 | 805 | ||
809 | struct scsi_host_template bfad_im_vport_template = { | 806 | struct scsi_host_template bfad_im_vport_template = { |
@@ -825,6 +822,7 @@ struct scsi_host_template bfad_im_vport_template = { | |||
825 | .use_clustering = ENABLE_CLUSTERING, | 822 | .use_clustering = ENABLE_CLUSTERING, |
826 | .shost_attrs = bfad_im_vport_attrs, | 823 | .shost_attrs = bfad_im_vport_attrs, |
827 | .max_sectors = BFAD_MAX_SECTORS, | 824 | .max_sectors = BFAD_MAX_SECTORS, |
825 | .use_blk_tags = 1, | ||
828 | }; | 826 | }; |
829 | 827 | ||
830 | bfa_status_t | 828 | bfa_status_t |