aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_init.c
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2012-08-14 14:25:36 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-09-14 12:59:23 -0400
commit90695ee0e984ef425b9f5a9845314b925357ffdf (patch)
treeb32c319241171938558d9b41ddb9c9418200f475 /drivers/scsi/lpfc/lpfc_init.c
parent8aa134a836061c54f64775ffc4006bdce8bea4a8 (diff)
[SCSI] lpfc 8.3.34: Fix number of IO channels to match CPUs
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_init.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index d81fec832b98..9ad7943414dd 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -6542,6 +6542,9 @@ static int
6542lpfc_sli4_queue_verify(struct lpfc_hba *phba) 6542lpfc_sli4_queue_verify(struct lpfc_hba *phba)
6543{ 6543{
6544 int cfg_fcp_io_channel; 6544 int cfg_fcp_io_channel;
6545 uint32_t cpu;
6546 uint32_t i = 0;
6547
6545 6548
6546 /* 6549 /*
6547 * Sanity check for configured queue parameters against the run-time 6550 * Sanity check for configured queue parameters against the run-time
@@ -6551,6 +6554,17 @@ lpfc_sli4_queue_verify(struct lpfc_hba *phba)
6551 /* Sanity check on HBA EQ parameters */ 6554 /* Sanity check on HBA EQ parameters */
6552 cfg_fcp_io_channel = phba->cfg_fcp_io_channel; 6555 cfg_fcp_io_channel = phba->cfg_fcp_io_channel;
6553 6556
6557 /* It doesn't make sense to have more io channels then CPUs */
6558 for_each_online_cpu(cpu) {
6559 i++;
6560 }
6561 if (i < cfg_fcp_io_channel) {
6562 lpfc_printf_log(phba, KERN_WARNING, LOG_INIT,
6563 "3188 Reducing IO channels to match number of "
6564 "CPUs: from %d to %d\n", cfg_fcp_io_channel, i);
6565 cfg_fcp_io_channel = i;
6566 }
6567
6554 if (cfg_fcp_io_channel > 6568 if (cfg_fcp_io_channel >
6555 phba->sli4_hba.max_cfg_param.max_eq) { 6569 phba->sli4_hba.max_cfg_param.max_eq) {
6556 cfg_fcp_io_channel = phba->sli4_hba.max_cfg_param.max_eq; 6570 cfg_fcp_io_channel = phba->sli4_hba.max_cfg_param.max_eq;