aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt2sas/mpt2sas_scsih.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_scsih.c')
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_scsih.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index 8dc682f00fd2..55ee014a7e08 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -1099,11 +1099,12 @@ _scsih_build_scatter_gather(struct MPT2SAS_ADAPTER *ioc,
1099 * _scsih_change_queue_depth - setting device queue depth 1099 * _scsih_change_queue_depth - setting device queue depth
1100 * @sdev: scsi device struct 1100 * @sdev: scsi device struct
1101 * @qdepth: requested queue depth 1101 * @qdepth: requested queue depth
1102 * @reason: calling context
1102 * 1103 *
1103 * Returns queue depth. 1104 * Returns queue depth.
1104 */ 1105 */
1105static int 1106static int
1106_scsih_change_queue_depth(struct scsi_device *sdev, int qdepth) 1107_scsih_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason)
1107{ 1108{
1108 struct Scsi_Host *shost = sdev->host; 1109 struct Scsi_Host *shost = sdev->host;
1109 int max_depth; 1110 int max_depth;
@@ -1114,6 +1115,9 @@ _scsih_change_queue_depth(struct scsi_device *sdev, int qdepth)
1114 struct _sas_device *sas_device; 1115 struct _sas_device *sas_device;
1115 unsigned long flags; 1116 unsigned long flags;
1116 1117
1118 if (reason != SCSI_QDEPTH_DEFAULT)
1119 return -EOPNOTSUPP;
1120
1117 max_depth = shost->can_queue; 1121 max_depth = shost->can_queue;
1118 1122
1119 /* limit max device queue for SATA to 32 */ 1123 /* limit max device queue for SATA to 32 */
@@ -1569,7 +1573,7 @@ _scsih_slave_configure(struct scsi_device *sdev)
1569 r_level, raid_device->handle, 1573 r_level, raid_device->handle,
1570 (unsigned long long)raid_device->wwid, 1574 (unsigned long long)raid_device->wwid,
1571 raid_device->num_pds, ds); 1575 raid_device->num_pds, ds);
1572 _scsih_change_queue_depth(sdev, qdepth); 1576 _scsih_change_queue_depth(sdev, qdepth, SCSI_QDEPTH_DEFAULT);
1573 return 0; 1577 return 0;
1574 } 1578 }
1575 1579
@@ -1615,7 +1619,7 @@ _scsih_slave_configure(struct scsi_device *sdev)
1615 _scsih_display_sata_capabilities(ioc, sas_device, sdev); 1619 _scsih_display_sata_capabilities(ioc, sas_device, sdev);
1616 } 1620 }
1617 1621
1618 _scsih_change_queue_depth(sdev, qdepth); 1622 _scsih_change_queue_depth(sdev, qdepth, SCSI_QDEPTH_DEFAULT);
1619 1623
1620 if (ssp_target) 1624 if (ssp_target)
1621 sas_read_port_mode_page(sdev); 1625 sas_read_port_mode_page(sdev);