* [PATCH] lpfc: Reduce log messages see after successful firmware download
@ 2022-02-07 18:04 James Smart
2022-02-07 22:03 ` Ewan Milne
2022-02-08 4:50 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: James Smart @ 2022-02-07 18:04 UTC (permalink / raw)
To: linux-scsi; +Cc: James Smart
Messages around fw download were incorrectly tagged as being related to
discovery trace events. Thus, fw download status ended up dumping the
trace log as well as the fw update message. As there were a couple of
log messages in this state, the trace log was dumped multiple times.
Resolved by converting from trace events to sli events.
Cut against 5.18/scsi-queue
Signed-off-by: James Smart <jsmart2021@gmail.com>
---
drivers/scsi/lpfc/lpfc_init.c | 2 +-
drivers/scsi/lpfc/lpfc_sli.c | 8 +++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index a56f01f659f8..558f7d2559c4 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -2104,7 +2104,7 @@ lpfc_handle_eratt_s4(struct lpfc_hba *phba)
}
if (reg_err1 == SLIPORT_ERR1_REG_ERR_CODE_2 &&
reg_err2 == SLIPORT_ERR2_REG_FW_RESTART) {
- lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
+ lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
"3143 Port Down: Firmware Update "
"Detected\n");
en_rn_msg = false;
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 1bc0db572d9e..430abebf99f1 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -13363,6 +13363,7 @@ lpfc_sli4_eratt_read(struct lpfc_hba *phba)
uint32_t uerr_sta_hi, uerr_sta_lo;
uint32_t if_type, portsmphr;
struct lpfc_register portstat_reg;
+ u32 logmask;
/*
* For now, use the SLI4 device internal unrecoverable error
@@ -13413,7 +13414,12 @@ lpfc_sli4_eratt_read(struct lpfc_hba *phba)
readl(phba->sli4_hba.u.if_type2.ERR1regaddr);
phba->work_status[1] =
readl(phba->sli4_hba.u.if_type2.ERR2regaddr);
- lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
+ logmask = LOG_TRACE_EVENT;
+ if (phba->work_status[0] ==
+ SLIPORT_ERR1_REG_ERR_CODE_2 &&
+ phba->work_status[1] == SLIPORT_ERR2_REG_FW_RESTART)
+ logmask = LOG_SLI;
+ lpfc_printf_log(phba, KERN_ERR, logmask,
"2885 Port Status Event: "
"port status reg 0x%x, "
"port smphr reg 0x%x, "
--
2.26.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] lpfc: Reduce log messages see after successful firmware download
2022-02-07 18:04 [PATCH] lpfc: Reduce log messages see after successful firmware download James Smart
@ 2022-02-07 22:03 ` Ewan Milne
2022-02-08 4:50 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Ewan Milne @ 2022-02-07 22:03 UTC (permalink / raw)
To: James Smart; +Cc: linux-scsi
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
On Mon, Feb 7, 2022 at 1:13 PM James Smart <jsmart2021@gmail.com> wrote:
>
> Messages around fw download were incorrectly tagged as being related to
> discovery trace events. Thus, fw download status ended up dumping the
> trace log as well as the fw update message. As there were a couple of
> log messages in this state, the trace log was dumped multiple times.
>
> Resolved by converting from trace events to sli events.
>
> Cut against 5.18/scsi-queue
>
> Signed-off-by: James Smart <jsmart2021@gmail.com>
> ---
> drivers/scsi/lpfc/lpfc_init.c | 2 +-
> drivers/scsi/lpfc/lpfc_sli.c | 8 +++++++-
> 2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
> index a56f01f659f8..558f7d2559c4 100644
> --- a/drivers/scsi/lpfc/lpfc_init.c
> +++ b/drivers/scsi/lpfc/lpfc_init.c
> @@ -2104,7 +2104,7 @@ lpfc_handle_eratt_s4(struct lpfc_hba *phba)
> }
> if (reg_err1 == SLIPORT_ERR1_REG_ERR_CODE_2 &&
> reg_err2 == SLIPORT_ERR2_REG_FW_RESTART) {
> - lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
> + lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
> "3143 Port Down: Firmware Update "
> "Detected\n");
> en_rn_msg = false;
> diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
> index 1bc0db572d9e..430abebf99f1 100644
> --- a/drivers/scsi/lpfc/lpfc_sli.c
> +++ b/drivers/scsi/lpfc/lpfc_sli.c
> @@ -13363,6 +13363,7 @@ lpfc_sli4_eratt_read(struct lpfc_hba *phba)
> uint32_t uerr_sta_hi, uerr_sta_lo;
> uint32_t if_type, portsmphr;
> struct lpfc_register portstat_reg;
> + u32 logmask;
>
> /*
> * For now, use the SLI4 device internal unrecoverable error
> @@ -13413,7 +13414,12 @@ lpfc_sli4_eratt_read(struct lpfc_hba *phba)
> readl(phba->sli4_hba.u.if_type2.ERR1regaddr);
> phba->work_status[1] =
> readl(phba->sli4_hba.u.if_type2.ERR2regaddr);
> - lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
> + logmask = LOG_TRACE_EVENT;
> + if (phba->work_status[0] ==
> + SLIPORT_ERR1_REG_ERR_CODE_2 &&
> + phba->work_status[1] == SLIPORT_ERR2_REG_FW_RESTART)
> + logmask = LOG_SLI;
> + lpfc_printf_log(phba, KERN_ERR, logmask,
> "2885 Port Status Event: "
> "port status reg 0x%x, "
> "port smphr reg 0x%x, "
> --
> 2.26.2
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] lpfc: Reduce log messages see after successful firmware download
2022-02-07 18:04 [PATCH] lpfc: Reduce log messages see after successful firmware download James Smart
2022-02-07 22:03 ` Ewan Milne
@ 2022-02-08 4:50 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2022-02-08 4:50 UTC (permalink / raw)
To: linux-scsi, James Smart; +Cc: Martin K . Petersen
On Mon, 7 Feb 2022 10:04:42 -0800, James Smart wrote:
> Messages around fw download were incorrectly tagged as being related to
> discovery trace events. Thus, fw download status ended up dumping the
> trace log as well as the fw update message. As there were a couple of
> log messages in this state, the trace log was dumped multiple times.
>
> Resolved by converting from trace events to sli events.
>
> [...]
Applied to 5.17/scsi-fixes, thanks!
[1/1] lpfc: Reduce log messages see after successful firmware download
https://git.kernel.org/mkp/scsi/c/5852ed2a6a39
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-08 5:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-07 18:04 [PATCH] lpfc: Reduce log messages see after successful firmware download James Smart
2022-02-07 22:03 ` Ewan Milne
2022-02-08 4:50 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.