]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/scsi/scsi.c
Merge tag 'v4.4.8' into release/qcomlt-4.4
[karo-tx-linux.git] / drivers / scsi / scsi.c
index 207d6a7a1bd0bce29ca748c8f3a4cd2aee6ad97a..d07fb653f5dc3348c41bbc68597489d2c4b25180 100644 (file)
@@ -616,32 +616,11 @@ void scsi_finish_command(struct scsi_cmnd *cmd)
  */
 int scsi_change_queue_depth(struct scsi_device *sdev, int depth)
 {
-       unsigned long flags;
-
-       if (depth <= 0)
-               goto out;
-
-       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.
-        *
-        * 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 (!shost_use_blk_mq(sdev->host) && !sdev->host->bqt) {
-               if (blk_queue_tagged(sdev->request_queue) &&
-                   blk_queue_resize_tags(sdev->request_queue, depth) != 0)
-                       goto out_unlock;
+       if (depth > 0) {
+               sdev->queue_depth = depth;
+               wmb();
        }
 
-       sdev->queue_depth = depth;
-out_unlock:
-       spin_unlock_irqrestore(sdev->request_queue->queue_lock, flags);
-out:
        return sdev->queue_depth;
 }
 EXPORT_SYMBOL(scsi_change_queue_depth);