bnx2x: Fix status blocks configuration
This fixes 2 issues regarding bnx2x's status blocks: 1. ethtool -c caused corruption of status blocks in FW RAM. 2. when using multi-CoS, the configuration of the timeout values of status blocks is incorrect, harming the coalescing of interrupts for such CoSs. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d46f7c4df3
commit
0c14e5ced2
@ -2614,6 +2614,9 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* initialize FW coalescing state machines in RAM */
|
||||||
|
bnx2x_update_coalesce(bp);
|
||||||
|
|
||||||
/* setup the leading queue */
|
/* setup the leading queue */
|
||||||
rc = bnx2x_setup_leading(bp);
|
rc = bnx2x_setup_leading(bp);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
@ -4580,11 +4583,11 @@ static void storm_memset_hc_disable(struct bnx2x *bp, u8 port,
|
|||||||
u32 enable_flag = disable ? 0 : (1 << HC_INDEX_DATA_HC_ENABLED_SHIFT);
|
u32 enable_flag = disable ? 0 : (1 << HC_INDEX_DATA_HC_ENABLED_SHIFT);
|
||||||
u32 addr = BAR_CSTRORM_INTMEM +
|
u32 addr = BAR_CSTRORM_INTMEM +
|
||||||
CSTORM_STATUS_BLOCK_DATA_FLAGS_OFFSET(fw_sb_id, sb_index);
|
CSTORM_STATUS_BLOCK_DATA_FLAGS_OFFSET(fw_sb_id, sb_index);
|
||||||
u16 flags = REG_RD16(bp, addr);
|
u8 flags = REG_RD8(bp, addr);
|
||||||
/* clear and set */
|
/* clear and set */
|
||||||
flags &= ~HC_INDEX_DATA_HC_ENABLED;
|
flags &= ~HC_INDEX_DATA_HC_ENABLED;
|
||||||
flags |= enable_flag;
|
flags |= enable_flag;
|
||||||
REG_WR16(bp, addr, flags);
|
REG_WR8(bp, addr, flags);
|
||||||
DP(NETIF_MSG_IFUP,
|
DP(NETIF_MSG_IFUP,
|
||||||
"port %x fw_sb_id %d sb_index %d disable %d\n",
|
"port %x fw_sb_id %d sb_index %d disable %d\n",
|
||||||
port, fw_sb_id, sb_index, disable);
|
port, fw_sb_id, sb_index, disable);
|
||||||
|
Loading…
Reference in New Issue
Block a user