@@ -257,9 +257,10 @@ static int qed_grc_attn_cb(struct qed_hwfn *p_hwfn)
257
257
#define PGLUE_ATTENTION_ZLR_VALID (1 << 25)
258
258
#define PGLUE_ATTENTION_ILT_VALID (1 << 23)
259
259
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 )
262
262
{
263
+ char msg [256 ];
263
264
u32 tmp ;
264
265
265
266
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,
273
274
details = qed_rd (p_hwfn , p_ptt ,
274
275
PGLUE_B_REG_TX_ERR_WR_DETAILS );
275
276
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 );
292
294
}
293
295
294
296
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,
321
323
}
322
324
323
325
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
+ }
326
334
327
335
tmp = qed_rd (p_hwfn , p_ptt , PGLUE_B_REG_MASTER_ZLR_ERR_DETAILS );
328
336
if (tmp & PGLUE_ATTENTION_ZLR_VALID ) {
@@ -361,7 +369,7 @@ int qed_pglueb_rbc_attn_handler(struct qed_hwfn *p_hwfn,
361
369
362
370
static int qed_pglueb_rbc_attn_cb (struct qed_hwfn * p_hwfn )
363
371
{
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 );
365
373
}
366
374
367
375
static int qed_fw_assertion (struct qed_hwfn * p_hwfn )
0 commit comments