Patchwork =?ISO-8859-1?Q?[net-next-2.6 PATCH] ?= =?ISO-8859-1?Q?e1000e: do not modify?= =?ISO-8859-1?Q? tx_queue_len on link?= =?ISO-8859-1?Q? speed change?=

login
register
mail settings
Submitter Franco Fichtner
Date March 3, 2010, 2:31 p.m.
Message ID <20100303143137.0BCA01220127@host64.kissl.de>
Download mbox | patch
Permalink /patch/46807/
State Awaiting Upstream
Delegated to: David Miller
Headers show

Comments

Franco Fichtner - March 3, 2010, 2:31 p.m.
e1000e would try to set appropriate values of tx_queue_len for
negotiated
link speeds overwriting the already set configuration of tx_queue_len in
the process. This removes all lines touching tx_queue_len from the
driver.

Signed-off-by: Franco Fichtner <franco@lastsummer.de>
---
 drivers/net/e1000e/netdev.c |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)

 /**
@@ -2877,7 +2875,6 @@ void e1000e_down(struct e1000_adapter *adapter)
 	del_timer_sync(&adapter->watchdog_timer);
 	del_timer_sync(&adapter->phy_info_timer);

-	netdev->tx_queue_len = adapter->tx_queue_len;
 	netif_carrier_off(netdev);
 	adapter->link_speed = 0;
 	adapter->link_duplex = 0;
@@ -3588,21 +3585,15 @@ static void e1000_watchdog_task(struct
work_struct *work)
 					       "link gets many collisions.\n");
 			}

-			/*
-			 * tweak tx_queue_len according to speed/duplex
-			 * and adjust the timeout factor
-			 */
-			netdev->tx_queue_len = adapter->tx_queue_len;
+			/* adjust timeout factor according to speed/duplex */
 			adapter->tx_timeout_factor = 1;
 			switch (adapter->link_speed) {
 			case SPEED_10:
 				txb2b = 0;
-				netdev->tx_queue_len = 10;
 				adapter->tx_timeout_factor = 16;
 				break;
 			case SPEED_100:
 				txb2b = 0;
-				netdev->tx_queue_len = 100;
 				adapter->tx_timeout_factor = 10;
 				break;
 			}
--


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - March 4, 2010, 8:41 a.m.
From: franco@lastsummer.de
Date: Wed,  3 Mar 2010 15:31:37 +0100 (CET)

> e1000e would try to set appropriate values of tx_queue_len for
> negotiated
> link speeds overwriting the already set configuration of tx_queue_len in
> the process. This removes all lines touching tx_queue_len from the
> driver.
> 
> Signed-off-by: Franco Fichtner <franco@lastsummer.de>

Intel folks, you got this?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jeff Kirsher - March 4, 2010, 2:41 p.m.
On Thu, Mar 4, 2010 at 00:41, David Miller <davem@davemloft.net> wrote:
> From: franco@lastsummer.de
> Date: Wed,  3 Mar 2010 15:31:37 +0100 (CET)
>
>> e1000e would try to set appropriate values of tx_queue_len for
>> negotiated
>> link speeds overwriting the already set configuration of tx_queue_len in
>> the process. This removes all lines touching tx_queue_len from the
>> driver.
>>
>> Signed-off-by: Franco Fichtner <franco@lastsummer.de>
>
> Intel folks, you got this?

Yes, I have added it to my queue of patches.  Sorry for the delayed response.

Patch

diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 88d54d3..e1cceb6 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)
 	ew32(TCTL, tctl);

 	e1000e_config_collision_dist(hw);
-
-	adapter->tx_queue_len = adapter->netdev->tx_queue_len;
 }