Commit b9951e1c authored by Justin Tee's avatar Justin Tee Committed by Martin K. Petersen

scsi: lpfc: Change firmware upgrade logging to KERN_NOTICE instead of TRACE_EVENT

A firmware upgrade does not necessitate dumping of phba->dbg_log[] to kmsg
via LOG_TRACE_EVENT.  A simple KERN_NOTICE log message should suffice to
notify the user of successful or unsuccessful firmware upgrade.  As such,
firmware upgrade log messages are updated to use KERN_NOTICE instead of
LOG_TRACE_EVENT.  Additionally, in order to notify the user of reset type
for instantiating newly downloaded firmware, lpfc_log_msg's default
KERN_LEVEL is updated to 5 or KERN_NOTICE.
Signed-off-by: default avatarJustin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20230523183206.7728-6-justintee8345@gmail.comSigned-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 9914a3d0
......@@ -14747,10 +14747,10 @@ lpfc_write_firmware(const struct firmware *fw, void *context)
INIT_LIST_HEAD(&dma_buffer_list);
lpfc_decode_firmware_rev(phba, fwrev, 1);
if (strncmp(fwrev, image->revision, strnlen(image->revision, 16))) {
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
"3023 Updating Firmware, Current Version:%s "
"New Version:%s\n",
fwrev, image->revision);
lpfc_log_msg(phba, KERN_NOTICE, LOG_INIT | LOG_SLI,
"3023 Updating Firmware, Current Version:%s "
"New Version:%s\n",
fwrev, image->revision);
for (i = 0; i < LPFC_MBX_WR_CONFIG_MAX_BDE; i++) {
dmabuf = kzalloc(sizeof(struct lpfc_dmabuf),
GFP_KERNEL);
......@@ -14797,10 +14797,10 @@ lpfc_write_firmware(const struct firmware *fw, void *context)
}
rc = offset;
} else
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
"3029 Skipped Firmware update, Current "
"Version:%s New Version:%s\n",
fwrev, image->revision);
lpfc_log_msg(phba, KERN_NOTICE, LOG_INIT | LOG_SLI,
"3029 Skipped Firmware update, Current "
"Version:%s New Version:%s\n",
fwrev, image->revision);
release_out:
list_for_each_entry_safe(dmabuf, next, &dma_buffer_list, list) {
......@@ -14812,11 +14812,11 @@ lpfc_write_firmware(const struct firmware *fw, void *context)
release_firmware(fw);
out:
if (rc < 0)
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
"3062 Firmware update error, status %d.\n", rc);
lpfc_log_msg(phba, KERN_ERR, LOG_INIT | LOG_SLI,
"3062 Firmware update error, status %d.\n", rc);
else
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
"3024 Firmware update success: size %d.\n", rc);
lpfc_log_msg(phba, KERN_NOTICE, LOG_INIT | LOG_SLI,
"3024 Firmware update success: size %d.\n", rc);
}
/**
......
......@@ -55,7 +55,7 @@ void lpfc_dbg_print(struct lpfc_hba *phba, const char *fmt, ...);
/* generate message by verbose log setting or severity */
#define lpfc_vlog_msg(vport, level, mask, fmt, arg...) \
{ if (((mask) & (vport)->cfg_log_verbose) || (level[1] <= '4')) \
{ if (((mask) & (vport)->cfg_log_verbose) || (level[1] <= '5')) \
dev_printk(level, &((vport)->phba->pcidev)->dev, "%d:(%d):" \
fmt, (vport)->phba->brd_no, vport->vpi, ##arg); }
......@@ -64,7 +64,7 @@ do { \
{ uint32_t log_verbose = (phba)->pport ? \
(phba)->pport->cfg_log_verbose : \
(phba)->cfg_log_verbose; \
if (((mask) & log_verbose) || (level[1] <= '4')) \
if (((mask) & log_verbose) || (level[1] <= '5')) \
dev_printk(level, &((phba)->pcidev)->dev, "%d:" \
fmt, phba->brd_no, ##arg); \
} \
......
......@@ -20800,23 +20800,23 @@ lpfc_log_fw_write_cmpl(struct lpfc_hba *phba, u32 shdr_status,
if (shdr_add_status == LPFC_ADD_STATUS_INCOMPAT_OBJ) {
switch (shdr_add_status_2) {
case LPFC_ADD_STATUS_2_INCOMPAT_FLASH:
lpfc_printf_log(phba, KERN_WARNING, LOG_MBOX | LOG_SLI,
"4199 Firmware write failed: "
"image incompatible with flash x%02x\n",
phba->sli4_hba.flash_id);
lpfc_log_msg(phba, KERN_WARNING, LOG_MBOX | LOG_SLI,
"4199 Firmware write failed: "
"image incompatible with flash x%02x\n",
phba->sli4_hba.flash_id);
break;
case LPFC_ADD_STATUS_2_INCORRECT_ASIC:
lpfc_printf_log(phba, KERN_WARNING, LOG_MBOX | LOG_SLI,
"4200 Firmware write failed: "
"image incompatible with ASIC "
"architecture x%02x\n",
phba->sli4_hba.asic_rev);
lpfc_log_msg(phba, KERN_WARNING, LOG_MBOX | LOG_SLI,
"4200 Firmware write failed: "
"image incompatible with ASIC "
"architecture x%02x\n",
phba->sli4_hba.asic_rev);
break;
default:
lpfc_printf_log(phba, KERN_WARNING, LOG_MBOX | LOG_SLI,
"4210 Firmware write failed: "
"add_status_2 x%02x\n",
shdr_add_status_2);
lpfc_log_msg(phba, KERN_WARNING, LOG_MBOX | LOG_SLI,
"4210 Firmware write failed: "
"add_status_2 x%02x\n",
shdr_add_status_2);
break;
}
} else if (!shdr_status && !shdr_add_status) {
......@@ -20829,26 +20829,26 @@ lpfc_log_fw_write_cmpl(struct lpfc_hba *phba, u32 shdr_status,
switch (shdr_change_status) {
case (LPFC_CHANGE_STATUS_PHYS_DEV_RESET):
lpfc_printf_log(phba, KERN_INFO, LOG_MBOX | LOG_SLI,
"3198 Firmware write complete: System "
"reboot required to instantiate\n");
lpfc_log_msg(phba, KERN_NOTICE, LOG_MBOX | LOG_SLI,
"3198 Firmware write complete: System "
"reboot required to instantiate\n");
break;
case (LPFC_CHANGE_STATUS_FW_RESET):
lpfc_printf_log(phba, KERN_INFO, LOG_MBOX | LOG_SLI,
"3199 Firmware write complete: "
"Firmware reset required to "
"instantiate\n");
lpfc_log_msg(phba, KERN_NOTICE, LOG_MBOX | LOG_SLI,
"3199 Firmware write complete: "
"Firmware reset required to "
"instantiate\n");
break;
case (LPFC_CHANGE_STATUS_PORT_MIGRATION):
lpfc_printf_log(phba, KERN_INFO, LOG_MBOX | LOG_SLI,
"3200 Firmware write complete: Port "
"Migration or PCI Reset required to "
"instantiate\n");
lpfc_log_msg(phba, KERN_NOTICE, LOG_MBOX | LOG_SLI,
"3200 Firmware write complete: Port "
"Migration or PCI Reset required to "
"instantiate\n");
break;
case (LPFC_CHANGE_STATUS_PCI_RESET):
lpfc_printf_log(phba, KERN_INFO, LOG_MBOX | LOG_SLI,
"3201 Firmware write complete: PCI "
"Reset required to instantiate\n");
lpfc_log_msg(phba, KERN_NOTICE, LOG_MBOX | LOG_SLI,
"3201 Firmware write complete: PCI "
"Reset required to instantiate\n");
break;
default:
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment