aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x_main.c
diff options
context:
space:
mode:
authorEilon Greenstein <eilong@broadcom.com>2009-11-09 01:09:35 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-10 23:54:36 -0500
commit7d323bfdc056a9142b8bdbab88e4d3ac6e4989e4 (patch)
tree84e2f5cdc1c6d7164366c5696af4ce8f807a9bf7 /drivers/net/bnx2x_main.c
parent91545f6e588c601d1dff01d396155d973db83a31 (diff)
bnx2x: Change coalescing granularity to 4us
Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x_main.c')
-rw-r--r--drivers/net/bnx2x_main.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index ed56973794e8..08e6a35cfc20 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -4928,21 +4928,21 @@ static void bnx2x_update_coalesce(struct bnx2x *bp)
4928 REG_WR8(bp, BAR_CSTRORM_INTMEM + 4928 REG_WR8(bp, BAR_CSTRORM_INTMEM +
4929 CSTORM_SB_HC_TIMEOUT_U_OFFSET(port, sb_id, 4929 CSTORM_SB_HC_TIMEOUT_U_OFFSET(port, sb_id,
4930 U_SB_ETH_RX_CQ_INDEX), 4930 U_SB_ETH_RX_CQ_INDEX),
4931 bp->rx_ticks/12); 4931 bp->rx_ticks/(4 * BNX2X_BTR));
4932 REG_WR16(bp, BAR_CSTRORM_INTMEM + 4932 REG_WR16(bp, BAR_CSTRORM_INTMEM +
4933 CSTORM_SB_HC_DISABLE_U_OFFSET(port, sb_id, 4933 CSTORM_SB_HC_DISABLE_U_OFFSET(port, sb_id,
4934 U_SB_ETH_RX_CQ_INDEX), 4934 U_SB_ETH_RX_CQ_INDEX),
4935 (bp->rx_ticks/12) ? 0 : 1); 4935 (bp->rx_ticks/(4 * BNX2X_BTR)) ? 0 : 1);
4936 4936
4937 /* HC_INDEX_C_ETH_TX_CQ_CONS */ 4937 /* HC_INDEX_C_ETH_TX_CQ_CONS */
4938 REG_WR8(bp, BAR_CSTRORM_INTMEM + 4938 REG_WR8(bp, BAR_CSTRORM_INTMEM +
4939 CSTORM_SB_HC_TIMEOUT_C_OFFSET(port, sb_id, 4939 CSTORM_SB_HC_TIMEOUT_C_OFFSET(port, sb_id,
4940 C_SB_ETH_TX_CQ_INDEX), 4940 C_SB_ETH_TX_CQ_INDEX),
4941 bp->tx_ticks/12); 4941 bp->tx_ticks/(4 * BNX2X_BTR));
4942 REG_WR16(bp, BAR_CSTRORM_INTMEM + 4942 REG_WR16(bp, BAR_CSTRORM_INTMEM +
4943 CSTORM_SB_HC_DISABLE_C_OFFSET(port, sb_id, 4943 CSTORM_SB_HC_DISABLE_C_OFFSET(port, sb_id,
4944 C_SB_ETH_TX_CQ_INDEX), 4944 C_SB_ETH_TX_CQ_INDEX),
4945 (bp->tx_ticks/12) ? 0 : 1); 4945 (bp->tx_ticks/(4 * BNX2X_BTR)) ? 0 : 1);
4946 } 4946 }
4947} 4947}
4948 4948
@@ -9016,8 +9016,9 @@ static int __devinit bnx2x_init_bp(struct bnx2x *bp)
9016 9016
9017 bp->rx_csum = 1; 9017 bp->rx_csum = 1;
9018 9018
9019 bp->tx_ticks = 50; 9019 /* make sure that the numbers are in the right granularity */
9020 bp->rx_ticks = 25; 9020 bp->tx_ticks = (50 / (4 * BNX2X_BTR)) * (4 * BNX2X_BTR);
9021 bp->rx_ticks = (25 / (4 * BNX2X_BTR)) * (4 * BNX2X_BTR);
9021 9022
9022 timer_interval = (CHIP_REV_IS_SLOW(bp) ? 5*HZ : HZ); 9023 timer_interval = (CHIP_REV_IS_SLOW(bp) ? 5*HZ : HZ);
9023 bp->current_interval = (poll ? poll : timer_interval); 9024 bp->current_interval = (poll ? poll : timer_interval);