Commit 77b3d6a2d56be5af87ffae5bb78a39c847d49f99
Committed by
Jeff Garzik
1 parent
e07b1aa8b3
[PATCH] sky2: coalescing parameters
Change default coalescing parameters slightly, and allow wider range of values. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Showing 1 changed file with 6 additions and 13 deletions Side-by-side Diff
drivers/net/sky2.c
... | ... | @@ -2272,7 +2272,8 @@ |
2272 | 2272 | sky2_write8(hw, STAT_FIFO_ISR_WM, 16); |
2273 | 2273 | |
2274 | 2274 | sky2_write32(hw, STAT_TX_TIMER_INI, sky2_us2clk(hw, 1000)); |
2275 | - sky2_write32(hw, STAT_ISR_TIMER_INI, sky2_us2clk(hw, 7)); | |
2275 | + sky2_write32(hw, STAT_ISR_TIMER_INI, sky2_us2clk(hw, 20)); | |
2276 | + sky2_write32(hw, STAT_LEV_TIMER_INI, sky2_us2clk(hw, 100)); | |
2276 | 2277 | |
2277 | 2278 | /* enable status unit */ |
2278 | 2279 | sky2_write32(hw, STAT_CTRL, SC_STAT_OP_ON); |
2279 | 2280 | |
... | ... | @@ -2758,19 +2759,11 @@ |
2758 | 2759 | { |
2759 | 2760 | struct sky2_port *sky2 = netdev_priv(dev); |
2760 | 2761 | struct sky2_hw *hw = sky2->hw; |
2761 | - const u32 tmin = sky2_clk2us(hw, 1); | |
2762 | - const u32 tmax = 5000; | |
2762 | + const u32 tmax = sky2_clk2us(hw, 0x0ffffff); | |
2763 | 2763 | |
2764 | - if (ecmd->tx_coalesce_usecs != 0 && | |
2765 | - (ecmd->tx_coalesce_usecs < tmin || ecmd->tx_coalesce_usecs > tmax)) | |
2766 | - return -EINVAL; | |
2767 | - | |
2768 | - if (ecmd->rx_coalesce_usecs != 0 && | |
2769 | - (ecmd->rx_coalesce_usecs < tmin || ecmd->rx_coalesce_usecs > tmax)) | |
2770 | - return -EINVAL; | |
2771 | - | |
2772 | - if (ecmd->rx_coalesce_usecs_irq != 0 && | |
2773 | - (ecmd->rx_coalesce_usecs_irq < tmin || ecmd->rx_coalesce_usecs_irq > tmax)) | |
2764 | + if (ecmd->tx_coalesce_usecs > tmax || | |
2765 | + ecmd->rx_coalesce_usecs > tmax || | |
2766 | + ecmd->rx_coalesce_usecs_irq > tmax) | |
2774 | 2767 | return -EINVAL; |
2775 | 2768 | |
2776 | 2769 | if (ecmd->tx_max_coalesced_frames >= TX_RING_SIZE-1) |