Skip to content

Commit 9e3e365

Browse files
Dick Kennedymartinkpetersen
authored andcommitted
scsi: lpfc: Fix no message shown for lpfc_hdw_queue out of range value
If module parameters override the default configuration settings for hardware queues or irqs, the driver was not notifying the change from defaults. Revise such that any changes will result in a kernel log message. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent a1e4d3d commit 9e3e365

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

drivers/scsi/lpfc/lpfc_attr.c

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7412,12 +7412,26 @@ lpfc_get_cfgparam(struct lpfc_hba *phba)
74127412
void
74137413
lpfc_nvme_mod_param_dep(struct lpfc_hba *phba)
74147414
{
7415-
if (phba->cfg_hdw_queue > phba->sli4_hba.num_present_cpu)
7415+
int logit = 0;
7416+
7417+
if (phba->cfg_hdw_queue > phba->sli4_hba.num_present_cpu) {
74167418
phba->cfg_hdw_queue = phba->sli4_hba.num_present_cpu;
7417-
if (phba->cfg_irq_chann > phba->sli4_hba.num_present_cpu)
7419+
logit = 1;
7420+
}
7421+
if (phba->cfg_irq_chann > phba->sli4_hba.num_present_cpu) {
74187422
phba->cfg_irq_chann = phba->sli4_hba.num_present_cpu;
7419-
if (phba->cfg_irq_chann > phba->cfg_hdw_queue)
7423+
logit = 1;
7424+
}
7425+
if (phba->cfg_irq_chann > phba->cfg_hdw_queue) {
74207426
phba->cfg_irq_chann = phba->cfg_hdw_queue;
7427+
logit = 1;
7428+
}
7429+
if (logit)
7430+
lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
7431+
"2006 Reducing Queues - CPU limitation: "
7432+
"IRQ %d HDWQ %d\n",
7433+
phba->cfg_irq_chann,
7434+
phba->cfg_hdw_queue);
74217435

74227436
if (phba->cfg_enable_fc4_type & LPFC_ENABLE_NVME &&
74237437
phba->nvmet_support) {

drivers/scsi/lpfc/lpfc_init.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8637,7 +8637,8 @@ lpfc_sli4_read_config(struct lpfc_hba *phba)
86378637
if ((phba->cfg_irq_chann > qmin) ||
86388638
(phba->cfg_hdw_queue > qmin)) {
86398639
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
8640-
"2005 Reducing Queues: "
8640+
"2005 Reducing Queues - "
8641+
"FW resource limitation: "
86418642
"WQ %d CQ %d EQ %d: min %d: "
86428643
"IRQ %d HDWQ %d\n",
86438644
phba->sli4_hba.max_cfg_param.max_wq,

0 commit comments

Comments
 (0)