Commit a08af745 authored by Emil Tantilov's avatar Emil Tantilov Committed by David S. Miller

igbvf: 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>

CC: Franco Fichtner <franco@lastsummer.de>
Signed-off-by: default avatarEmil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6a2bad70
...@@ -198,7 +198,6 @@ struct igbvf_adapter { ...@@ -198,7 +198,6 @@ struct igbvf_adapter {
struct igbvf_ring *tx_ring /* One per active queue */ struct igbvf_ring *tx_ring /* One per active queue */
____cacheline_aligned_in_smp; ____cacheline_aligned_in_smp;
unsigned long tx_queue_len;
unsigned int restart_queue; unsigned int restart_queue;
u32 txd_cmd; u32 txd_cmd;
......
...@@ -1304,8 +1304,6 @@ static void igbvf_configure_tx(struct igbvf_adapter *adapter) ...@@ -1304,8 +1304,6 @@ static void igbvf_configure_tx(struct igbvf_adapter *adapter)
/* enable Report Status bit */ /* enable Report Status bit */
adapter->txd_cmd |= E1000_ADVTXD_DCMD_RS; adapter->txd_cmd |= E1000_ADVTXD_DCMD_RS;
adapter->tx_queue_len = adapter->netdev->tx_queue_len;
} }
/** /**
...@@ -1524,7 +1522,6 @@ void igbvf_down(struct igbvf_adapter *adapter) ...@@ -1524,7 +1522,6 @@ void igbvf_down(struct igbvf_adapter *adapter)
del_timer_sync(&adapter->watchdog_timer); del_timer_sync(&adapter->watchdog_timer);
netdev->tx_queue_len = adapter->tx_queue_len;
netif_carrier_off(netdev); netif_carrier_off(netdev);
/* record the stats before reset*/ /* record the stats before reset*/
...@@ -1857,21 +1854,15 @@ static void igbvf_watchdog_task(struct work_struct *work) ...@@ -1857,21 +1854,15 @@ static void igbvf_watchdog_task(struct work_struct *work)
&adapter->link_duplex); &adapter->link_duplex);
igbvf_print_link_info(adapter); igbvf_print_link_info(adapter);
/* /* adjust timeout factor according to speed/duplex */
* tweak tx_queue_len according to speed/duplex
* and adjust the timeout factor
*/
netdev->tx_queue_len = adapter->tx_queue_len;
adapter->tx_timeout_factor = 1; adapter->tx_timeout_factor = 1;
switch (adapter->link_speed) { switch (adapter->link_speed) {
case SPEED_10: case SPEED_10:
txb2b = 0; txb2b = 0;
netdev->tx_queue_len = 10;
adapter->tx_timeout_factor = 16; adapter->tx_timeout_factor = 16;
break; break;
case SPEED_100: case SPEED_100:
txb2b = 0; txb2b = 0;
netdev->tx_queue_len = 100;
/* maybe add some timeout factor ? */ /* maybe add some timeout factor ? */
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment