|
@@ -902,11 +902,20 @@ void scsi_adjust_queue_depth(struct scsi_device *sdev, int tagged, int tags)
|
|
|
|
|
|
spin_lock_irqsave(sdev->request_queue->queue_lock, flags);
|
|
|
|
|
|
- /* Check to see if the queue is managed by the block layer.
|
|
|
- * If it is, and we fail to adjust the depth, exit. */
|
|
|
- if (blk_queue_tagged(sdev->request_queue) &&
|
|
|
- blk_queue_resize_tags(sdev->request_queue, tags) != 0)
|
|
|
- goto out;
|
|
|
+ /*
|
|
|
+ * Check to see if the queue is managed by the block layer.
|
|
|
+ * If it is, and we fail to adjust the depth, exit.
|
|
|
+ *
|
|
|
+ * Do not resize the tag map if it is a host wide share bqt,
|
|
|
+ * because the size should be the hosts's can_queue. If there
|
|
|
+ * is more IO than the LLD's can_queue (so there are not enuogh
|
|
|
+ * tags) request_fn's host queue ready check will handle it.
|
|
|
+ */
|
|
|
+ if (!sdev->host->bqt) {
|
|
|
+ if (blk_queue_tagged(sdev->request_queue) &&
|
|
|
+ blk_queue_resize_tags(sdev->request_queue, tags) != 0)
|
|
|
+ goto out;
|
|
|
+ }
|
|
|
|
|
|
sdev->queue_depth = tags;
|
|
|
switch (tagged) {
|