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/ufs | |
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/ufs')
-rw-r--r-- | drivers/scsi/ufs/ufshcd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 9da319130da5..48c7f9e8f256 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c | |||
@@ -2695,7 +2695,8 @@ static void ufshcd_set_queue_depth(struct scsi_device *sdev) | |||
2695 | 2695 | ||
2696 | dev_dbg(hba->dev, "%s: activate tcq with queue depth %d\n", | 2696 | dev_dbg(hba->dev, "%s: activate tcq with queue depth %d\n", |
2697 | __func__, lun_qdepth); | 2697 | __func__, lun_qdepth); |
2698 | scsi_activate_tcq(sdev, lun_qdepth); | 2698 | if (sdev->tagged_supported) |
2699 | scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), lun_qdepth); | ||
2699 | } | 2700 | } |
2700 | 2701 | ||
2701 | /* | 2702 | /* |
@@ -2842,7 +2843,6 @@ static void ufshcd_slave_destroy(struct scsi_device *sdev) | |||
2842 | struct ufs_hba *hba; | 2843 | struct ufs_hba *hba; |
2843 | 2844 | ||
2844 | hba = shost_priv(sdev->host); | 2845 | hba = shost_priv(sdev->host); |
2845 | scsi_deactivate_tcq(sdev, hba->nutrs); | ||
2846 | /* Drop the reference as it won't be needed anymore */ | 2846 | /* Drop the reference as it won't be needed anymore */ |
2847 | if (ufshcd_scsi_to_upiu_lun(sdev->lun) == UFS_UPIU_UFS_DEVICE_WLUN) | 2847 | if (ufshcd_scsi_to_upiu_lun(sdev->lun) == UFS_UPIU_UFS_DEVICE_WLUN) |
2848 | hba->sdev_ufs_device = NULL; | 2848 | hba->sdev_ufs_device = NULL; |
@@ -4235,6 +4235,7 @@ static struct scsi_host_template ufshcd_driver_template = { | |||
4235 | .cmd_per_lun = UFSHCD_CMD_PER_LUN, | 4235 | .cmd_per_lun = UFSHCD_CMD_PER_LUN, |
4236 | .can_queue = UFSHCD_CAN_QUEUE, | 4236 | .can_queue = UFSHCD_CAN_QUEUE, |
4237 | .max_host_blocked = 1, | 4237 | .max_host_blocked = 1, |
4238 | .use_blk_tags = 1, | ||
4238 | }; | 4239 | }; |
4239 | 4240 | ||
4240 | static int ufshcd_config_vreg_load(struct device *dev, struct ufs_vreg *vreg, | 4241 | static int ufshcd_config_vreg_load(struct device *dev, struct ufs_vreg *vreg, |