Skip to content

Commit eb61c2d

Browse files
solbjorndavem330
authored andcommitted
qed: suppress false-positives interrupt error messages on HW init
It was found that qed_pglueb_rbc_attn_handler() can produce a lot of false-positive error detections on driver load/reload (especially after crashes/recoveries) and spam the kernel log: [ 4.958275] [qed_pglueb_rbc_attn_handler:324()]ICPL error - 00d00ff0 [ 2079.146764] [qed_pglueb_rbc_attn_handler:324()]ICPL error - 00d80ff0 [ 2116.374631] [qed_pglueb_rbc_attn_handler:324()]ICPL error - 00d80ff0 [ 2135.250564] [qed_pglueb_rbc_attn_handler:324()]ICPL error - 00d80ff0 [...] Reduce the logging level of two false-positive prone error messages from notice to verbose on initialization (only) to not mix it with real error attentions while debugging. Fixes: 666db48 ("qed: Revise load sequence to avoid PCI errors") Signed-off-by: Alexander Lobakin <[email protected]> Signed-off-by: Igor Russkikh <[email protected]> Signed-off-by: Michal Kalderon <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 1ea9990 commit eb61c2d

File tree

3 files changed

+32
-24
lines changed

3 files changed

+32
-24
lines changed

drivers/net/ethernet/qlogic/qed/qed_dev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3102,7 +3102,7 @@ int qed_hw_init(struct qed_dev *cdev, struct qed_hw_init_params *p_params)
31023102
}
31033103

31043104
/* Log and clear previous pglue_b errors if such exist */
3105-
qed_pglueb_rbc_attn_handler(p_hwfn, p_hwfn->p_main_ptt);
3105+
qed_pglueb_rbc_attn_handler(p_hwfn, p_hwfn->p_main_ptt, true);
31063106

31073107
/* Enable the PF's internal FID_enable in the PXP */
31083108
rc = qed_pglueb_set_pfid_enable(p_hwfn, p_hwfn->p_main_ptt,

drivers/net/ethernet/qlogic/qed/qed_int.c

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,10 @@ static int qed_grc_attn_cb(struct qed_hwfn *p_hwfn)
257257
#define PGLUE_ATTENTION_ZLR_VALID (1 << 25)
258258
#define PGLUE_ATTENTION_ILT_VALID (1 << 23)
259259

260-
int qed_pglueb_rbc_attn_handler(struct qed_hwfn *p_hwfn,
261-
struct qed_ptt *p_ptt)
260+
int qed_pglueb_rbc_attn_handler(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
261+
bool hw_init)
262262
{
263+
char msg[256];
263264
u32 tmp;
264265

265266
tmp = qed_rd(p_hwfn, p_ptt, PGLUE_B_REG_TX_ERR_WR_DETAILS2);
@@ -273,22 +274,23 @@ int qed_pglueb_rbc_attn_handler(struct qed_hwfn *p_hwfn,
273274
details = qed_rd(p_hwfn, p_ptt,
274275
PGLUE_B_REG_TX_ERR_WR_DETAILS);
275276

276-
DP_NOTICE(p_hwfn,
277-
"Illegal write by chip to [%08x:%08x] blocked.\n"
278-
"Details: %08x [PFID %02x, VFID %02x, VF_VALID %02x]\n"
279-
"Details2 %08x [Was_error %02x BME deassert %02x FID_enable deassert %02x]\n",
280-
addr_hi, addr_lo, details,
281-
(u8)GET_FIELD(details, PGLUE_ATTENTION_DETAILS_PFID),
282-
(u8)GET_FIELD(details, PGLUE_ATTENTION_DETAILS_VFID),
283-
GET_FIELD(details,
284-
PGLUE_ATTENTION_DETAILS_VF_VALID) ? 1 : 0,
285-
tmp,
286-
GET_FIELD(tmp,
287-
PGLUE_ATTENTION_DETAILS2_WAS_ERR) ? 1 : 0,
288-
GET_FIELD(tmp,
289-
PGLUE_ATTENTION_DETAILS2_BME) ? 1 : 0,
290-
GET_FIELD(tmp,
291-
PGLUE_ATTENTION_DETAILS2_FID_EN) ? 1 : 0);
277+
snprintf(msg, sizeof(msg),
278+
"Illegal write by chip to [%08x:%08x] blocked.\n"
279+
"Details: %08x [PFID %02x, VFID %02x, VF_VALID %02x]\n"
280+
"Details2 %08x [Was_error %02x BME deassert %02x FID_enable deassert %02x]",
281+
addr_hi, addr_lo, details,
282+
(u8)GET_FIELD(details, PGLUE_ATTENTION_DETAILS_PFID),
283+
(u8)GET_FIELD(details, PGLUE_ATTENTION_DETAILS_VFID),
284+
!!GET_FIELD(details, PGLUE_ATTENTION_DETAILS_VF_VALID),
285+
tmp,
286+
!!GET_FIELD(tmp, PGLUE_ATTENTION_DETAILS2_WAS_ERR),
287+
!!GET_FIELD(tmp, PGLUE_ATTENTION_DETAILS2_BME),
288+
!!GET_FIELD(tmp, PGLUE_ATTENTION_DETAILS2_FID_EN));
289+
290+
if (hw_init)
291+
DP_VERBOSE(p_hwfn, NETIF_MSG_INTR, "%s\n", msg);
292+
else
293+
DP_NOTICE(p_hwfn, "%s\n", msg);
292294
}
293295

294296
tmp = qed_rd(p_hwfn, p_ptt, PGLUE_B_REG_TX_ERR_RD_DETAILS2);
@@ -321,8 +323,14 @@ int qed_pglueb_rbc_attn_handler(struct qed_hwfn *p_hwfn,
321323
}
322324

323325
tmp = qed_rd(p_hwfn, p_ptt, PGLUE_B_REG_TX_ERR_WR_DETAILS_ICPL);
324-
if (tmp & PGLUE_ATTENTION_ICPL_VALID)
325-
DP_NOTICE(p_hwfn, "ICPL error - %08x\n", tmp);
326+
if (tmp & PGLUE_ATTENTION_ICPL_VALID) {
327+
snprintf(msg, sizeof(msg), "ICPL error - %08x", tmp);
328+
329+
if (hw_init)
330+
DP_VERBOSE(p_hwfn, NETIF_MSG_INTR, "%s\n", msg);
331+
else
332+
DP_NOTICE(p_hwfn, "%s\n", msg);
333+
}
326334

327335
tmp = qed_rd(p_hwfn, p_ptt, PGLUE_B_REG_MASTER_ZLR_ERR_DETAILS);
328336
if (tmp & PGLUE_ATTENTION_ZLR_VALID) {
@@ -361,7 +369,7 @@ int qed_pglueb_rbc_attn_handler(struct qed_hwfn *p_hwfn,
361369

362370
static int qed_pglueb_rbc_attn_cb(struct qed_hwfn *p_hwfn)
363371
{
364-
return qed_pglueb_rbc_attn_handler(p_hwfn, p_hwfn->p_dpc_ptt);
372+
return qed_pglueb_rbc_attn_handler(p_hwfn, p_hwfn->p_dpc_ptt, false);
365373
}
366374

367375
static int qed_fw_assertion(struct qed_hwfn *p_hwfn)

drivers/net/ethernet/qlogic/qed/qed_int.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ int qed_int_set_timer_res(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
442442

443443
#define QED_MAPPING_MEMORY_SIZE(dev) (NUM_OF_SBS(dev))
444444

445-
int qed_pglueb_rbc_attn_handler(struct qed_hwfn *p_hwfn,
446-
struct qed_ptt *p_ptt);
445+
int qed_pglueb_rbc_attn_handler(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
446+
bool hw_init);
447447

448448
#endif

0 commit comments

Comments
 (0)