aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e/lib.c
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2007-10-05 18:22:02 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:55:25 -0400
commit309af40b5f4c2065c9a5f74a360ad3d3b0c9c9cd (patch)
tree9e11fd2654cc49431097d5a66209b338fc26bf70 /drivers/net/e1000e/lib.c
parent4e6c709c5ab886be0ddbc96c4f96534e55920e68 (diff)
e1000e: restore flow control settings properly
After a cable unplug the forced flow control settings were lost accidentally and the flow control settings fell back to the default EEPROM determined values. This breaks for people who want to run without fc enabled - after a cable reset the driver would refuse to run with fc disabled. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/e1000e/lib.c')
-rw-r--r--drivers/net/e1000e/lib.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/e1000e/lib.c b/drivers/net/e1000e/lib.c
index 3bbfe605e111..0bdeca30c75f 100644
--- a/drivers/net/e1000e/lib.c
+++ b/drivers/net/e1000e/lib.c
@@ -639,9 +639,15 @@ s32 e1000e_setup_link(struct e1000_hw *hw)
639 if (e1000_check_reset_block(hw)) 639 if (e1000_check_reset_block(hw))
640 return 0; 640 return 0;
641 641
642 ret_val = e1000_set_default_fc_generic(hw); 642 /*
643 if (ret_val) 643 * If flow control is set to default, set flow control based on
644 return ret_val; 644 * the EEPROM flow control settings.
645 */
646 if (mac->fc == e1000_fc_default) {
647 ret_val = e1000_set_default_fc_generic(hw);
648 if (ret_val)
649 return ret_val;
650 }
645 651
646 /* We want to save off the original Flow Control configuration just 652 /* We want to save off the original Flow Control configuration just
647 * in case we get disconnected and then reconnected into a different 653 * in case we get disconnected and then reconnected into a different