aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2005-12-09 14:35:06 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-12-12 15:27:21 -0500
commit69634ee7366d05b26b2650584bed180edf923125 (patch)
treef446c787632620f28f2b89984271788e37a2d9d2 /drivers/net/sky2.c
parent3e4b32e11674a40cf50e48a79764f12988641e20 (diff)
[PATCH] sky2: interrupt coalescing tuning
Adjust interrupt deferral values for better performance and avoid starvation issues under stress. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index af9739c1ef5f..0b82dbba16cf 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -2115,9 +2115,8 @@ static int sky2_reset(struct sky2_hw *hw)
2115 2115
2116 sky2_write8(hw, B0_Y2LED, LED_STAT_ON); 2116 sky2_write8(hw, B0_Y2LED, LED_STAT_ON);
2117 2117
2118 /* Turn on descriptor polling (every 75us) */ 2118 /* Turn off descriptor polling */
2119 sky2_write32(hw, B28_DPT_INI, sky2_us2clk(hw, 75)); 2119 sky2_write32(hw, B28_DPT_CTRL, DPT_STOP);
2120 sky2_write8(hw, B28_DPT_CTRL, DPT_START);
2121 2120
2122 /* Turn off receive timestamp */ 2121 /* Turn off receive timestamp */
2123 sky2_write8(hw, GMAC_TI_ST_CTRL, GMT_ST_STOP); 2122 sky2_write8(hw, GMAC_TI_ST_CTRL, GMT_ST_STOP);
@@ -2162,8 +2161,6 @@ static int sky2_reset(struct sky2_hw *hw)
2162 /* Set the list last index */ 2161 /* Set the list last index */
2163 sky2_write16(hw, STAT_LAST_IDX, STATUS_RING_SIZE - 1); 2162 sky2_write16(hw, STAT_LAST_IDX, STATUS_RING_SIZE - 1);
2164 2163
2165 sky2_write32(hw, STAT_TX_TIMER_INI, sky2_us2clk(hw, 1000));
2166
2167 /* These status setup values are copied from SysKonnect's driver */ 2164 /* These status setup values are copied from SysKonnect's driver */
2168 if (is_ec_a1(hw)) { 2165 if (is_ec_a1(hw)) {
2169 /* WA for dev. #4.3 */ 2166 /* WA for dev. #4.3 */
@@ -2174,21 +2171,20 @@ static int sky2_reset(struct sky2_hw *hw)
2174 2171
2175 /* set Status-FIFO ISR watermark */ 2172 /* set Status-FIFO ISR watermark */
2176 sky2_write8(hw, STAT_FIFO_ISR_WM, 0x07); /* WA for dev. #4.18 */ 2173 sky2_write8(hw, STAT_FIFO_ISR_WM, 0x07); /* WA for dev. #4.18 */
2177 2174 sky2_write32(hw, STAT_TX_TIMER_INI, sky2_us2clk(hw, 10000));
2178 } else { 2175 } else {
2179 sky2_write16(hw, STAT_TX_IDX_TH, 0x000a); 2176 sky2_write16(hw, STAT_TX_IDX_TH, 10);
2180 2177 sky2_write8(hw, STAT_FIFO_WM, 16);
2181 /* set Status-FIFO watermark */
2182 sky2_write8(hw, STAT_FIFO_WM, 0x10);
2183 2178
2184 /* set Status-FIFO ISR watermark */ 2179 /* set Status-FIFO ISR watermark */
2185 if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev == 0) 2180 if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev == 0)
2186 sky2_write8(hw, STAT_FIFO_ISR_WM, 0x10); 2181 sky2_write8(hw, STAT_FIFO_ISR_WM, 4);
2187 2182 else
2188 else /* WA dev 4.109 */ 2183 sky2_write8(hw, STAT_FIFO_ISR_WM, 16);
2189 sky2_write8(hw, STAT_FIFO_ISR_WM, 0x04);
2190 2184
2191 sky2_write32(hw, STAT_ISR_TIMER_INI, 0x0190); 2185 sky2_write32(hw, STAT_TX_TIMER_INI, sky2_us2clk(hw, 1000));
2186 sky2_write32(hw, STAT_LEV_TIMER_INI, sky2_us2clk(hw, 100));
2187 sky2_write32(hw, STAT_ISR_TIMER_INI, sky2_us2clk(hw, 20));
2192 } 2188 }
2193 2189
2194 /* enable status unit */ 2190 /* enable status unit */