|
@@ -67,8 +67,9 @@ static inline void scsi_activate_tcq(struct scsi_device *sdev, int depth)
|
|
if (!sdev->tagged_supported)
|
|
if (!sdev->tagged_supported)
|
|
return;
|
|
return;
|
|
|
|
|
|
- if (!shost_use_blk_mq(sdev->host) &&
|
|
|
|
- !blk_queue_tagged(sdev->request_queue))
|
|
|
|
|
|
+ if (shost_use_blk_mq(sdev->host))
|
|
|
|
+ queue_flag_set_unlocked(QUEUE_FLAG_QUEUED, sdev->request_queue);
|
|
|
|
+ else if (!blk_queue_tagged(sdev->request_queue))
|
|
blk_queue_init_tags(sdev->request_queue, depth,
|
|
blk_queue_init_tags(sdev->request_queue, depth,
|
|
sdev->host->bqt);
|
|
sdev->host->bqt);
|
|
|
|
|
|
@@ -81,8 +82,7 @@ static inline void scsi_activate_tcq(struct scsi_device *sdev, int depth)
|
|
**/
|
|
**/
|
|
static inline void scsi_deactivate_tcq(struct scsi_device *sdev, int depth)
|
|
static inline void scsi_deactivate_tcq(struct scsi_device *sdev, int depth)
|
|
{
|
|
{
|
|
- if (!shost_use_blk_mq(sdev->host) &&
|
|
|
|
- blk_queue_tagged(sdev->request_queue))
|
|
|
|
|
|
+ if (blk_queue_tagged(sdev->request_queue))
|
|
blk_queue_free_tags(sdev->request_queue);
|
|
blk_queue_free_tags(sdev->request_queue);
|
|
scsi_adjust_queue_depth(sdev, 0, depth);
|
|
scsi_adjust_queue_depth(sdev, 0, depth);
|
|
}
|
|
}
|