diff options
author | Michael Chan <mchan@broadcom.com> | 2009-08-21 12:20:46 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-22 20:48:48 -0400 |
commit | 61d9e3fa7eacabfb7879e3da91709f1a5420c507 (patch) | |
tree | c1a14dc4fa43429961e1b53651870f4b749d66af /drivers/net/bnx2.c | |
parent | 6fefb65e78f098c09d0ab877b2c70421e4c84116 (diff) |
bnx2: Apply BROKEN_STATS workaround to 5706 and 5708.
Add flag to expand the workaround to both chips.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r-- | drivers/net/bnx2.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 1d502e6f6c9c..085c2dd8e7f8 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -4900,7 +4900,7 @@ bnx2_init_chip(struct bnx2 *bp) | |||
4900 | REG_WR(bp, BNX2_HC_CMD_TICKS, | 4900 | REG_WR(bp, BNX2_HC_CMD_TICKS, |
4901 | (bp->cmd_ticks_int << 16) | bp->cmd_ticks); | 4901 | (bp->cmd_ticks_int << 16) | bp->cmd_ticks); |
4902 | 4902 | ||
4903 | if (CHIP_NUM(bp) == CHIP_NUM_5708) | 4903 | if (bp->flags & BNX2_FLAG_BROKEN_STATS) |
4904 | REG_WR(bp, BNX2_HC_STATS_TICKS, 0); | 4904 | REG_WR(bp, BNX2_HC_STATS_TICKS, 0); |
4905 | else | 4905 | else |
4906 | REG_WR(bp, BNX2_HC_STATS_TICKS, bp->stats_ticks); | 4906 | REG_WR(bp, BNX2_HC_STATS_TICKS, bp->stats_ticks); |
@@ -6025,7 +6025,7 @@ bnx2_timer(unsigned long data) | |||
6025 | bnx2_reg_rd_ind(bp, BNX2_FW_RX_DROP_COUNT); | 6025 | bnx2_reg_rd_ind(bp, BNX2_FW_RX_DROP_COUNT); |
6026 | 6026 | ||
6027 | /* workaround occasional corrupted counters */ | 6027 | /* workaround occasional corrupted counters */ |
6028 | if (CHIP_NUM(bp) == CHIP_NUM_5708 && bp->stats_ticks) | 6028 | if ((bp->flags & BNX2_FLAG_BROKEN_STATS) && bp->stats_ticks) |
6029 | REG_WR(bp, BNX2_HC_COMMAND, bp->hc_cmd | | 6029 | REG_WR(bp, BNX2_HC_COMMAND, bp->hc_cmd | |
6030 | BNX2_HC_COMMAND_STATS_NOW); | 6030 | BNX2_HC_COMMAND_STATS_NOW); |
6031 | 6031 | ||
@@ -6941,7 +6941,7 @@ bnx2_set_coalesce(struct net_device *dev, struct ethtool_coalesce *coal) | |||
6941 | 0xff; | 6941 | 0xff; |
6942 | 6942 | ||
6943 | bp->stats_ticks = coal->stats_block_coalesce_usecs; | 6943 | bp->stats_ticks = coal->stats_block_coalesce_usecs; |
6944 | if (CHIP_NUM(bp) == CHIP_NUM_5708) { | 6944 | if (bp->flags & BNX2_FLAG_BROKEN_STATS) { |
6945 | if (bp->stats_ticks != 0 && bp->stats_ticks != USEC_PER_SEC) | 6945 | if (bp->stats_ticks != 0 && bp->stats_ticks != USEC_PER_SEC) |
6946 | bp->stats_ticks = USEC_PER_SEC; | 6946 | bp->stats_ticks = USEC_PER_SEC; |
6947 | } | 6947 | } |
@@ -7722,6 +7722,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) | |||
7722 | rc = -EIO; | 7722 | rc = -EIO; |
7723 | goto err_out_unmap; | 7723 | goto err_out_unmap; |
7724 | } | 7724 | } |
7725 | bp->flags |= BNX2_FLAG_BROKEN_STATS; | ||
7725 | } | 7726 | } |
7726 | 7727 | ||
7727 | if (CHIP_NUM(bp) == CHIP_NUM_5709 && CHIP_REV(bp) != CHIP_REV_Ax) { | 7728 | if (CHIP_NUM(bp) == CHIP_NUM_5709 && CHIP_REV(bp) != CHIP_REV_Ax) { |