Commit 90695ee0 authored by James Smart's avatar James Smart Committed by James Bottomley

[SCSI] lpfc 8.3.34: Fix number of IO channels to match CPUs

Signed-off-by: default avatarJames Smart <james.smart@emulex.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 8aa134a8
......@@ -6542,6 +6542,9 @@ static int
lpfc_sli4_queue_verify(struct lpfc_hba *phba)
{
int cfg_fcp_io_channel;
uint32_t cpu;
uint32_t i = 0;
/*
* Sanity check for configured queue parameters against the run-time
......@@ -6551,6 +6554,17 @@ lpfc_sli4_queue_verify(struct lpfc_hba *phba)
/* Sanity check on HBA EQ parameters */
cfg_fcp_io_channel = phba->cfg_fcp_io_channel;
/* It doesn't make sense to have more io channels then CPUs */
for_each_online_cpu(cpu) {
i++;
}
if (i < cfg_fcp_io_channel) {
lpfc_printf_log(phba, KERN_WARNING, LOG_INIT,
"3188 Reducing IO channels to match number of "
"CPUs: from %d to %d\n", cfg_fcp_io_channel, i);
cfg_fcp_io_channel = i;
}
if (cfg_fcp_io_channel >
phba->sli4_hba.max_cfg_param.max_eq) {
cfg_fcp_io_channel = phba->sli4_hba.max_cfg_param.max_eq;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment