e1000e: Fix check_for_link return value with autoneg off
authorBenjamin Poirier <bpoirier@suse.com>
Tue, 20 Feb 2018 06:12:00 +0000 (15:12 +0900)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 31 May 2018 23:30:19 +0000 (00:30 +0100)
commitaa869750c78648d1ccae1a7e23239e64cc0859c9
tree34924b6022a6d8f1607fb07aee4c32a3c1f57d98
parent950c0f06dd3617fd1da39d2fb28dfc5acdc7f2ce
e1000e: Fix check_for_link return value with autoneg off

commit 4e7dc08e57c95673d2edaba8983c3de4dd1f65f5 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: 19110cfbb34d ("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>
[bwh: Backported to 3.2: adjust filename, context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/ethernet/intel/e1000e/ich8lan.c
drivers/net/ethernet/intel/e1000e/lib.c