aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-11-13 23:35:54 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-11-13 23:35:54 -0500
commitd83763f4a6adb2f417c3288ee903982985ae949c (patch)
tree610a7cfd32935ce4b555dc832c26ddeb13dcd003 /drivers/scsi/scsi.c
parent9aa3d651a9199103eb6451aeb0ac1b66a6d770a6 (diff)
parent0a5149ba02bdf75281b8bc94cf6dfa94c527fa6f (diff)
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull final round of SCSI updates from James Bottomley: "Sorry for the delay in this patch which was mostly caused by getting the merger of the mpt2/mpt3sas driver, which was seen as an essential item of maintenance work to do before the drivers diverge too much. Unfortunately, this caused a compile failure (detected by linux-next), which then had to be fixed up and incubated. In addition to the mpt2/3sas rework, there are updates from pm80xx, lpfc, bnx2fc, hpsa, ipr, aacraid, megaraid_sas, storvsc and ufs plus an assortment of changes including some year 2038 issues, a fix for a remove before detach issue in some drivers and a couple of other minor issues" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (141 commits) mpt3sas: fix inline markers on non inline function declarations sd: Clear PS bit before Mode Select. ibmvscsi: set max_lun to 32 ibmvscsi: display default value for max_id, max_lun and max_channel. mptfusion: don't allow negative bytes in kbuf_alloc_2_sgl() scsi: pmcraid: replace struct timeval with ktime_get_real_seconds() mvumi: 64bit value for seconds_since1970 be2iscsi: Fix bogus WARN_ON length check scsi_scan: don't dump trace when scsi_prep_async_scan() is called twice mpt3sas: Bump mpt3sas driver version to 09.102.00.00 mpt3sas: Single driver module which supports both SAS 2.0 & SAS 3.0 HBAs mpt2sas, mpt3sas: Update the driver versions mpt3sas: setpci reset kernel oops fix mpt3sas: Added OEM Gen2 PnP ID branding names mpt3sas: Refcount fw_events and fix unsafe list usage mpt3sas: Refcount sas_device objects and fix unsafe list usage mpt3sas: sysfs attribute to report Backup Rail Monitor Status mpt3sas: Ported WarpDrive product SSS6200 support mpt3sas: fix for driver fails EEH, recovery from injected pci bus error mpt3sas: Manage MSI-X vectors according to HBA device type ...
Diffstat (limited to 'drivers/scsi/scsi.c')
-rw-r--r--drivers/scsi/scsi.c27
1 files changed, 3 insertions, 24 deletions
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 207d6a7a1bd0..d07fb653f5dc 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -616,32 +616,11 @@ void scsi_finish_command(struct scsi_cmnd *cmd)
616 */ 616 */
617int scsi_change_queue_depth(struct scsi_device *sdev, int depth) 617int scsi_change_queue_depth(struct scsi_device *sdev, int depth)
618{ 618{
619 unsigned long flags; 619 if (depth > 0) {
620 620 sdev->queue_depth = depth;
621 if (depth <= 0) 621 wmb();
622 goto out;
623
624 spin_lock_irqsave(sdev->request_queue->queue_lock, flags);
625
626 /*
627 * Check to see if the queue is managed by the block layer.
628 * If it is, and we fail to adjust the depth, exit.
629 *
630 * Do not resize the tag map if it is a host wide share bqt,
631 * because the size should be the hosts's can_queue. If there
632 * is more IO than the LLD's can_queue (so there are not enuogh
633 * tags) request_fn's host queue ready check will handle it.
634 */
635 if (!shost_use_blk_mq(sdev->host) && !sdev->host->bqt) {
636 if (blk_queue_tagged(sdev->request_queue) &&
637 blk_queue_resize_tags(sdev->request_queue, depth) != 0)
638 goto out_unlock;
639 } 622 }
640 623
641 sdev->queue_depth = depth;
642out_unlock:
643 spin_unlock_irqrestore(sdev->request_queue->queue_lock, flags);
644out:
645 return sdev->queue_depth; 624 return sdev->queue_depth;
646} 625}
647EXPORT_SYMBOL(scsi_change_queue_depth); 626EXPORT_SYMBOL(scsi_change_queue_depth);