aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x/bnx2x_main.c
diff options
context:
space:
mode:
authorVladislav Zolotarov <vladz@broadcom.com>2010-10-19 01:13:09 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-19 11:37:37 -0400
commitf4a66897e77277335ae98ffeb1f4ebb9cf24ed6d (patch)
treeff66c35e00394931b55716d945a8321c2bfcdbbe /drivers/net/bnx2x/bnx2x_main.c
parenta0fd065cd5d8f758b27c13cafabbbcf59d1eb8ec (diff)
bnx2x: prevent false parity error in MSI-X memory of HC block
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> 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_main.c')
-rw-r--r--drivers/net/bnx2x/bnx2x_main.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
index 3f49b551ff05..f22e283cabef 100644
--- a/drivers/net/bnx2x/bnx2x_main.c
+++ b/drivers/net/bnx2x/bnx2x_main.c
@@ -5457,7 +5457,8 @@ static int bnx2x_init_hw_func(struct bnx2x *bp)
5457 struct bnx2x_ilt *ilt = BP_ILT(bp); 5457 struct bnx2x_ilt *ilt = BP_ILT(bp);
5458 u16 cdu_ilt_start; 5458 u16 cdu_ilt_start;
5459 u32 addr, val; 5459 u32 addr, val;
5460 int i; 5460 u32 main_mem_base, main_mem_size, main_mem_prty_clr;
5461 int i, main_mem_width;
5461 5462
5462 DP(BNX2X_MSG_MCP, "starting func init func %d\n", func); 5463 DP(BNX2X_MSG_MCP, "starting func init func %d\n", func);
5463 5464
@@ -5706,6 +5707,31 @@ static int bnx2x_init_hw_func(struct bnx2x *bp)
5706 bnx2x_init_block(bp, MCP_BLOCK, FUNC0_STAGE + func); 5707 bnx2x_init_block(bp, MCP_BLOCK, FUNC0_STAGE + func);
5707 bnx2x_init_block(bp, DMAE_BLOCK, FUNC0_STAGE + func); 5708 bnx2x_init_block(bp, DMAE_BLOCK, FUNC0_STAGE + func);
5708 5709
5710 if (CHIP_IS_E1x(bp)) {
5711 main_mem_size = HC_REG_MAIN_MEMORY_SIZE / 2; /*dwords*/
5712 main_mem_base = HC_REG_MAIN_MEMORY +
5713 BP_PORT(bp) * (main_mem_size * 4);
5714 main_mem_prty_clr = HC_REG_HC_PRTY_STS_CLR;
5715 main_mem_width = 8;
5716
5717 val = REG_RD(bp, main_mem_prty_clr);
5718 if (val)
5719 DP(BNX2X_MSG_MCP, "Hmmm... Parity errors in HC "
5720 "block during "
5721 "function init (0x%x)!\n", val);
5722
5723 /* Clear "false" parity errors in MSI-X table */
5724 for (i = main_mem_base;
5725 i < main_mem_base + main_mem_size * 4;
5726 i += main_mem_width) {
5727 bnx2x_read_dmae(bp, i, main_mem_width / 4);
5728 bnx2x_write_dmae(bp, bnx2x_sp_mapping(bp, wb_data),
5729 i, main_mem_width / 4);
5730 }
5731 /* Clear HC parity attention */
5732 REG_RD(bp, main_mem_prty_clr);
5733 }
5734
5709 bnx2x_phy_probe(&bp->link_params); 5735 bnx2x_phy_probe(&bp->link_params);
5710 5736
5711 return 0; 5737 return 0;