scsi: lpfc: Tweak message log categories for ELS/FDMI/NVMe rescan
authorJames Smart <jsmart2021@gmail.com>
Tue, 12 Apr 2022 22:19:43 +0000 (15:19 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 19 Apr 2022 02:48:43 +0000 (22:48 -0400)
Several log message categories were updated:

 - Enable msg 4623 (Xmit of ECD) to display for ELS logging.

 - Change msg 0220 (FDMI cmd failed) to display for ELS logging.

 - Change msg 6460 (FDMI RPA failure) to be warning not hard error.

 - Change msg 6172 (NVME rescan of DID) to be logged under NVMe discovery.

Link: https://lore.kernel.org/r/20220412222008.126521-2-jsmart2021@gmail.com
Co-developed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_ct.c
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_nvme.c

index 4b024aa03c1b22a9e63b450433ffab4b6a345eb0..4334bd358c5abac79bd07aaa1450a70d1dacdb01 100644 (file)
@@ -2236,7 +2236,7 @@ lpfc_cmpl_ct_disc_fdmi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
        cmd =  be16_to_cpu(fdmi_cmd);
        if (fdmi_rsp == cpu_to_be16(SLI_CT_RESPONSE_FS_RJT)) {
                /* FDMI rsp failed */
-               lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
+               lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY | LOG_ELS,
                                 "0220 FDMI cmd failed FS_RJT Data: x%x", cmd);
 
                /* Should we fallback to FDMI-2 / FDMI-1 ? */
@@ -2272,9 +2272,9 @@ lpfc_cmpl_ct_disc_fdmi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
                                phba->link_flag &= ~LS_CT_VEN_RPA;
                                if (phba->cmf_active_mode == LPFC_CFG_OFF)
                                        return;
-                               lpfc_printf_log(phba, KERN_ERR,
+                               lpfc_printf_log(phba, KERN_WARNING,
                                                LOG_DISCOVERY | LOG_ELS,
-                                               "6460 VEN FDMI RPA failure\n");
+                                               "6460 VEN FDMI RPA RJT\n");
                                return;
                        }
                        if (vport->fdmi_port_mask == LPFC_FDMI2_PORT_ATTR) {
index ef6e8cd8c26ae5adba9ab8b73457103799faed4a..7f2b65e4affaa65c4f3a9d0e6b495d119cbf2b27 100644 (file)
@@ -4258,7 +4258,7 @@ lpfc_issue_els_edc(struct lpfc_vport *vport, uint8_t retry)
 
        phba->cgn_sig_freq = lpfc_fabric_cgn_frequency;
 
-       lpfc_printf_vlog(vport, KERN_INFO, LOG_CGN_MGMT,
+       lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS | LOG_CGN_MGMT,
                         "4623 Xmit EDC to remote "
                         "NPORT x%x reg_sig x%x reg_fpin:x%x\n",
                         ndlp->nlp_DID, phba->cgn_reg_signal,
index 8d26f207ebd22724838e9c90aed8a55b0e5d04ce..699b79d4f49620a05c57e25372ac3548639bb57b 100644 (file)
@@ -2466,12 +2466,12 @@ lpfc_nvme_rescan_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
        if (!nrport || !remoteport)
                goto rescan_exit;
 
-       /* Only rescan if we are an NVME target in the MAPPED state */
+       /* Rescan an NVME target in MAPPED state with DISCOVERY role set */
        if (remoteport->port_role & FC_PORT_ROLE_NVME_DISCOVERY &&
            ndlp->nlp_state == NLP_STE_MAPPED_NODE) {
                nvme_fc_rescan_remoteport(remoteport);
 
-               lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
+               lpfc_printf_vlog(vport, KERN_INFO, LOG_NVME_DISC,
                                 "6172 NVME rescanned DID x%06x "
                                 "port_state x%x\n",
                                 ndlp->nlp_DID, remoteport->port_state);