aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x/bnx2x_init.h
diff options
context:
space:
mode:
authorVladislav Zolotarov <vladz@broadcom.com>2011-07-21 03:58:36 -0400
committerDavid S. Miller <davem@davemloft.net>2011-07-21 15:33:56 -0400
commit8736c82650500222c031dd7f59f0126e59808e36 (patch)
tree408084aee5546fbb65e3343fbb2ab146dbc50315 /drivers/net/bnx2x/bnx2x_init.h
parentc03bd39c564f4b5d7683514e9249986e1404940d (diff)
bnx2x: Parity errors recovery for 578xx
Fix the parity errors recovery flow for 578xx: - Add a separate column for the 578xx in the parity mask registers DB. - Fix the bnx2x_process_kill_chip_reset() to handle the blocks newly introduced in the 578xx. Cover ATC and PGLUE_B blocks for 57712 and 578xx. Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x/bnx2x_init.h')
-rw-r--r--drivers/net/bnx2x/bnx2x_init.h101
1 files changed, 56 insertions, 45 deletions
diff --git a/drivers/net/bnx2x/bnx2x_init.h b/drivers/net/bnx2x/bnx2x_init.h
index 82795a8349f..4d748e77d1a 100644
--- a/drivers/net/bnx2x/bnx2x_init.h
+++ b/drivers/net/bnx2x/bnx2x_init.h
@@ -326,25 +326,25 @@ struct src_ent {
326/**************************************************************************** 326/****************************************************************************
327* Parity configuration 327* Parity configuration
328****************************************************************************/ 328****************************************************************************/
329#define BLOCK_PRTY_INFO(block, en_mask, m1, m1h, m2) \ 329#define BLOCK_PRTY_INFO(block, en_mask, m1, m1h, m2, m3) \
330{ \ 330{ \
331 block##_REG_##block##_PRTY_MASK, \ 331 block##_REG_##block##_PRTY_MASK, \
332 block##_REG_##block##_PRTY_STS_CLR, \ 332 block##_REG_##block##_PRTY_STS_CLR, \
333 en_mask, {m1, m1h, m2}, #block \ 333 en_mask, {m1, m1h, m2, m3}, #block \
334} 334}
335 335
336#define BLOCK_PRTY_INFO_0(block, en_mask, m1, m1h, m2) \ 336#define BLOCK_PRTY_INFO_0(block, en_mask, m1, m1h, m2, m3) \
337{ \ 337{ \
338 block##_REG_##block##_PRTY_MASK_0, \ 338 block##_REG_##block##_PRTY_MASK_0, \
339 block##_REG_##block##_PRTY_STS_CLR_0, \ 339 block##_REG_##block##_PRTY_STS_CLR_0, \
340 en_mask, {m1, m1h, m2}, #block"_0" \ 340 en_mask, {m1, m1h, m2, m3}, #block"_0" \
341} 341}
342 342
343#define BLOCK_PRTY_INFO_1(block, en_mask, m1, m1h, m2) \ 343#define BLOCK_PRTY_INFO_1(block, en_mask, m1, m1h, m2, m3) \
344{ \ 344{ \
345 block##_REG_##block##_PRTY_MASK_1, \ 345 block##_REG_##block##_PRTY_MASK_1, \
346 block##_REG_##block##_PRTY_STS_CLR_1, \ 346 block##_REG_##block##_PRTY_STS_CLR_1, \
347 en_mask, {m1, m1h, m2}, #block"_1" \ 347 en_mask, {m1, m1h, m2, m3}, #block"_1" \
348} 348}
349 349
350static const struct { 350static const struct {
@@ -355,6 +355,7 @@ static const struct {
355 u32 e1; /* 57710 */ 355 u32 e1; /* 57710 */
356 u32 e1h; /* 57711 */ 356 u32 e1h; /* 57711 */
357 u32 e2; /* 57712 */ 357 u32 e2; /* 57712 */
358 u32 e3; /* 578xx */
358 } reg_mask; /* Register mask (all valid bits) */ 359 } reg_mask; /* Register mask (all valid bits) */
359 char name[7]; /* Block's longest name is 6 characters long 360 char name[7]; /* Block's longest name is 6 characters long
360 * (name + suffix) 361 * (name + suffix)
@@ -372,48 +373,56 @@ static const struct {
372 /* Block IGU, MISC, PXP and PXP2 parity errors as long as we don't 373 /* Block IGU, MISC, PXP and PXP2 parity errors as long as we don't
373 * want to handle "system kill" flow at the moment. 374 * want to handle "system kill" flow at the moment.
374 */ 375 */
375 BLOCK_PRTY_INFO(PXP, 0x7ffffff, 0x3ffffff, 0x3ffffff, 0x7ffffff), 376 BLOCK_PRTY_INFO(PXP, 0x7ffffff, 0x3ffffff, 0x3ffffff, 0x7ffffff,
376 BLOCK_PRTY_INFO_0(PXP2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), 377 0x7ffffff),
377 BLOCK_PRTY_INFO_1(PXP2, 0x7ff, 0x7f, 0x7f, 0x7ff), 378 BLOCK_PRTY_INFO_0(PXP2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
378 BLOCK_PRTY_INFO(HC, 0x7, 0x7, 0x7, 0), 379 0xffffffff),
379 BLOCK_PRTY_INFO(NIG, 0xffffffff, 0x3fffffff, 0xffffffff, 0), 380 BLOCK_PRTY_INFO_1(PXP2, 0x1ffffff, 0x7f, 0x7f, 0x7ff, 0x1ffffff),
380 BLOCK_PRTY_INFO_0(NIG, 0xffffffff, 0, 0, 0xffffffff), 381 BLOCK_PRTY_INFO(HC, 0x7, 0x7, 0x7, 0, 0),
381 BLOCK_PRTY_INFO_1(NIG, 0xffff, 0, 0, 0xffff), 382 BLOCK_PRTY_INFO(NIG, 0xffffffff, 0x3fffffff, 0xffffffff, 0, 0),
382 BLOCK_PRTY_INFO(IGU, 0x7ff, 0, 0, 0x7ff), 383 BLOCK_PRTY_INFO_0(NIG, 0xffffffff, 0, 0, 0xffffffff, 0xffffffff),
383 BLOCK_PRTY_INFO(MISC, 0x1, 0x1, 0x1, 0x1), 384 BLOCK_PRTY_INFO_1(NIG, 0xffff, 0, 0, 0xff, 0xffff),
384 BLOCK_PRTY_INFO(QM, 0, 0x1ff, 0xfff, 0xfff), 385 BLOCK_PRTY_INFO(IGU, 0x7ff, 0, 0, 0x7ff, 0x7ff),
385 BLOCK_PRTY_INFO(DORQ, 0, 0x3, 0x3, 0x3), 386 BLOCK_PRTY_INFO(MISC, 0x1, 0x1, 0x1, 0x1, 0x1),
387 BLOCK_PRTY_INFO(QM, 0, 0x1ff, 0xfff, 0xfff, 0xfff),
388 BLOCK_PRTY_INFO(ATC, 0x1f, 0, 0, 0x1f, 0x1f),
389 BLOCK_PRTY_INFO(PGLUE_B, 0x3, 0, 0, 0x3, 0x3),
390 BLOCK_PRTY_INFO(DORQ, 0, 0x3, 0x3, 0x3, 0x3),
386 {GRCBASE_UPB + PB_REG_PB_PRTY_MASK, 391 {GRCBASE_UPB + PB_REG_PB_PRTY_MASK,
387 GRCBASE_UPB + PB_REG_PB_PRTY_STS_CLR, 0xf, 392 GRCBASE_UPB + PB_REG_PB_PRTY_STS_CLR, 0xf,
388 {0xf, 0xf, 0xf}, "UPB"}, 393 {0xf, 0xf, 0xf, 0xf}, "UPB"},
389 {GRCBASE_XPB + PB_REG_PB_PRTY_MASK, 394 {GRCBASE_XPB + PB_REG_PB_PRTY_MASK,
390 GRCBASE_XPB + PB_REG_PB_PRTY_STS_CLR, 0, 395 GRCBASE_XPB + PB_REG_PB_PRTY_STS_CLR, 0,
391 {0xf, 0xf, 0xf}, "XPB"}, 396 {0xf, 0xf, 0xf, 0xf}, "XPB"},
392 BLOCK_PRTY_INFO(SRC, 0x4, 0x7, 0x7, 0x7), 397 BLOCK_PRTY_INFO(SRC, 0x4, 0x7, 0x7, 0x7, 0x7),
393 BLOCK_PRTY_INFO(CDU, 0, 0x1f, 0x1f, 0x1f), 398 BLOCK_PRTY_INFO(CDU, 0, 0x1f, 0x1f, 0x1f, 0x1f),
394 BLOCK_PRTY_INFO(CFC, 0, 0xf, 0xf, 0xf), 399 BLOCK_PRTY_INFO(CFC, 0, 0xf, 0xf, 0xf, 0x3f),
395 BLOCK_PRTY_INFO(DBG, 0, 0x1, 0x1, 0x1), 400 BLOCK_PRTY_INFO(DBG, 0, 0x1, 0x1, 0x1, 0x1),
396 BLOCK_PRTY_INFO(DMAE, 0, 0xf, 0xf, 0xf), 401 BLOCK_PRTY_INFO(DMAE, 0, 0xf, 0xf, 0xf, 0xf),
397 BLOCK_PRTY_INFO(BRB1, 0, 0xf, 0xf, 0xf), 402 BLOCK_PRTY_INFO(BRB1, 0, 0xf, 0xf, 0xf, 0xf),
398 BLOCK_PRTY_INFO(PRS, (1<<6), 0xff, 0xff, 0xff), 403 BLOCK_PRTY_INFO(PRS, (1<<6), 0xff, 0xff, 0xff, 0xff),
399 BLOCK_PRTY_INFO(PBF, 0, 0, 0x3ffff, 0xfffffff), 404 BLOCK_PRTY_INFO(PBF, 0, 0, 0x3ffff, 0xfffff, 0xfffffff),
400 BLOCK_PRTY_INFO(TM, 0, 0, 0x7f, 0x7f), 405 BLOCK_PRTY_INFO(TM, 0, 0, 0x7f, 0x7f, 0x7f),
401 BLOCK_PRTY_INFO(TSDM, 0x18, 0x7ff, 0x7ff, 0x7ff), 406 BLOCK_PRTY_INFO(TSDM, 0x18, 0x7ff, 0x7ff, 0x7ff, 0x7ff),
402 BLOCK_PRTY_INFO(CSDM, 0x8, 0x7ff, 0x7ff, 0x7ff), 407 BLOCK_PRTY_INFO(CSDM, 0x8, 0x7ff, 0x7ff, 0x7ff, 0x7ff),
403 BLOCK_PRTY_INFO(USDM, 0x38, 0x7ff, 0x7ff, 0x7ff), 408 BLOCK_PRTY_INFO(USDM, 0x38, 0x7ff, 0x7ff, 0x7ff, 0x7ff),
404 BLOCK_PRTY_INFO(XSDM, 0x8, 0x7ff, 0x7ff, 0x7ff), 409 BLOCK_PRTY_INFO(XSDM, 0x8, 0x7ff, 0x7ff, 0x7ff, 0x7ff),
405 BLOCK_PRTY_INFO(TCM, 0, 0, 0x7ffffff, 0x7ffffff), 410 BLOCK_PRTY_INFO(TCM, 0, 0, 0x7ffffff, 0x7ffffff, 0x7ffffff),
406 BLOCK_PRTY_INFO(CCM, 0, 0, 0x7ffffff, 0x7ffffff), 411 BLOCK_PRTY_INFO(CCM, 0, 0, 0x7ffffff, 0x7ffffff, 0x7ffffff),
407 BLOCK_PRTY_INFO(UCM, 0, 0, 0x7ffffff, 0x7ffffff), 412 BLOCK_PRTY_INFO(UCM, 0, 0, 0x7ffffff, 0x7ffffff, 0x7ffffff),
408 BLOCK_PRTY_INFO(XCM, 0, 0, 0x3fffffff, 0x3fffffff), 413 BLOCK_PRTY_INFO(XCM, 0, 0, 0x3fffffff, 0x3fffffff, 0x3fffffff),
409 BLOCK_PRTY_INFO_0(TSEM, 0, 0xffffffff, 0xffffffff, 0xffffffff), 414 BLOCK_PRTY_INFO_0(TSEM, 0, 0xffffffff, 0xffffffff, 0xffffffff,
410 BLOCK_PRTY_INFO_1(TSEM, 0, 0x3, 0x1f, 0x3f), 415 0xffffffff),
411 BLOCK_PRTY_INFO_0(USEM, 0, 0xffffffff, 0xffffffff, 0xffffffff), 416 BLOCK_PRTY_INFO_1(TSEM, 0, 0x3, 0x1f, 0x3f, 0x3f),
412 BLOCK_PRTY_INFO_1(USEM, 0, 0x3, 0x1f, 0x1f), 417 BLOCK_PRTY_INFO_0(USEM, 0, 0xffffffff, 0xffffffff, 0xffffffff,
413 BLOCK_PRTY_INFO_0(CSEM, 0, 0xffffffff, 0xffffffff, 0xffffffff), 418 0xffffffff),
414 BLOCK_PRTY_INFO_1(CSEM, 0, 0x3, 0x1f, 0x1f), 419 BLOCK_PRTY_INFO_1(USEM, 0, 0x3, 0x1f, 0x1f, 0x1f),
415 BLOCK_PRTY_INFO_0(XSEM, 0, 0xffffffff, 0xffffffff, 0xffffffff), 420 BLOCK_PRTY_INFO_0(CSEM, 0, 0xffffffff, 0xffffffff, 0xffffffff,
416 BLOCK_PRTY_INFO_1(XSEM, 0, 0x3, 0x1f, 0x3f), 421 0xffffffff),
422 BLOCK_PRTY_INFO_1(CSEM, 0, 0x3, 0x1f, 0x1f, 0x1f),
423 BLOCK_PRTY_INFO_0(XSEM, 0, 0xffffffff, 0xffffffff, 0xffffffff,
424 0xffffffff),
425 BLOCK_PRTY_INFO_1(XSEM, 0, 0x3, 0x1f, 0x3f, 0x3f),
417}; 426};
418 427
419 428
@@ -464,8 +473,10 @@ static inline u32 bnx2x_parity_reg_mask(struct bnx2x *bp, int idx)
464 return bnx2x_blocks_parity_data[idx].reg_mask.e1; 473 return bnx2x_blocks_parity_data[idx].reg_mask.e1;
465 else if (CHIP_IS_E1H(bp)) 474 else if (CHIP_IS_E1H(bp))
466 return bnx2x_blocks_parity_data[idx].reg_mask.e1h; 475 return bnx2x_blocks_parity_data[idx].reg_mask.e1h;
467 else 476 else if (CHIP_IS_E2(bp))
468 return bnx2x_blocks_parity_data[idx].reg_mask.e2; 477 return bnx2x_blocks_parity_data[idx].reg_mask.e2;
478 else /* CHIP_IS_E3 */
479 return bnx2x_blocks_parity_data[idx].reg_mask.e3;
469} 480}
470 481
471static inline void bnx2x_disable_blocks_parity(struct bnx2x *bp) 482static inline void bnx2x_disable_blocks_parity(struct bnx2x *bp)