aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e
diff options
context:
space:
mode:
authorBruce Allan <bruce.w.allan@intel.com>2009-11-19 07:35:45 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-20 16:53:27 -0500
commit610c992884c80566de31d71ec361a5a7b2a0ed5e (patch)
tree7d8340575b3a7b60930027063a0ec0c48441d267 /drivers/net/e1000e
parent4c86e0b9455c8fa8122fc2d10935e892838c8568 (diff)
e1000e: flow control thresholds not correct when changing mtu
When changing MTU, save it off prior to resetting otherwise the flow control thresholds may be miscalculated. Signed-off-by: Bruce Allan <bruce.w.allan@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/netdev.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 63458270ce1b..fad8f9ea0043 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -4305,8 +4305,10 @@ static int e1000_change_mtu(struct net_device *netdev, int new_mtu)
4305 4305
4306 while (test_and_set_bit(__E1000_RESETTING, &adapter->state)) 4306 while (test_and_set_bit(__E1000_RESETTING, &adapter->state))
4307 msleep(1); 4307 msleep(1);
4308 /* e1000e_down has a dependency on max_frame_size */ 4308 /* e1000e_down -> e1000e_reset dependent on max_frame_size & mtu */
4309 adapter->max_frame_size = max_frame; 4309 adapter->max_frame_size = max_frame;
4310 e_info("changing MTU from %d to %d\n", netdev->mtu, new_mtu);
4311 netdev->mtu = new_mtu;
4310 if (netif_running(netdev)) 4312 if (netif_running(netdev))
4311 e1000e_down(adapter); 4313 e1000e_down(adapter);
4312 4314
@@ -4336,9 +4338,6 @@ static int e1000_change_mtu(struct net_device *netdev, int new_mtu)
4336 adapter->rx_buffer_len = ETH_FRAME_LEN + VLAN_HLEN 4338 adapter->rx_buffer_len = ETH_FRAME_LEN + VLAN_HLEN
4337 + ETH_FCS_LEN; 4339 + ETH_FCS_LEN;
4338 4340
4339 e_info("changing MTU from %d to %d\n", netdev->mtu, new_mtu);
4340 netdev->mtu = new_mtu;
4341
4342 if (netif_running(netdev)) 4341 if (netif_running(netdev))
4343 e1000e_up(adapter); 4342 e1000e_up(adapter);
4344 else 4343 else