aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi.c')
-rw-r--r--drivers/scsi/scsi.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 36c92f961e15..5276e73c58fc 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -902,11 +902,20 @@ void scsi_adjust_queue_depth(struct scsi_device *sdev, int tagged, int tags)
902 902
903 spin_lock_irqsave(sdev->request_queue->queue_lock, flags); 903 spin_lock_irqsave(sdev->request_queue->queue_lock, flags);
904 904
905 /* Check to see if the queue is managed by the block layer. 905 /*
906 * If it is, and we fail to adjust the depth, exit. */ 906 * Check to see if the queue is managed by the block layer.
907 if (blk_queue_tagged(sdev->request_queue) && 907 * If it is, and we fail to adjust the depth, exit.
908 blk_queue_resize_tags(sdev->request_queue, tags) != 0) 908 *
909 goto out; 909 * Do not resize the tag map if it is a host wide share bqt,
910 * because the size should be the hosts's can_queue. If there
911 * is more IO than the LLD's can_queue (so there are not enuogh
912 * tags) request_fn's host queue ready check will handle it.
913 */
914 if (!sdev->host->bqt) {
915 if (blk_queue_tagged(sdev->request_queue) &&
916 blk_queue_resize_tags(sdev->request_queue, tags) != 0)
917 goto out;
918 }
910 919
911 sdev->queue_depth = tags; 920 sdev->queue_depth = tags;
912 switch (tagged) { 921 switch (tagged) {