Commit 9a6d3431 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Francois Romieu

[PATCH] sky2: force early transmit status

Need to force a transmit coalesce timer restart after processing
transmit packets. Otherwise, can get transmit status after last
update and chip doesn't send the next one.

Can go with the chip defaults for coalescing timers, except for
Tx timer which needs to be bigger.
Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
parent a8fd6266
...@@ -1988,13 +1988,12 @@ static int sky2_poll(struct net_device *dev0, int *budget) ...@@ -1988,13 +1988,12 @@ static int sky2_poll(struct net_device *dev0, int *budget)
sky2_tx_check(hw, 0, tx_done[0]); sky2_tx_check(hw, 0, tx_done[0]);
sky2_tx_check(hw, 1, tx_done[1]); sky2_tx_check(hw, 1, tx_done[1]);
if (likely(work_done < to_do)) { if (sky2_read8(hw, STAT_TX_TIMER_CTRL) == TIM_START) {
/* need to restart TX timer */ sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_STOP);
if (is_ec_a1(hw)) { sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_START);
sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_STOP); }
sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_START);
}
if (likely(work_done < to_do)) {
netif_rx_complete(dev0); netif_rx_complete(dev0);
hw->intr_mask |= Y2_IS_STAT_BMU; hw->intr_mask |= Y2_IS_STAT_BMU;
sky2_write32(hw, B0_IMSK, hw->intr_mask); sky2_write32(hw, B0_IMSK, hw->intr_mask);
...@@ -2352,8 +2351,7 @@ static int sky2_reset(struct sky2_hw *hw) ...@@ -2352,8 +2351,7 @@ static int sky2_reset(struct sky2_hw *hw)
sky2_write8(hw, STAT_FIFO_ISR_WM, 16); sky2_write8(hw, STAT_FIFO_ISR_WM, 16);
sky2_write32(hw, STAT_TX_TIMER_INI, sky2_us2clk(hw, 1000)); sky2_write32(hw, STAT_TX_TIMER_INI, sky2_us2clk(hw, 1000));
sky2_write32(hw, STAT_LEV_TIMER_INI, sky2_us2clk(hw, 100)); sky2_write32(hw, STAT_ISR_TIMER_INI, sky2_us2clk(hw, 7));
sky2_write32(hw, STAT_ISR_TIMER_INI, sky2_us2clk(hw, 20));
} }
/* enable status unit */ /* enable status unit */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment