aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e
diff options
context:
space:
mode:
authorEmil Tantilov <emil.s.tantilov@intel.com>2010-03-24 08:55:02 -0400
committerDavid S. Miller <davem@davemloft.net>2010-03-27 00:04:54 -0400
commitf49c57e141c7f53353e4265a31dc2324e6215037 (patch)
treefb8d0310424a9b54aaa190dc8bc4b0387905d2ae /drivers/net/e1000e
parenta08af745e4c711d22aeadc2adade36958fe03ce8 (diff)
e1000e: do not modify tx_queue_len on link speed change
Previously the driver tweaked txqueuelen to avoid false Tx hang reports seen at half duplex. This had the effect of overriding user set values on link change/reset. Testing shows that adjusting only the timeout factor is sufficient to prevent Tx hang reports at half duplex. This patch removes all instances of tx_queue_len in the driver. Originally reported and patched by Franco Fichtner CC: Franco Fichtner <franco@lastsummer.de> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e1000e')
-rw-r--r--drivers/net/e1000e/e1000.h1
-rw-r--r--drivers/net/e1000e/netdev.c11
2 files changed, 1 insertions, 11 deletions
diff --git a/drivers/net/e1000e/e1000.h b/drivers/net/e1000e/e1000.h
index c2ec095d2163..118bdf483593 100644
--- a/drivers/net/e1000e/e1000.h
+++ b/drivers/net/e1000e/e1000.h
@@ -279,7 +279,6 @@ struct e1000_adapter {
279 279
280 struct napi_struct napi; 280 struct napi_struct napi;
281 281
282 unsigned long tx_queue_len;
283 unsigned int restart_queue; 282 unsigned int restart_queue;
284 u32 txd_cmd; 283 u32 txd_cmd;
285 284
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 88d54d3efcef..e1cceb606576 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -2289,8 +2289,6 @@ static void e1000_configure_tx(struct e1000_adapter *adapter)
2289 ew32(TCTL, tctl); 2289 ew32(TCTL, tctl);
2290 2290
2291 e1000e_config_collision_dist(hw); 2291 e1000e_config_collision_dist(hw);
2292
2293 adapter->tx_queue_len = adapter->netdev->tx_queue_len;
2294} 2292}
2295 2293
2296/** 2294/**
@@ -2877,7 +2875,6 @@ void e1000e_down(struct e1000_adapter *adapter)
2877 del_timer_sync(&adapter->watchdog_timer); 2875 del_timer_sync(&adapter->watchdog_timer);
2878 del_timer_sync(&adapter->phy_info_timer); 2876 del_timer_sync(&adapter->phy_info_timer);
2879 2877
2880 netdev->tx_queue_len = adapter->tx_queue_len;
2881 netif_carrier_off(netdev); 2878 netif_carrier_off(netdev);
2882 adapter->link_speed = 0; 2879 adapter->link_speed = 0;
2883 adapter->link_duplex = 0; 2880 adapter->link_duplex = 0;
@@ -3588,21 +3585,15 @@ static void e1000_watchdog_task(struct work_struct *work)
3588 "link gets many collisions.\n"); 3585 "link gets many collisions.\n");
3589 } 3586 }
3590 3587
3591 /* 3588 /* adjust timeout factor according to speed/duplex */
3592 * tweak tx_queue_len according to speed/duplex
3593 * and adjust the timeout factor
3594 */
3595 netdev->tx_queue_len = adapter->tx_queue_len;
3596 adapter->tx_timeout_factor = 1; 3589 adapter->tx_timeout_factor = 1;
3597 switch (adapter->link_speed) { 3590 switch (adapter->link_speed) {
3598 case SPEED_10: 3591 case SPEED_10:
3599 txb2b = 0; 3592 txb2b = 0;
3600 netdev->tx_queue_len = 10;
3601 adapter->tx_timeout_factor = 16; 3593 adapter->tx_timeout_factor = 16;
3602 break; 3594 break;
3603 case SPEED_100: 3595 case SPEED_100:
3604 txb2b = 0; 3596 txb2b = 0;
3605 netdev->tx_queue_len = 100;
3606 adapter->tx_timeout_factor = 10; 3597 adapter->tx_timeout_factor = 10;
3607 break; 3598 break;
3608 } 3599 }