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,7 +14747,7 @@ lpfc_write_firmware(const struct firmware *fw, void *context) ...@@ -14747,7 +14747,7 @@ lpfc_write_firmware(const struct firmware *fw, void *context)
INIT_LIST_HEAD(&dma_buffer_list); INIT_LIST_HEAD(&dma_buffer_list);
lpfc_decode_firmware_rev(phba, fwrev, 1); lpfc_decode_firmware_rev(phba, fwrev, 1);
if (strncmp(fwrev, image->revision, strnlen(image->revision, 16))) { if (strncmp(fwrev, image->revision, strnlen(image->revision, 16))) {
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, lpfc_log_msg(phba, KERN_NOTICE, LOG_INIT | LOG_SLI,
"3023 Updating Firmware, Current Version:%s " "3023 Updating Firmware, Current Version:%s "
"New Version:%s\n", "New Version:%s\n",
fwrev, image->revision); fwrev, image->revision);
...@@ -14797,7 +14797,7 @@ lpfc_write_firmware(const struct firmware *fw, void *context) ...@@ -14797,7 +14797,7 @@ lpfc_write_firmware(const struct firmware *fw, void *context)
} }
rc = offset; rc = offset;
} else } else
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, lpfc_log_msg(phba, KERN_NOTICE, LOG_INIT | LOG_SLI,
"3029 Skipped Firmware update, Current " "3029 Skipped Firmware update, Current "
"Version:%s New Version:%s\n", "Version:%s New Version:%s\n",
fwrev, image->revision); fwrev, image->revision);
...@@ -14812,10 +14812,10 @@ lpfc_write_firmware(const struct firmware *fw, void *context) ...@@ -14812,10 +14812,10 @@ lpfc_write_firmware(const struct firmware *fw, void *context)
release_firmware(fw); release_firmware(fw);
out: out:
if (rc < 0) if (rc < 0)
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, lpfc_log_msg(phba, KERN_ERR, LOG_INIT | LOG_SLI,
"3062 Firmware update error, status %d.\n", rc); "3062 Firmware update error, status %d.\n", rc);
else else
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, lpfc_log_msg(phba, KERN_NOTICE, LOG_INIT | LOG_SLI,
"3024 Firmware update success: size %d.\n", rc); "3024 Firmware update success: size %d.\n", rc);
} }
......
...@@ -55,7 +55,7 @@ void lpfc_dbg_print(struct lpfc_hba *phba, const char *fmt, ...); ...@@ -55,7 +55,7 @@ void lpfc_dbg_print(struct lpfc_hba *phba, const char *fmt, ...);
/* generate message by verbose log setting or severity */ /* generate message by verbose log setting or severity */
#define lpfc_vlog_msg(vport, level, mask, fmt, arg...) \ #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):" \ dev_printk(level, &((vport)->phba->pcidev)->dev, "%d:(%d):" \
fmt, (vport)->phba->brd_no, vport->vpi, ##arg); } fmt, (vport)->phba->brd_no, vport->vpi, ##arg); }
...@@ -64,7 +64,7 @@ do { \ ...@@ -64,7 +64,7 @@ do { \
{ uint32_t log_verbose = (phba)->pport ? \ { uint32_t log_verbose = (phba)->pport ? \
(phba)->pport->cfg_log_verbose : \ (phba)->pport->cfg_log_verbose : \
(phba)->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:" \ dev_printk(level, &((phba)->pcidev)->dev, "%d:" \
fmt, phba->brd_no, ##arg); \ fmt, phba->brd_no, ##arg); \
} \ } \
......
...@@ -20800,20 +20800,20 @@ lpfc_log_fw_write_cmpl(struct lpfc_hba *phba, u32 shdr_status, ...@@ -20800,20 +20800,20 @@ lpfc_log_fw_write_cmpl(struct lpfc_hba *phba, u32 shdr_status,
if (shdr_add_status == LPFC_ADD_STATUS_INCOMPAT_OBJ) { if (shdr_add_status == LPFC_ADD_STATUS_INCOMPAT_OBJ) {
switch (shdr_add_status_2) { switch (shdr_add_status_2) {
case LPFC_ADD_STATUS_2_INCOMPAT_FLASH: case LPFC_ADD_STATUS_2_INCOMPAT_FLASH:
lpfc_printf_log(phba, KERN_WARNING, LOG_MBOX | LOG_SLI, lpfc_log_msg(phba, KERN_WARNING, LOG_MBOX | LOG_SLI,
"4199 Firmware write failed: " "4199 Firmware write failed: "
"image incompatible with flash x%02x\n", "image incompatible with flash x%02x\n",
phba->sli4_hba.flash_id); phba->sli4_hba.flash_id);
break; break;
case LPFC_ADD_STATUS_2_INCORRECT_ASIC: case LPFC_ADD_STATUS_2_INCORRECT_ASIC:
lpfc_printf_log(phba, KERN_WARNING, LOG_MBOX | LOG_SLI, lpfc_log_msg(phba, KERN_WARNING, LOG_MBOX | LOG_SLI,
"4200 Firmware write failed: " "4200 Firmware write failed: "
"image incompatible with ASIC " "image incompatible with ASIC "
"architecture x%02x\n", "architecture x%02x\n",
phba->sli4_hba.asic_rev); phba->sli4_hba.asic_rev);
break; break;
default: default:
lpfc_printf_log(phba, KERN_WARNING, LOG_MBOX | LOG_SLI, lpfc_log_msg(phba, KERN_WARNING, LOG_MBOX | LOG_SLI,
"4210 Firmware write failed: " "4210 Firmware write failed: "
"add_status_2 x%02x\n", "add_status_2 x%02x\n",
shdr_add_status_2); shdr_add_status_2);
...@@ -20829,24 +20829,24 @@ lpfc_log_fw_write_cmpl(struct lpfc_hba *phba, u32 shdr_status, ...@@ -20829,24 +20829,24 @@ lpfc_log_fw_write_cmpl(struct lpfc_hba *phba, u32 shdr_status,
switch (shdr_change_status) { switch (shdr_change_status) {
case (LPFC_CHANGE_STATUS_PHYS_DEV_RESET): case (LPFC_CHANGE_STATUS_PHYS_DEV_RESET):
lpfc_printf_log(phba, KERN_INFO, LOG_MBOX | LOG_SLI, lpfc_log_msg(phba, KERN_NOTICE, LOG_MBOX | LOG_SLI,
"3198 Firmware write complete: System " "3198 Firmware write complete: System "
"reboot required to instantiate\n"); "reboot required to instantiate\n");
break; break;
case (LPFC_CHANGE_STATUS_FW_RESET): case (LPFC_CHANGE_STATUS_FW_RESET):
lpfc_printf_log(phba, KERN_INFO, LOG_MBOX | LOG_SLI, lpfc_log_msg(phba, KERN_NOTICE, LOG_MBOX | LOG_SLI,
"3199 Firmware write complete: " "3199 Firmware write complete: "
"Firmware reset required to " "Firmware reset required to "
"instantiate\n"); "instantiate\n");
break; break;
case (LPFC_CHANGE_STATUS_PORT_MIGRATION): case (LPFC_CHANGE_STATUS_PORT_MIGRATION):
lpfc_printf_log(phba, KERN_INFO, LOG_MBOX | LOG_SLI, lpfc_log_msg(phba, KERN_NOTICE, LOG_MBOX | LOG_SLI,
"3200 Firmware write complete: Port " "3200 Firmware write complete: Port "
"Migration or PCI Reset required to " "Migration or PCI Reset required to "
"instantiate\n"); "instantiate\n");
break; break;
case (LPFC_CHANGE_STATUS_PCI_RESET): case (LPFC_CHANGE_STATUS_PCI_RESET):
lpfc_printf_log(phba, KERN_INFO, LOG_MBOX | LOG_SLI, lpfc_log_msg(phba, KERN_NOTICE, LOG_MBOX | LOG_SLI,
"3201 Firmware write complete: PCI " "3201 Firmware write complete: PCI "
"Reset required to instantiate\n"); "Reset required to instantiate\n");
break; 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