aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000_main.c
diff options
context:
space:
mode:
authorEmil Tantilov <emil.s.tantilov@intel.com>2010-03-26 07:25:58 -0400
committerDavid S. Miller <davem@davemloft.net>2010-03-27 11:33:22 -0400
commit39ca5f033bb2ea18877632809185268eebbb37a9 (patch)
tree2cde0a3364df707c4738437743c91ce02e2d0742 /drivers/net/e1000/e1000_main.c
parent7438189baa0a2fe30084bdc97e3d540ebc5444f3 (diff)
e1000: 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. Based on e1000e patch by Franco Fichtner <franco@lastsummer.de> CC: Franco Fichtner <franco@lastsummer.de> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Acked-by: Jesse Brandeburg <jesse.brandeburg@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/e1000/e1000_main.c')
-rw-r--r--drivers/net/e1000/e1000_main.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 8be6faee43e6..b15ece26ed84 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -383,8 +383,6 @@ static void e1000_configure(struct e1000_adapter *adapter)
383 adapter->alloc_rx_buf(adapter, ring, 383 adapter->alloc_rx_buf(adapter, ring,
384 E1000_DESC_UNUSED(ring)); 384 E1000_DESC_UNUSED(ring));
385 } 385 }
386
387 adapter->tx_queue_len = netdev->tx_queue_len;
388} 386}
389 387
390int e1000_up(struct e1000_adapter *adapter) 388int e1000_up(struct e1000_adapter *adapter)
@@ -503,7 +501,6 @@ void e1000_down(struct e1000_adapter *adapter)
503 del_timer_sync(&adapter->watchdog_timer); 501 del_timer_sync(&adapter->watchdog_timer);
504 del_timer_sync(&adapter->phy_info_timer); 502 del_timer_sync(&adapter->phy_info_timer);
505 503
506 netdev->tx_queue_len = adapter->tx_queue_len;
507 adapter->link_speed = 0; 504 adapter->link_speed = 0;
508 adapter->link_duplex = 0; 505 adapter->link_duplex = 0;
509 netif_carrier_off(netdev); 506 netif_carrier_off(netdev);
@@ -2316,19 +2313,15 @@ static void e1000_watchdog(unsigned long data)
2316 E1000_CTRL_RFCE) ? "RX" : ((ctrl & 2313 E1000_CTRL_RFCE) ? "RX" : ((ctrl &
2317 E1000_CTRL_TFCE) ? "TX" : "None" ))); 2314 E1000_CTRL_TFCE) ? "TX" : "None" )));
2318 2315
2319 /* tweak tx_queue_len according to speed/duplex 2316 /* adjust timeout factor according to speed/duplex */
2320 * and adjust the timeout factor */
2321 netdev->tx_queue_len = adapter->tx_queue_len;
2322 adapter->tx_timeout_factor = 1; 2317 adapter->tx_timeout_factor = 1;
2323 switch (adapter->link_speed) { 2318 switch (adapter->link_speed) {
2324 case SPEED_10: 2319 case SPEED_10:
2325 txb2b = false; 2320 txb2b = false;
2326 netdev->tx_queue_len = 10;
2327 adapter->tx_timeout_factor = 16; 2321 adapter->tx_timeout_factor = 16;
2328 break; 2322 break;
2329 case SPEED_100: 2323 case SPEED_100:
2330 txb2b = false; 2324 txb2b = false;
2331 netdev->tx_queue_len = 100;
2332 /* maybe add some timeout factor ? */ 2325 /* maybe add some timeout factor ? */
2333 break; 2326 break;
2334 } 2327 }