diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/3w-9xxx.c | 6 | ||||
-rw-r--r-- | drivers/scsi/3w-xxxx.c | 6 | ||||
-rw-r--r-- | drivers/scsi/53c700.c | 7 | ||||
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 6 | ||||
-rw-r--r-- | drivers/scsi/arcmsr/arcmsr_hba.c | 5 | ||||
-rw-r--r-- | drivers/scsi/hptiop.c | 5 | ||||
-rw-r--r-- | drivers/scsi/ibmvscsi/ibmvfc.c | 7 | ||||
-rw-r--r-- | drivers/scsi/ibmvscsi/ibmvscsi.c | 7 | ||||
-rw-r--r-- | drivers/scsi/ipr.c | 7 | ||||
-rw-r--r-- | drivers/scsi/libfc/fc_fcp.c | 5 | ||||
-rw-r--r-- | drivers/scsi/libiscsi.c | 5 | ||||
-rw-r--r-- | drivers/scsi/libsas/sas_scsi_host.c | 6 | ||||
-rw-r--r-- | drivers/scsi/megaraid/megaraid_mbox.c | 7 | ||||
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_scsih.c | 10 | ||||
-rw-r--r-- | drivers/scsi/pmcraid.c | 7 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 7 | ||||
-rw-r--r-- | drivers/scsi/scsi_sysfs.c | 3 |
17 files changed, 85 insertions, 21 deletions
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c index 36c21b19e5d7..2d16d49fd3cd 100644 --- a/drivers/scsi/3w-9xxx.c +++ b/drivers/scsi/3w-9xxx.c | |||
@@ -186,8 +186,12 @@ static ssize_t twa_show_stats(struct device *dev, | |||
186 | } /* End twa_show_stats() */ | 186 | } /* End twa_show_stats() */ |
187 | 187 | ||
188 | /* This function will set a devices queue depth */ | 188 | /* This function will set a devices queue depth */ |
189 | static int twa_change_queue_depth(struct scsi_device *sdev, int queue_depth) | 189 | static int twa_change_queue_depth(struct scsi_device *sdev, int queue_depth, |
190 | int reason) | ||
190 | { | 191 | { |
192 | if (reason != SCSI_QDEPTH_DEFAULT) | ||
193 | return -EOPNOTSUPP; | ||
194 | |||
191 | if (queue_depth > TW_Q_LENGTH-2) | 195 | if (queue_depth > TW_Q_LENGTH-2) |
192 | queue_depth = TW_Q_LENGTH-2; | 196 | queue_depth = TW_Q_LENGTH-2; |
193 | scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, queue_depth); | 197 | scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, queue_depth); |
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c index faa0fcfed71e..d224294c38fb 100644 --- a/drivers/scsi/3w-xxxx.c +++ b/drivers/scsi/3w-xxxx.c | |||
@@ -521,8 +521,12 @@ static ssize_t tw_show_stats(struct device *dev, struct device_attribute *attr, | |||
521 | } /* End tw_show_stats() */ | 521 | } /* End tw_show_stats() */ |
522 | 522 | ||
523 | /* This function will set a devices queue depth */ | 523 | /* This function will set a devices queue depth */ |
524 | static int tw_change_queue_depth(struct scsi_device *sdev, int queue_depth) | 524 | static int tw_change_queue_depth(struct scsi_device *sdev, int queue_depth, |
525 | int reason) | ||
525 | { | 526 | { |
527 | if (reason != SCSI_QDEPTH_DEFAULT) | ||
528 | return -EOPNOTSUPP; | ||
529 | |||
526 | if (queue_depth > TW_Q_LENGTH-2) | 530 | if (queue_depth > TW_Q_LENGTH-2) |
527 | queue_depth = TW_Q_LENGTH-2; | 531 | queue_depth = TW_Q_LENGTH-2; |
528 | scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, queue_depth); | 532 | scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, queue_depth); |
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c index f5a9addb7050..6c60a8060c58 100644 --- a/drivers/scsi/53c700.c +++ b/drivers/scsi/53c700.c | |||
@@ -175,7 +175,7 @@ STATIC void NCR_700_chip_reset(struct Scsi_Host *host); | |||
175 | STATIC int NCR_700_slave_alloc(struct scsi_device *SDpnt); | 175 | STATIC int NCR_700_slave_alloc(struct scsi_device *SDpnt); |
176 | STATIC int NCR_700_slave_configure(struct scsi_device *SDpnt); | 176 | STATIC int NCR_700_slave_configure(struct scsi_device *SDpnt); |
177 | STATIC void NCR_700_slave_destroy(struct scsi_device *SDpnt); | 177 | STATIC void NCR_700_slave_destroy(struct scsi_device *SDpnt); |
178 | static int NCR_700_change_queue_depth(struct scsi_device *SDpnt, int depth); | 178 | static int NCR_700_change_queue_depth(struct scsi_device *SDpnt, int depth, int reason); |
179 | static int NCR_700_change_queue_type(struct scsi_device *SDpnt, int depth); | 179 | static int NCR_700_change_queue_type(struct scsi_device *SDpnt, int depth); |
180 | 180 | ||
181 | STATIC struct device_attribute *NCR_700_dev_attrs[]; | 181 | STATIC struct device_attribute *NCR_700_dev_attrs[]; |
@@ -2082,8 +2082,11 @@ NCR_700_slave_destroy(struct scsi_device *SDp) | |||
2082 | } | 2082 | } |
2083 | 2083 | ||
2084 | static int | 2084 | static int |
2085 | NCR_700_change_queue_depth(struct scsi_device *SDp, int depth) | 2085 | NCR_700_change_queue_depth(struct scsi_device *SDp, int depth, int reason) |
2086 | { | 2086 | { |
2087 | if (reason != SCSI_QDEPTH_DEFAULT) | ||
2088 | return -EOPNOTSUPP; | ||
2089 | |||
2087 | if (depth > NCR_700_MAX_TAGS) | 2090 | if (depth > NCR_700_MAX_TAGS) |
2088 | depth = NCR_700_MAX_TAGS; | 2091 | depth = NCR_700_MAX_TAGS; |
2089 | 2092 | ||
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 9b97c3e016fe..e9373a2d14fa 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -472,8 +472,12 @@ static int aac_slave_configure(struct scsi_device *sdev) | |||
472 | * total capacity and the queue depth supported by the target device. | 472 | * total capacity and the queue depth supported by the target device. |
473 | */ | 473 | */ |
474 | 474 | ||
475 | static int aac_change_queue_depth(struct scsi_device *sdev, int depth) | 475 | static int aac_change_queue_depth(struct scsi_device *sdev, int depth, |
476 | int reason) | ||
476 | { | 477 | { |
478 | if (reason != SCSI_QDEPTH_DEFAULT) | ||
479 | return -EOPNOTSUPP; | ||
480 | |||
477 | if (sdev->tagged_supported && (sdev->type == TYPE_DISK) && | 481 | if (sdev->tagged_supported && (sdev->type == TYPE_DISK) && |
478 | (sdev_channel(sdev) == CONTAINER_CHANNEL)) { | 482 | (sdev_channel(sdev) == CONTAINER_CHANNEL)) { |
479 | struct scsi_device * dev; | 483 | struct scsi_device * dev; |
diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index 80aac01b5a6f..47d5d19f8c92 100644 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c | |||
@@ -98,8 +98,11 @@ static void arcmsr_flush_hbb_cache(struct AdapterControlBlock *acb); | |||
98 | static const char *arcmsr_info(struct Scsi_Host *); | 98 | static const char *arcmsr_info(struct Scsi_Host *); |
99 | static irqreturn_t arcmsr_interrupt(struct AdapterControlBlock *acb); | 99 | static irqreturn_t arcmsr_interrupt(struct AdapterControlBlock *acb); |
100 | static int arcmsr_adjust_disk_queue_depth(struct scsi_device *sdev, | 100 | static int arcmsr_adjust_disk_queue_depth(struct scsi_device *sdev, |
101 | int queue_depth) | 101 | int queue_depth, int reason) |
102 | { | 102 | { |
103 | if (reason != SCSI_QDEPTH_DEFAULT) | ||
104 | return -EOPNOTSUPP; | ||
105 | |||
103 | if (queue_depth > ARCMSR_MAX_CMD_PERLUN) | 106 | if (queue_depth > ARCMSR_MAX_CMD_PERLUN) |
104 | queue_depth = ARCMSR_MAX_CMD_PERLUN; | 107 | queue_depth = ARCMSR_MAX_CMD_PERLUN; |
105 | scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, queue_depth); | 108 | scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, queue_depth); |
diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c index a0e7e711ff9d..901a3daeb36b 100644 --- a/drivers/scsi/hptiop.c +++ b/drivers/scsi/hptiop.c | |||
@@ -861,10 +861,13 @@ static int hptiop_reset(struct scsi_cmnd *scp) | |||
861 | } | 861 | } |
862 | 862 | ||
863 | static int hptiop_adjust_disk_queue_depth(struct scsi_device *sdev, | 863 | static int hptiop_adjust_disk_queue_depth(struct scsi_device *sdev, |
864 | int queue_depth) | 864 | int queue_depth, int reason) |
865 | { | 865 | { |
866 | struct hptiop_hba *hba = (struct hptiop_hba *)sdev->host->hostdata; | 866 | struct hptiop_hba *hba = (struct hptiop_hba *)sdev->host->hostdata; |
867 | 867 | ||
868 | if (reason != SCSI_QDEPTH_DEFAULT) | ||
869 | return -EOPNOTSUPP; | ||
870 | |||
868 | if (queue_depth > hba->max_requests) | 871 | if (queue_depth > hba->max_requests) |
869 | queue_depth = hba->max_requests; | 872 | queue_depth = hba->max_requests; |
870 | scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, queue_depth); | 873 | scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, queue_depth); |
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index bc9beb8c587c..87b536a97cb4 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c | |||
@@ -2764,12 +2764,17 @@ static int ibmvfc_slave_configure(struct scsi_device *sdev) | |||
2764 | * ibmvfc_change_queue_depth - Change the device's queue depth | 2764 | * ibmvfc_change_queue_depth - Change the device's queue depth |
2765 | * @sdev: scsi device struct | 2765 | * @sdev: scsi device struct |
2766 | * @qdepth: depth to set | 2766 | * @qdepth: depth to set |
2767 | * @reason: calling context | ||
2767 | * | 2768 | * |
2768 | * Return value: | 2769 | * Return value: |
2769 | * actual depth set | 2770 | * actual depth set |
2770 | **/ | 2771 | **/ |
2771 | static int ibmvfc_change_queue_depth(struct scsi_device *sdev, int qdepth) | 2772 | static int ibmvfc_change_queue_depth(struct scsi_device *sdev, int qdepth, |
2773 | int reason) | ||
2772 | { | 2774 | { |
2775 | if (reason != SCSI_QDEPTH_DEFAULT) | ||
2776 | return -EOPNOTSUPP; | ||
2777 | |||
2773 | if (qdepth > IBMVFC_MAX_CMDS_PER_LUN) | 2778 | if (qdepth > IBMVFC_MAX_CMDS_PER_LUN) |
2774 | qdepth = IBMVFC_MAX_CMDS_PER_LUN; | 2779 | qdepth = IBMVFC_MAX_CMDS_PER_LUN; |
2775 | 2780 | ||
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index d9b0e9d31983..e475b7957c2d 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c | |||
@@ -1637,12 +1637,17 @@ static int ibmvscsi_slave_configure(struct scsi_device *sdev) | |||
1637 | * ibmvscsi_change_queue_depth - Change the device's queue depth | 1637 | * ibmvscsi_change_queue_depth - Change the device's queue depth |
1638 | * @sdev: scsi device struct | 1638 | * @sdev: scsi device struct |
1639 | * @qdepth: depth to set | 1639 | * @qdepth: depth to set |
1640 | * @reason: calling context | ||
1640 | * | 1641 | * |
1641 | * Return value: | 1642 | * Return value: |
1642 | * actual depth set | 1643 | * actual depth set |
1643 | **/ | 1644 | **/ |
1644 | static int ibmvscsi_change_queue_depth(struct scsi_device *sdev, int qdepth) | 1645 | static int ibmvscsi_change_queue_depth(struct scsi_device *sdev, int qdepth, |
1646 | int reason) | ||
1645 | { | 1647 | { |
1648 | if (reason != SCSI_QDEPTH_DEFAULT) | ||
1649 | return -EOPNOTSUPP; | ||
1650 | |||
1646 | if (qdepth > IBMVSCSI_MAX_CMDS_PER_LUN) | 1651 | if (qdepth > IBMVSCSI_MAX_CMDS_PER_LUN) |
1647 | qdepth = IBMVSCSI_MAX_CMDS_PER_LUN; | 1652 | qdepth = IBMVSCSI_MAX_CMDS_PER_LUN; |
1648 | 1653 | ||
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 5f045505a1f4..d40d5c79fff1 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -3367,16 +3367,21 @@ static int ipr_free_dump(struct ipr_ioa_cfg *ioa_cfg) { return 0; }; | |||
3367 | * ipr_change_queue_depth - Change the device's queue depth | 3367 | * ipr_change_queue_depth - Change the device's queue depth |
3368 | * @sdev: scsi device struct | 3368 | * @sdev: scsi device struct |
3369 | * @qdepth: depth to set | 3369 | * @qdepth: depth to set |
3370 | * @reason: calling context | ||
3370 | * | 3371 | * |
3371 | * Return value: | 3372 | * Return value: |
3372 | * actual depth set | 3373 | * actual depth set |
3373 | **/ | 3374 | **/ |
3374 | static int ipr_change_queue_depth(struct scsi_device *sdev, int qdepth) | 3375 | static int ipr_change_queue_depth(struct scsi_device *sdev, int qdepth, |
3376 | int reason) | ||
3375 | { | 3377 | { |
3376 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; | 3378 | struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; |
3377 | struct ipr_resource_entry *res; | 3379 | struct ipr_resource_entry *res; |
3378 | unsigned long lock_flags = 0; | 3380 | unsigned long lock_flags = 0; |
3379 | 3381 | ||
3382 | if (reason != SCSI_QDEPTH_DEFAULT) | ||
3383 | return -EOPNOTSUPP; | ||
3384 | |||
3380 | spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags); | 3385 | spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags); |
3381 | res = (struct ipr_resource_entry *)sdev->hostdata; | 3386 | res = (struct ipr_resource_entry *)sdev->hostdata; |
3382 | 3387 | ||
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index a67f53a5026c..beaab818d8de 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c | |||
@@ -2064,8 +2064,11 @@ int fc_slave_alloc(struct scsi_device *sdev) | |||
2064 | } | 2064 | } |
2065 | EXPORT_SYMBOL(fc_slave_alloc); | 2065 | EXPORT_SYMBOL(fc_slave_alloc); |
2066 | 2066 | ||
2067 | int fc_change_queue_depth(struct scsi_device *sdev, int qdepth) | 2067 | int fc_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason) |
2068 | { | 2068 | { |
2069 | if (reason != SCSI_QDEPTH_DEFAULT) | ||
2070 | return -EOPNOTSUPP; | ||
2071 | |||
2069 | scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), qdepth); | 2072 | scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), qdepth); |
2070 | return sdev->queue_depth; | 2073 | return sdev->queue_depth; |
2071 | } | 2074 | } |
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index f1a4246f890c..67d0f3fc8ac0 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
@@ -1643,8 +1643,11 @@ fault: | |||
1643 | } | 1643 | } |
1644 | EXPORT_SYMBOL_GPL(iscsi_queuecommand); | 1644 | EXPORT_SYMBOL_GPL(iscsi_queuecommand); |
1645 | 1645 | ||
1646 | int iscsi_change_queue_depth(struct scsi_device *sdev, int depth) | 1646 | int iscsi_change_queue_depth(struct scsi_device *sdev, int depth, int reason) |
1647 | { | 1647 | { |
1648 | if (reason != SCSI_QDEPTH_DEFAULT) | ||
1649 | return -EOPNOTSUPP; | ||
1650 | |||
1648 | scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth); | 1651 | scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth); |
1649 | return sdev->queue_depth; | 1652 | return sdev->queue_depth; |
1650 | } | 1653 | } |
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c index 1c558d3bce18..14b13196b22d 100644 --- a/drivers/scsi/libsas/sas_scsi_host.c +++ b/drivers/scsi/libsas/sas_scsi_host.c | |||
@@ -820,10 +820,14 @@ void sas_slave_destroy(struct scsi_device *scsi_dev) | |||
820 | ata_port_disable(dev->sata_dev.ap); | 820 | ata_port_disable(dev->sata_dev.ap); |
821 | } | 821 | } |
822 | 822 | ||
823 | int sas_change_queue_depth(struct scsi_device *scsi_dev, int new_depth) | 823 | int sas_change_queue_depth(struct scsi_device *scsi_dev, int new_depth, |
824 | int reason) | ||
824 | { | 825 | { |
825 | int res = min(new_depth, SAS_MAX_QD); | 826 | int res = min(new_depth, SAS_MAX_QD); |
826 | 827 | ||
828 | if (reason != SCSI_QDEPTH_DEFAULT) | ||
829 | return -EOPNOTSUPP; | ||
830 | |||
827 | if (scsi_dev->tagged_supported) | 831 | if (scsi_dev->tagged_supported) |
828 | scsi_adjust_queue_depth(scsi_dev, scsi_get_tag_type(scsi_dev), | 832 | scsi_adjust_queue_depth(scsi_dev, scsi_get_tag_type(scsi_dev), |
829 | res); | 833 | res); |
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index 234f0b7eb21c..fd181c2a8ae4 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.c +++ b/drivers/scsi/megaraid/megaraid_mbox.c | |||
@@ -335,12 +335,17 @@ static struct device_attribute *megaraid_sdev_attrs[] = { | |||
335 | * megaraid_change_queue_depth - Change the device's queue depth | 335 | * megaraid_change_queue_depth - Change the device's queue depth |
336 | * @sdev: scsi device struct | 336 | * @sdev: scsi device struct |
337 | * @qdepth: depth to set | 337 | * @qdepth: depth to set |
338 | * @reason: calling context | ||
338 | * | 339 | * |
339 | * Return value: | 340 | * Return value: |
340 | * actual depth set | 341 | * actual depth set |
341 | */ | 342 | */ |
342 | static int megaraid_change_queue_depth(struct scsi_device *sdev, int qdepth) | 343 | static int megaraid_change_queue_depth(struct scsi_device *sdev, int qdepth, |
344 | int reason) | ||
343 | { | 345 | { |
346 | if (reason != SCSI_QDEPTH_DEFAULT) | ||
347 | return -EOPNOTSUPP; | ||
348 | |||
344 | if (qdepth > MBOX_MAX_SCSI_CMDS) | 349 | if (qdepth > MBOX_MAX_SCSI_CMDS) |
345 | qdepth = MBOX_MAX_SCSI_CMDS; | 350 | qdepth = MBOX_MAX_SCSI_CMDS; |
346 | scsi_adjust_queue_depth(sdev, 0, qdepth); | 351 | scsi_adjust_queue_depth(sdev, 0, qdepth); |
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 | */ |
1105 | static int | 1106 | static 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); |
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index f7c70e2a8224..86d158ee3572 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c | |||
@@ -278,12 +278,17 @@ static void pmcraid_slave_destroy(struct scsi_device *scsi_dev) | |||
278 | * pmcraid_change_queue_depth - Change the device's queue depth | 278 | * pmcraid_change_queue_depth - Change the device's queue depth |
279 | * @scsi_dev: scsi device struct | 279 | * @scsi_dev: scsi device struct |
280 | * @depth: depth to set | 280 | * @depth: depth to set |
281 | * @reason: calling context | ||
281 | * | 282 | * |
282 | * Return value | 283 | * Return value |
283 | * actual depth set | 284 | * actual depth set |
284 | */ | 285 | */ |
285 | static int pmcraid_change_queue_depth(struct scsi_device *scsi_dev, int depth) | 286 | static int pmcraid_change_queue_depth(struct scsi_device *scsi_dev, int depth, |
287 | int reason) | ||
286 | { | 288 | { |
289 | if (reason != SCSI_QDEPTH_DEFAULT) | ||
290 | return -EOPNOTSUPP; | ||
291 | |||
287 | if (depth > PMCRAID_MAX_CMD_PER_LUN) | 292 | if (depth > PMCRAID_MAX_CMD_PER_LUN) |
288 | depth = PMCRAID_MAX_CMD_PER_LUN; | 293 | depth = PMCRAID_MAX_CMD_PER_LUN; |
289 | 294 | ||
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index ecf2a40d70be..d69744a62fe4 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -138,7 +138,7 @@ static int qla2xxx_eh_target_reset(struct scsi_cmnd *); | |||
138 | static int qla2xxx_eh_bus_reset(struct scsi_cmnd *); | 138 | static int qla2xxx_eh_bus_reset(struct scsi_cmnd *); |
139 | static int qla2xxx_eh_host_reset(struct scsi_cmnd *); | 139 | static int qla2xxx_eh_host_reset(struct scsi_cmnd *); |
140 | 140 | ||
141 | static int qla2x00_change_queue_depth(struct scsi_device *, int); | 141 | static int qla2x00_change_queue_depth(struct scsi_device *, int, int); |
142 | static int qla2x00_change_queue_type(struct scsi_device *, int); | 142 | static int qla2x00_change_queue_type(struct scsi_device *, int); |
143 | 143 | ||
144 | struct scsi_host_template qla2xxx_driver_template = { | 144 | struct scsi_host_template qla2xxx_driver_template = { |
@@ -1235,8 +1235,11 @@ qla2xxx_slave_destroy(struct scsi_device *sdev) | |||
1235 | } | 1235 | } |
1236 | 1236 | ||
1237 | static int | 1237 | static int |
1238 | qla2x00_change_queue_depth(struct scsi_device *sdev, int qdepth) | 1238 | qla2x00_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason) |
1239 | { | 1239 | { |
1240 | if (reason != SCSI_QDEPTH_DEFAULT) | ||
1241 | return -EOPNOTSUPP; | ||
1242 | |||
1240 | scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), qdepth); | 1243 | scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), qdepth); |
1241 | return sdev->queue_depth; | 1244 | return sdev->queue_depth; |
1242 | } | 1245 | } |
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 5c7eb63a19d1..a48782866b22 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c | |||
@@ -766,7 +766,8 @@ sdev_store_queue_depth_rw(struct device *dev, struct device_attribute *attr, | |||
766 | if (depth < 1) | 766 | if (depth < 1) |
767 | return -EINVAL; | 767 | return -EINVAL; |
768 | 768 | ||
769 | retval = sht->change_queue_depth(sdev, depth); | 769 | retval = sht->change_queue_depth(sdev, depth, |
770 | SCSI_QDEPTH_DEFAULT); | ||
770 | if (retval < 0) | 771 | if (retval < 0) |
771 | return retval; | 772 | return retval; |
772 | 773 | ||