diff options
Diffstat (limited to 'include/scsi/scsi_tcq.h')
-rw-r--r-- | include/scsi/scsi_tcq.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/scsi/scsi_tcq.h b/include/scsi/scsi_tcq.h index e64583560701..56ed843969ca 100644 --- a/include/scsi/scsi_tcq.h +++ b/include/scsi/scsi_tcq.h | |||
@@ -67,8 +67,9 @@ static inline void scsi_activate_tcq(struct scsi_device *sdev, int depth) | |||
67 | if (!sdev->tagged_supported) | 67 | if (!sdev->tagged_supported) |
68 | return; | 68 | return; |
69 | 69 | ||
70 | if (!shost_use_blk_mq(sdev->host) && | 70 | if (shost_use_blk_mq(sdev->host)) |
71 | !blk_queue_tagged(sdev->request_queue)) | 71 | queue_flag_set_unlocked(QUEUE_FLAG_QUEUED, sdev->request_queue); |
72 | else if (!blk_queue_tagged(sdev->request_queue)) | ||
72 | blk_queue_init_tags(sdev->request_queue, depth, | 73 | blk_queue_init_tags(sdev->request_queue, depth, |
73 | sdev->host->bqt); | 74 | sdev->host->bqt); |
74 | 75 | ||
@@ -81,8 +82,7 @@ static inline void scsi_activate_tcq(struct scsi_device *sdev, int depth) | |||
81 | **/ | 82 | **/ |
82 | static inline void scsi_deactivate_tcq(struct scsi_device *sdev, int depth) | 83 | static inline void scsi_deactivate_tcq(struct scsi_device *sdev, int depth) |
83 | { | 84 | { |
84 | if (!shost_use_blk_mq(sdev->host) && | 85 | if (blk_queue_tagged(sdev->request_queue)) |
85 | blk_queue_tagged(sdev->request_queue)) | ||
86 | blk_queue_free_tags(sdev->request_queue); | 86 | blk_queue_free_tags(sdev->request_queue); |
87 | scsi_adjust_queue_depth(sdev, 0, depth); | 87 | scsi_adjust_queue_depth(sdev, 0, depth); |
88 | } | 88 | } |