summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc
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 17:59:23 +0100
commit90695ee0e984ef425b9f5a9845314b925357ffdf (patch)
treeb32c319241171938558d9b41ddb9c9418200f475 /drivers/scsi/lpfc
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')
-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 d81fec832b9..9ad7943414d 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -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;