diff options
author | Kashyap, Desai <kashyap.desai@lsi.com> | 2011-01-04 01:04:57 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-01-24 10:22:24 -0500 |
commit | 11e1b961ab067ee3acaf723531da4d3f23e1d6f7 (patch) | |
tree | b7dd47b2e399555d43abffbc75307c3981f85343 /drivers/scsi/mpt2sas | |
parent | efe82a16bc0f9f9e1fc8fa706eb0309fcd57770a (diff) |
[SCSI] mpt2sas: Correct resizing calculation for max_queue_depth
The ioc->hba_queue_depth is not properly resized when the controller
firmware reports that it supports more outstanding IO than what can be fit
inside the reply descriptor pool depth. This is reproduced by setting the
controller global credits larger than 30,000. The bug results in an
incorrect sizing of the queues. The fix is to resize the queue_size by
dividing queue_diff by two.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/mpt2sas')
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_base.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index b2a817055b8b..a11ac6701043 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c | |||
@@ -2176,9 +2176,9 @@ _base_allocate_memory_pools(struct MPT2SAS_ADAPTER *ioc, int sleep_flag) | |||
2176 | /* adjust hba_queue_depth, reply_free_queue_depth, | 2176 | /* adjust hba_queue_depth, reply_free_queue_depth, |
2177 | * and queue_size | 2177 | * and queue_size |
2178 | */ | 2178 | */ |
2179 | ioc->hba_queue_depth -= queue_diff; | 2179 | ioc->hba_queue_depth -= (queue_diff / 2); |
2180 | ioc->reply_free_queue_depth -= queue_diff; | 2180 | ioc->reply_free_queue_depth -= (queue_diff / 2); |
2181 | queue_size -= queue_diff; | 2181 | queue_size = facts->MaxReplyDescriptorPostQueueDepth; |
2182 | } | 2182 | } |
2183 | ioc->reply_post_queue_depth = queue_size; | 2183 | ioc->reply_post_queue_depth = queue_size; |
2184 | 2184 | ||