Skip to content

Commit 1af9af1

Browse files
Justin Teemartinkpetersen
authored andcommitted
scsi: lpfc: Revise TRACE_EVENT log flag severities from KERN_ERR to KERN_WARNING
Revise certain log messages marked as KERN_ERR LOG_TRACE_EVENT to KERN_WARNING and use the lpfc_vlog_msg() macro to still log the event. The benefit is that events of interest are still logged and the entire trace buffer is not dumped with extraneous logging information when using default lpfc_log_verbose driver parameter settings. Also, delete the keyword "fail" from such log messages as they aren't really causes for concern. The log messages are more for warnings to a SAN admin about SAN activity. Signed-off-by: Justin Tee <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 0a3c84f commit 1af9af1

File tree

2 files changed

+64
-71
lines changed

2 files changed

+64
-71
lines changed

drivers/scsi/lpfc/lpfc_ct.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1572,8 +1572,8 @@ lpfc_cmpl_ct_cmd_gft_id(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
15721572
}
15731573
}
15741574
} else
1575-
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
1576-
"3065 GFT_ID failed x%08x\n", ulp_status);
1575+
lpfc_vlog_msg(vport, KERN_WARNING, LOG_DISCOVERY,
1576+
"3065 GFT_ID status x%08x\n", ulp_status);
15771577

15781578
out:
15791579
lpfc_ct_free_iocb(phba, cmdiocb);
@@ -2258,7 +2258,7 @@ lpfc_cmpl_ct_disc_fdmi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
22582258
}
22592259

22602260
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
2261-
"0229 FDMI cmd %04x failed, latt = %d "
2261+
"0229 FDMI cmd %04x latt = %d "
22622262
"ulp_status: x%x, rid x%x\n",
22632263
be16_to_cpu(fdmi_cmd), latt, ulp_status,
22642264
ulp_word4);
@@ -2275,9 +2275,9 @@ lpfc_cmpl_ct_disc_fdmi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
22752275
/* Check for a CT LS_RJT response */
22762276
cmd = be16_to_cpu(fdmi_cmd);
22772277
if (be16_to_cpu(fdmi_rsp) == SLI_CT_RESPONSE_FS_RJT) {
2278-
/* FDMI rsp failed */
2278+
/* Log FDMI reject */
22792279
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY | LOG_ELS,
2280-
"0220 FDMI cmd failed FS_RJT Data: x%x", cmd);
2280+
"0220 FDMI cmd FS_RJT Data: x%x", cmd);
22812281

22822282
/* Should we fallback to FDMI-2 / FDMI-1 ? */
22832283
switch (cmd) {

drivers/scsi/lpfc/lpfc_els.c

Lines changed: 59 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
979979
phba->fcoe_cvl_eventtag_attn =
980980
phba->fcoe_cvl_eventtag;
981981
lpfc_printf_log(phba, KERN_WARNING, LOG_FIP | LOG_ELS,
982-
"2611 FLOGI failed on FCF (x%x), "
982+
"2611 FLOGI FCF (x%x), "
983983
"status:x%x/x%x, tmo:x%x, perform "
984984
"roundrobin FCF failover\n",
985985
phba->fcf.current_rec.fcf_indx,
@@ -997,11 +997,11 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
997997
if (!(ulp_status == IOSTAT_LOCAL_REJECT &&
998998
((ulp_word4 & IOERR_PARAM_MASK) ==
999999
IOERR_LOOP_OPEN_FAILURE)))
1000-
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
1001-
"2858 FLOGI failure Status:x%x/x%x TMO"
1002-
":x%x Data x%lx x%x\n",
1003-
ulp_status, ulp_word4, tmo,
1004-
phba->hba_flag, phba->fcf.fcf_flag);
1000+
lpfc_vlog_msg(vport, KERN_WARNING, LOG_ELS,
1001+
"2858 FLOGI Status:x%x/x%x TMO"
1002+
":x%x Data x%lx x%x\n",
1003+
ulp_status, ulp_word4, tmo,
1004+
phba->hba_flag, phba->fcf.fcf_flag);
10051005

10061006
/* Check for retry */
10071007
if (lpfc_els_retry(phba, cmdiocb, rspiocb)) {
@@ -1023,7 +1023,7 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
10231023
lpfc_nlp_put(ndlp);
10241024

10251025
lpfc_printf_vlog(vport, KERN_WARNING, LOG_ELS,
1026-
"0150 FLOGI failure Status:x%x/x%x "
1026+
"0150 FLOGI Status:x%x/x%x "
10271027
"xri x%x TMO:x%x refcnt %d\n",
10281028
ulp_status, ulp_word4, cmdiocb->sli4_xritag,
10291029
tmo, kref_read(&ndlp->kref));
@@ -1032,11 +1032,11 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
10321032
if (!(ulp_status == IOSTAT_LOCAL_REJECT &&
10331033
((ulp_word4 & IOERR_PARAM_MASK) ==
10341034
IOERR_LOOP_OPEN_FAILURE))) {
1035-
/* FLOGI failure */
1036-
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
1037-
"0100 FLOGI failure Status:x%x/x%x "
1038-
"TMO:x%x\n",
1039-
ulp_status, ulp_word4, tmo);
1035+
/* Warn FLOGI status */
1036+
lpfc_vlog_msg(vport, KERN_WARNING, LOG_ELS,
1037+
"0100 FLOGI Status:x%x/x%x "
1038+
"TMO:x%x\n",
1039+
ulp_status, ulp_word4, tmo);
10401040
goto flogifail;
10411041
}
10421042

@@ -1964,16 +1964,16 @@ lpfc_cmpl_els_rrq(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
19641964

19651965
if (ulp_status) {
19661966
/* Check for retry */
1967-
/* RRQ failed Don't print the vport to vport rjts */
1967+
/* Warn RRQ status Don't print the vport to vport rjts */
19681968
if (ulp_status != IOSTAT_LS_RJT ||
19691969
(((ulp_word4) >> 16 != LSRJT_INVALID_CMD) &&
19701970
((ulp_word4) >> 16 != LSRJT_UNABLE_TPC)) ||
19711971
(phba)->pport->cfg_log_verbose & LOG_ELS)
1972-
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
1973-
"2881 RRQ failure DID:%06X Status:"
1974-
"x%x/x%x\n",
1975-
ndlp->nlp_DID, ulp_status,
1976-
ulp_word4);
1972+
lpfc_vlog_msg(vport, KERN_WARNING, LOG_ELS,
1973+
"2881 RRQ DID:%06X Status:"
1974+
"x%x/x%x\n",
1975+
ndlp->nlp_DID, ulp_status,
1976+
ulp_word4);
19771977
}
19781978

19791979
lpfc_clr_rrq_active(phba, rrq->xritag, rrq);
@@ -2077,16 +2077,16 @@ lpfc_cmpl_els_plogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
20772077
}
20782078
goto out;
20792079
}
2080-
/* PLOGI failed Don't print the vport to vport rjts */
2080+
/* Warn PLOGI status Don't print the vport to vport rjts */
20812081
if (ulp_status != IOSTAT_LS_RJT ||
20822082
(((ulp_word4) >> 16 != LSRJT_INVALID_CMD) &&
20832083
((ulp_word4) >> 16 != LSRJT_UNABLE_TPC)) ||
20842084
(phba)->pport->cfg_log_verbose & LOG_ELS)
2085-
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
2086-
"2753 PLOGI failure DID:%06X "
2087-
"Status:x%x/x%x\n",
2088-
ndlp->nlp_DID, ulp_status,
2089-
ulp_word4);
2085+
lpfc_vlog_msg(vport, KERN_WARNING, LOG_ELS,
2086+
"2753 PLOGI DID:%06X "
2087+
"Status:x%x/x%x\n",
2088+
ndlp->nlp_DID, ulp_status,
2089+
ulp_word4);
20902090

20912091
/* Do not call DSM for lpfc_els_abort'ed ELS cmds */
20922092
if (!lpfc_error_lost_link(vport, ulp_status, ulp_word4))
@@ -2323,7 +2323,6 @@ lpfc_cmpl_els_prli(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
23232323
struct lpfc_vport *vport = cmdiocb->vport;
23242324
struct lpfc_nodelist *ndlp;
23252325
char *mode;
2326-
u32 loglevel;
23272326
u32 ulp_status;
23282327
u32 ulp_word4;
23292328
bool release_node = false;
@@ -2372,17 +2371,14 @@ lpfc_cmpl_els_prli(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
23722371
* could be expected.
23732372
*/
23742373
if (test_bit(FC_FABRIC, &vport->fc_flag) ||
2375-
vport->cfg_enable_fc4_type != LPFC_ENABLE_BOTH) {
2376-
mode = KERN_ERR;
2377-
loglevel = LOG_TRACE_EVENT;
2378-
} else {
2374+
vport->cfg_enable_fc4_type != LPFC_ENABLE_BOTH)
2375+
mode = KERN_WARNING;
2376+
else
23792377
mode = KERN_INFO;
2380-
loglevel = LOG_ELS;
2381-
}
23822378

2383-
/* PRLI failed */
2384-
lpfc_printf_vlog(vport, mode, loglevel,
2385-
"2754 PRLI failure DID:%06X Status:x%x/x%x, "
2379+
/* Warn PRLI status */
2380+
lpfc_printf_vlog(vport, mode, LOG_ELS,
2381+
"2754 PRLI DID:%06X Status:x%x/x%x, "
23862382
"data: x%x x%x x%x\n",
23872383
ndlp->nlp_DID, ulp_status,
23882384
ulp_word4, ndlp->nlp_state,
@@ -2854,11 +2850,11 @@ lpfc_cmpl_els_adisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
28542850
}
28552851
goto out;
28562852
}
2857-
/* ADISC failed */
2858-
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
2859-
"2755 ADISC failure DID:%06X Status:x%x/x%x\n",
2860-
ndlp->nlp_DID, ulp_status,
2861-
ulp_word4);
2853+
/* Warn ADISC status */
2854+
lpfc_vlog_msg(vport, KERN_WARNING, LOG_ELS,
2855+
"2755 ADISC DID:%06X Status:x%x/x%x\n",
2856+
ndlp->nlp_DID, ulp_status,
2857+
ulp_word4);
28622858
lpfc_disc_state_machine(vport, ndlp, cmdiocb,
28632859
NLP_EVT_CMPL_ADISC);
28642860

@@ -3045,12 +3041,12 @@ lpfc_cmpl_els_logo(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
30453041
* discovery. The PLOGI will retry.
30463042
*/
30473043
if (ulp_status) {
3048-
/* LOGO failed */
3049-
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
3050-
"2756 LOGO failure, No Retry DID:%06X "
3051-
"Status:x%x/x%x\n",
3052-
ndlp->nlp_DID, ulp_status,
3053-
ulp_word4);
3044+
/* Warn LOGO status */
3045+
lpfc_vlog_msg(vport, KERN_WARNING, LOG_ELS,
3046+
"2756 LOGO, No Retry DID:%06X "
3047+
"Status:x%x/x%x\n",
3048+
ndlp->nlp_DID, ulp_status,
3049+
ulp_word4);
30543050

30553051
if (lpfc_error_lost_link(vport, ulp_status, ulp_word4))
30563052
skip_recovery = 1;
@@ -4837,11 +4833,10 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
48374833
if ((phba->sli3_options & LPFC_SLI3_NPIV_ENABLED) &&
48384834
(cmd == ELS_CMD_FDISC) &&
48394835
(stat.un.b.lsRjtRsnCodeExp == LSEXP_OUT_OF_RESOURCE)){
4840-
lpfc_printf_vlog(vport, KERN_ERR,
4841-
LOG_TRACE_EVENT,
4842-
"0125 FDISC Failed (x%x). "
4843-
"Fabric out of resources\n",
4844-
stat.un.lsRjtError);
4836+
lpfc_vlog_msg(vport, KERN_WARNING, LOG_ELS,
4837+
"0125 FDISC (x%x). "
4838+
"Fabric out of resources\n",
4839+
stat.un.lsRjtError);
48454840
lpfc_vport_set_state(vport,
48464841
FC_VPORT_NO_FABRIC_RSCS);
48474842
}
@@ -4877,11 +4872,10 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
48774872
LSEXP_NOTHING_MORE) {
48784873
vport->fc_sparam.cmn.bbRcvSizeMsb &= 0xf;
48794874
retry = 1;
4880-
lpfc_printf_vlog(vport, KERN_ERR,
4881-
LOG_TRACE_EVENT,
4882-
"0820 FLOGI Failed (x%x). "
4883-
"BBCredit Not Supported\n",
4884-
stat.un.lsRjtError);
4875+
lpfc_vlog_msg(vport, KERN_WARNING, LOG_ELS,
4876+
"0820 FLOGI (x%x). "
4877+
"BBCredit Not Supported\n",
4878+
stat.un.lsRjtError);
48854879
}
48864880
break;
48874881

@@ -4891,11 +4885,10 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
48914885
((stat.un.b.lsRjtRsnCodeExp == LSEXP_INVALID_PNAME) ||
48924886
(stat.un.b.lsRjtRsnCodeExp == LSEXP_INVALID_NPORT_ID))
48934887
) {
4894-
lpfc_printf_vlog(vport, KERN_ERR,
4895-
LOG_TRACE_EVENT,
4896-
"0122 FDISC Failed (x%x). "
4897-
"Fabric Detected Bad WWN\n",
4898-
stat.un.lsRjtError);
4888+
lpfc_vlog_msg(vport, KERN_WARNING, LOG_ELS,
4889+
"0122 FDISC (x%x). "
4890+
"Fabric Detected Bad WWN\n",
4891+
stat.un.lsRjtError);
48994892
lpfc_vport_set_state(vport,
49004893
FC_VPORT_FABRIC_REJ_WWN);
49014894
}
@@ -5355,8 +5348,8 @@ lpfc_cmpl_els_rsp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
53555348
u32 ulp_status, ulp_word4, tmo, did, iotag;
53565349

53575350
if (!vport) {
5358-
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
5359-
"3177 ELS response failed\n");
5351+
lpfc_printf_log(phba, KERN_WARNING, LOG_ELS,
5352+
"3177 null vport in ELS rsp\n");
53605353
goto out;
53615354
}
53625355
if (cmdiocb->context_un.mbox)
@@ -11328,10 +11321,10 @@ lpfc_cmpl_els_fdisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
1132811321
/* Check for retry */
1132911322
if (lpfc_els_retry(phba, cmdiocb, rspiocb))
1133011323
goto out;
11331-
/* FDISC failed */
11332-
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
11333-
"0126 FDISC failed. (x%x/x%x)\n",
11334-
ulp_status, ulp_word4);
11324+
/* Warn FDISC status */
11325+
lpfc_vlog_msg(vport, KERN_WARNING, LOG_ELS,
11326+
"0126 FDISC cmpl status: x%x/x%x)\n",
11327+
ulp_status, ulp_word4);
1133511328
goto fdisc_failed;
1133611329
}
1133711330

0 commit comments

Comments
 (0)