diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2009-10-15 20:46:39 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-12-04 13:00:41 -0500 |
commit | e881a172dac4d9ea3b2a1540041d872963c269bd (patch) | |
tree | 9eb1f344b107806c0041c4e0a64192a055117289 /drivers/scsi/ipr.c | |
parent | dbf9bfe615717d1145f263c0049fe2328e6ed395 (diff) |
[SCSI] modify change_queue_depth to take in reason why it is being called
This patch modifies scsi_host_template->change_queue_depth so that
it takes an argument indicating why it is being called. This will be
used so that if a LLD needs to do some extra processing when
handling queue fulls or later ramp ups, it can do so.
This is a simple port of the drivers setting a change_queue_depth
callback. In the patch I just have these LLDs adjust the queue depth
if the user was requesting it.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
[Vasu.Dev: v2
Also converted pmcraid_change_queue_depth and then verified
all modules compile using "make allmodconfig" for any new build
warnings on X86_64.
Updated original description after combing two original
patches from Mike to make this patch git bisectable.]
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
[jejb: fixed up 53c700]
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r-- | drivers/scsi/ipr.c | 7 |
1 files changed, 6 insertions, 1 deletions
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 | ||