Skip to content

Commit

Permalink
bnx2x: Change coalescing granularity to 4us
Browse files Browse the repository at this point in the history
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eilon Greenstein authored and David S. Miller committed Nov 11, 2009
1 parent 91545f6 commit 7d323bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion drivers/net/bnx2x.h
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,7 @@ static inline u32 reg_poll(struct bnx2x *bp, u32 reg, u32 expected, int ms,
#define MAX_SP_DESC_CNT (SP_DESC_CNT - 1)


#define BNX2X_BTR 3
#define BNX2X_BTR 1
#define MAX_SPQ_PENDING 8


Expand Down
13 changes: 7 additions & 6 deletions drivers/net/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4928,21 +4928,21 @@ static void bnx2x_update_coalesce(struct bnx2x *bp)
REG_WR8(bp, BAR_CSTRORM_INTMEM +
CSTORM_SB_HC_TIMEOUT_U_OFFSET(port, sb_id,
U_SB_ETH_RX_CQ_INDEX),
bp->rx_ticks/12);
bp->rx_ticks/(4 * BNX2X_BTR));
REG_WR16(bp, BAR_CSTRORM_INTMEM +
CSTORM_SB_HC_DISABLE_U_OFFSET(port, sb_id,
U_SB_ETH_RX_CQ_INDEX),
(bp->rx_ticks/12) ? 0 : 1);
(bp->rx_ticks/(4 * BNX2X_BTR)) ? 0 : 1);

/* HC_INDEX_C_ETH_TX_CQ_CONS */
REG_WR8(bp, BAR_CSTRORM_INTMEM +
CSTORM_SB_HC_TIMEOUT_C_OFFSET(port, sb_id,
C_SB_ETH_TX_CQ_INDEX),
bp->tx_ticks/12);
bp->tx_ticks/(4 * BNX2X_BTR));
REG_WR16(bp, BAR_CSTRORM_INTMEM +
CSTORM_SB_HC_DISABLE_C_OFFSET(port, sb_id,
C_SB_ETH_TX_CQ_INDEX),
(bp->tx_ticks/12) ? 0 : 1);
(bp->tx_ticks/(4 * BNX2X_BTR)) ? 0 : 1);
}
}

Expand Down Expand Up @@ -9016,8 +9016,9 @@ static int __devinit bnx2x_init_bp(struct bnx2x *bp)

bp->rx_csum = 1;

bp->tx_ticks = 50;
bp->rx_ticks = 25;
/* make sure that the numbers are in the right granularity */
bp->tx_ticks = (50 / (4 * BNX2X_BTR)) * (4 * BNX2X_BTR);
bp->rx_ticks = (25 / (4 * BNX2X_BTR)) * (4 * BNX2X_BTR);

timer_interval = (CHIP_REV_IS_SLOW(bp) ? 5*HZ : HZ);
bp->current_interval = (poll ? poll : timer_interval);
Expand Down

0 comments on commit 7d323bf

Please sign in to comment.