mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-03 11:13:56 +08:00
[SCSI] mpt2sas: Calulate the Reply post queue depth calculation as per the MPI spec
[jejb: checkpatch fixes] Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
parent
48ba2efc38
commit
148124d931
@ -2503,23 +2503,25 @@ _base_allocate_memory_pools(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
|
|||||||
/* reply free queue sizing - taking into account for 64 FW events */
|
/* reply free queue sizing - taking into account for 64 FW events */
|
||||||
ioc->reply_free_queue_depth = ioc->hba_queue_depth + 64;
|
ioc->reply_free_queue_depth = ioc->hba_queue_depth + 64;
|
||||||
|
|
||||||
|
/* calculate reply descriptor post queue depth */
|
||||||
|
ioc->reply_post_queue_depth = ioc->hba_queue_depth +
|
||||||
|
ioc->reply_free_queue_depth + 1;
|
||||||
/* align the reply post queue on the next 16 count boundary */
|
/* align the reply post queue on the next 16 count boundary */
|
||||||
if (!ioc->reply_free_queue_depth % 16)
|
if (ioc->reply_post_queue_depth % 16)
|
||||||
ioc->reply_post_queue_depth = ioc->reply_free_queue_depth + 16;
|
ioc->reply_post_queue_depth += 16 -
|
||||||
else
|
(ioc->reply_post_queue_depth % 16);
|
||||||
ioc->reply_post_queue_depth = ioc->reply_free_queue_depth +
|
|
||||||
32 - (ioc->reply_free_queue_depth % 16);
|
|
||||||
if (ioc->reply_post_queue_depth >
|
if (ioc->reply_post_queue_depth >
|
||||||
facts->MaxReplyDescriptorPostQueueDepth) {
|
facts->MaxReplyDescriptorPostQueueDepth) {
|
||||||
ioc->reply_post_queue_depth = min_t(u16,
|
ioc->reply_post_queue_depth =
|
||||||
(facts->MaxReplyDescriptorPostQueueDepth -
|
facts->MaxReplyDescriptorPostQueueDepth -
|
||||||
(facts->MaxReplyDescriptorPostQueueDepth % 16)),
|
(facts->MaxReplyDescriptorPostQueueDepth % 16);
|
||||||
(ioc->hba_queue_depth - (ioc->hba_queue_depth % 16)));
|
ioc->hba_queue_depth =
|
||||||
ioc->reply_free_queue_depth = ioc->reply_post_queue_depth - 16;
|
((ioc->reply_post_queue_depth - 64) / 2) - 1;
|
||||||
ioc->hba_queue_depth = ioc->reply_free_queue_depth - 64;
|
ioc->reply_free_queue_depth = ioc->hba_queue_depth + 64;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dinitprintk(ioc, printk(MPT2SAS_INFO_FMT "scatter gather: "
|
dinitprintk(ioc, printk(MPT2SAS_INFO_FMT "scatter gather: "
|
||||||
"sge_in_main_msg(%d), sge_per_chain(%d), sge_per_io(%d), "
|
"sge_in_main_msg(%d), sge_per_chain(%d), sge_per_io(%d), "
|
||||||
"chains_per_io(%d)\n", ioc->name, ioc->max_sges_in_main_message,
|
"chains_per_io(%d)\n", ioc->name, ioc->max_sges_in_main_message,
|
||||||
|
Loading…
Reference in New Issue
Block a user