Skip to content

Commit

Permalink
scsi: lpfc: Fix no message shown for lpfc_hdw_queue out of range value
Browse files Browse the repository at this point in the history
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/20200803210229.23063-3-jsmart2021@gmail.com
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Dick Kennedy authored and Martin K. Petersen committed Aug 5, 2020
1 parent a1e4d3d commit 9e3e365
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
20 changes: 17 additions & 3 deletions drivers/scsi/lpfc/lpfc_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -7412,12 +7412,26 @@ lpfc_get_cfgparam(struct lpfc_hba *phba)
void
lpfc_nvme_mod_param_dep(struct lpfc_hba *phba)
{
if (phba->cfg_hdw_queue > phba->sli4_hba.num_present_cpu)
int logit = 0;

if (phba->cfg_hdw_queue > phba->sli4_hba.num_present_cpu) {
phba->cfg_hdw_queue = phba->sli4_hba.num_present_cpu;
if (phba->cfg_irq_chann > phba->sli4_hba.num_present_cpu)
logit = 1;
}
if (phba->cfg_irq_chann > phba->sli4_hba.num_present_cpu) {
phba->cfg_irq_chann = phba->sli4_hba.num_present_cpu;
if (phba->cfg_irq_chann > phba->cfg_hdw_queue)
logit = 1;
}
if (phba->cfg_irq_chann > phba->cfg_hdw_queue) {
phba->cfg_irq_chann = phba->cfg_hdw_queue;
logit = 1;
}
if (logit)
lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
"2006 Reducing Queues - CPU limitation: "
"IRQ %d HDWQ %d\n",
phba->cfg_irq_chann,
phba->cfg_hdw_queue);

if (phba->cfg_enable_fc4_type & LPFC_ENABLE_NVME &&
phba->nvmet_support) {
Expand Down
3 changes: 2 additions & 1 deletion drivers/scsi/lpfc/lpfc_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -8637,7 +8637,8 @@ lpfc_sli4_read_config(struct lpfc_hba *phba)
if ((phba->cfg_irq_chann > qmin) ||
(phba->cfg_hdw_queue > qmin)) {
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
"2005 Reducing Queues: "
"2005 Reducing Queues - "
"FW resource limitation: "
"WQ %d CQ %d EQ %d: min %d: "
"IRQ %d HDWQ %d\n",
phba->sli4_hba.max_cfg_param.max_wq,
Expand Down

0 comments on commit 9e3e365

Please sign in to comment.