Skip to content

Commit 9884746

Browse files
gobenjigregkh
authored andcommitted
e1000e: Fix check_for_link return value with autoneg off
commit 4e7dc08 upstream. When autoneg is off, the .check_for_link callback functions clear the get_link_status flag and systematically return a "pseudo-error". This means that the link is not detected as up until the next execution of the e1000_watchdog_task() 2 seconds later. Fixes: 19110cf ("e1000e: Separate signaling for link check/link up") Signed-off-by: Benjamin Poirier <bpoirier@suse.com> Acked-by: Sasha Neftin <sasha.neftin@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Cc: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent da2b4ae commit 9884746

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/net/ethernet/intel/e1000e/ich8lan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1598,7 +1598,7 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
15981598
* we have already determined whether we have link or not.
15991599
*/
16001600
if (!mac->autoneg)
1601-
return -E1000_ERR_CONFIG;
1601+
return 1;
16021602

16031603
/* Auto-Neg is enabled. Auto Speed Detection takes care
16041604
* of MAC speed/duplex configuration. So we only need to

drivers/net/ethernet/intel/e1000e/mac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ s32 e1000e_check_for_copper_link(struct e1000_hw *hw)
443443
* we have already determined whether we have link or not.
444444
*/
445445
if (!mac->autoneg)
446-
return -E1000_ERR_CONFIG;
446+
return 1;
447447

448448
/* Auto-Neg is enabled. Auto Speed Detection takes care
449449
* of MAC speed/duplex configuration. So we only need to

0 commit comments

Comments
 (0)