Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: lpfc: Reduce log messages seen after firmware download

Messages around firmware download were incorrectly tagged as being related
to discovery trace events. Thus, firmware download status ended up dumping
the trace log as well as the firmware update message. As there were a
couple of log messages in this state, the trace log was dumped multiple
times.

Resolve this by converting from trace events to SLI events.

Link: https://lore.kernel.org/r/20220207180442.72836-1-jsmart2021@gmail.com
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

James Smart and committed by
Martin K. Petersen
5852ed2a c80b27cf

+8 -2
+1 -1
drivers/scsi/lpfc/lpfc_init.c
··· 2104 2104 } 2105 2105 if (reg_err1 == SLIPORT_ERR1_REG_ERR_CODE_2 && 2106 2106 reg_err2 == SLIPORT_ERR2_REG_FW_RESTART) { 2107 - lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, 2107 + lpfc_printf_log(phba, KERN_ERR, LOG_SLI, 2108 2108 "3143 Port Down: Firmware Update " 2109 2109 "Detected\n"); 2110 2110 en_rn_msg = false;
+7 -1
drivers/scsi/lpfc/lpfc_sli.c
··· 13363 13363 uint32_t uerr_sta_hi, uerr_sta_lo; 13364 13364 uint32_t if_type, portsmphr; 13365 13365 struct lpfc_register portstat_reg; 13366 + u32 logmask; 13366 13367 13367 13368 /* 13368 13369 * For now, use the SLI4 device internal unrecoverable error ··· 13414 13413 readl(phba->sli4_hba.u.if_type2.ERR1regaddr); 13415 13414 phba->work_status[1] = 13416 13415 readl(phba->sli4_hba.u.if_type2.ERR2regaddr); 13417 - lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, 13416 + logmask = LOG_TRACE_EVENT; 13417 + if (phba->work_status[0] == 13418 + SLIPORT_ERR1_REG_ERR_CODE_2 && 13419 + phba->work_status[1] == SLIPORT_ERR2_REG_FW_RESTART) 13420 + logmask = LOG_SLI; 13421 + lpfc_printf_log(phba, KERN_ERR, logmask, 13418 13422 "2885 Port Status Event: " 13419 13423 "port status reg 0x%x, " 13420 13424 "port smphr reg 0x%x, "