scsi: lpfc: Enhancements to LOG_TRACE_EVENT for better readability
authorJames Smart <jsmart2021@gmail.com>
Mon, 4 Jan 2021 18:02:39 +0000 (10:02 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 8 Jan 2021 04:02:37 +0000 (23:02 -0500)
commit0b3ad32e26460affc9d4b2f9c32d7c228e8b0cfb
tree40f83ff475fa57e5c8357af006f9749249c64bcb
parenta22d73b655a8ec6d41f08790e28ee19dc55d0d33
scsi: lpfc: Enhancements to LOG_TRACE_EVENT for better readability

While testing recent discovery node rework, several items were seen that
could be done better with respect to the new trace event logic.

1) in the following msg:
      kernel: lpfc 0000:44:00.0: start 35 end 35 cnt 0
   If cnt is zero in the 1st message, there is no reason to display the
   1st message, which is just giving start/end positioning.

   Fix by not displaying message if cnt is 0.

2) If the driver is loaded with module log verbosity off, and later a
   single NPIV host instance verbosity is enabled via sysfs, it enables
   messages on all instances. This is due to the trace log verbosity checks
   (lpfc_dmp_dbg) looking at the phba only. It should look at the phba and
   the vport.

   Fix by enabling a check on both phba and vport.

3) in the following messages:
       2904 Firmware Dump Image Present on Adapter
       2887 Reset Needed: Attempting Port Recovery...
   These messages are not necessary for the trace event log, which is
   primarily for discovery.

   Fix by changing log level on these 2 messages to LOG_SLI.

Link: https://lore.kernel.org/r/20210104180240.46824-15-jsmart2021@gmail.com
Co-developed-by: Dick Kennedy <dick.kennedy@broadcom.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>
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_sli.c