diff options
author | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2006-01-12 16:50:53 -0800 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-17 07:44:50 -0500 |
commit | 66a2b0a30fcc37876d3639ea375a9d24649b53bf (patch) | |
tree | dab5bdcbf8d2db73cc22b1030bb679ad81eeffb9 /drivers/net/e1000/e1000_main.c | |
parent | f11b7f8535fab0f9196a7387e93dca5deaa5fff2 (diff) | |
download | lwn-66a2b0a30fcc37876d3639ea375a9d24649b53bf.tar.gz lwn-66a2b0a30fcc37876d3639ea375a9d24649b53bf.zip |
[PATCH] e1000: Fix TX queue length based on link speed
10/100 speeds seem to have some problems reporting false tx timeouts especially at half duplex. Fixed by using a timeout factor to attempt to mitigate the false timeouts.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/e1000/e1000_main.c')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index cefc7cc092a7..cf4fc5117032 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -2319,6 +2319,21 @@ e1000_watchdog_task(struct e1000_adapter *adapter) adapter->link_duplex == FULL_DUPLEX ? "Full Duplex" : "Half Duplex"); + /* tweak tx_queue_len according to speed/duplex */ + netdev->tx_queue_len = adapter->tx_queue_len; + adapter->tx_timeout_factor = 1; + if (adapter->link_duplex == HALF_DUPLEX) { + switch (adapter->link_speed) { + case SPEED_10: + netdev->tx_queue_len = 10; + adapter->tx_timeout_factor = 8; + break; + case SPEED_100: + netdev->tx_queue_len = 100; + break; + } + } + netif_carrier_on(netdev); netif_wake_queue(netdev); mod_timer(&adapter->phy_info_timer, jiffies + 2 * HZ); |