aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorEmil Tantilov <emil.s.tantilov@intel.com>2010-03-23 14:34:57 -0400
committerDavid S. Miller <davem@davemloft.net>2010-03-24 02:19:57 -0400
commitd07f3e375f608e52a1f8958fbde105bb27b7629a (patch)
tree6a67c30c9bac2f614c14bc213e0379134827163a /drivers/net
parentfa3d9a6d55014b5bce5575aeab1cf711cff748ab (diff)
igb: 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. Based on e1000e patch by 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')
-rw-r--r--drivers/net/igb/igb.h1
-rw-r--r--drivers/net/igb/igb_main.c10
2 files changed, 1 insertions, 10 deletions
diff --git a/drivers/net/igb/igb.h b/drivers/net/igb/igb.h
index a1775705b24c..3b772b822a5d 100644
--- a/drivers/net/igb/igb.h
+++ b/drivers/net/igb/igb.h
@@ -267,7 +267,6 @@ struct igb_adapter {
267 267
268 /* TX */ 268 /* TX */
269 struct igb_ring *tx_ring[16]; 269 struct igb_ring *tx_ring[16];
270 unsigned long tx_queue_len;
271 u32 tx_timeout_count; 270 u32 tx_timeout_count;
272 271
273 /* RX */ 272 /* RX */
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 70dc03bb9cb2..e72760c2448b 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -1105,9 +1105,6 @@ static void igb_configure(struct igb_adapter *adapter)
1105 struct igb_ring *ring = adapter->rx_ring[i]; 1105 struct igb_ring *ring = adapter->rx_ring[i];
1106 igb_alloc_rx_buffers_adv(ring, igb_desc_unused(ring)); 1106 igb_alloc_rx_buffers_adv(ring, igb_desc_unused(ring));
1107 } 1107 }
1108
1109
1110 adapter->tx_queue_len = netdev->tx_queue_len;
1111} 1108}
1112 1109
1113/** 1110/**
@@ -1213,7 +1210,6 @@ void igb_down(struct igb_adapter *adapter)
1213 del_timer_sync(&adapter->watchdog_timer); 1210 del_timer_sync(&adapter->watchdog_timer);
1214 del_timer_sync(&adapter->phy_info_timer); 1211 del_timer_sync(&adapter->phy_info_timer);
1215 1212
1216 netdev->tx_queue_len = adapter->tx_queue_len;
1217 netif_carrier_off(netdev); 1213 netif_carrier_off(netdev);
1218 1214
1219 /* record the stats before reset*/ 1215 /* record the stats before reset*/
@@ -3106,17 +3102,13 @@ static void igb_watchdog_task(struct work_struct *work)
3106 ((ctrl & E1000_CTRL_RFCE) ? "RX" : 3102 ((ctrl & E1000_CTRL_RFCE) ? "RX" :
3107 ((ctrl & E1000_CTRL_TFCE) ? "TX" : "None"))); 3103 ((ctrl & E1000_CTRL_TFCE) ? "TX" : "None")));
3108 3104
3109 /* tweak tx_queue_len according to speed/duplex and 3105 /* adjust timeout factor according to speed/duplex */
3110 * adjust the timeout factor */
3111 netdev->tx_queue_len = adapter->tx_queue_len;
3112 adapter->tx_timeout_factor = 1; 3106 adapter->tx_timeout_factor = 1;
3113 switch (adapter->link_speed) { 3107 switch (adapter->link_speed) {
3114 case SPEED_10: 3108 case SPEED_10:
3115 netdev->tx_queue_len = 10;
3116 adapter->tx_timeout_factor = 14; 3109 adapter->tx_timeout_factor = 14;
3117 break; 3110 break;
3118 case SPEED_100: 3111 case SPEED_100:
3119 netdev->tx_queue_len = 100;
3120 /* maybe add some timeout factor ? */ 3112 /* maybe add some timeout factor ? */
3121 break; 3113 break;
3122 } 3114 }