BACKPORT: r8169: fix auto speed down issue
authorhayeswang <hayeswang@realtek.com>
Sun, 31 Mar 2013 17:02:04 +0000 (17:02 +0000)
committerChromeBot <chrome-bot@google.com>
Thu, 18 Apr 2013 18:09:07 +0000 (11:09 -0700)
commit0456f1e300e2f692bdeda735f2dae674131e8264
tree92042e06b486587ce463a3302958585555fde34f
parent4e2dee3564457f18d36974ee336f2e47faae7f4e
BACKPORT: r8169: fix auto speed down issue

It would cause no link after suspending or shutdowning when the
nic changes the speed to 10M and connects to a link partner which
forces the speed to 100M.

Check the link partner ability to determine which speed to set.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit e2409d83434d77874b461b78af6a19cd6e6a1280)

BUG=chrome-os-partner:18211.
TEST=manual. Test ethernet plug/unplug, verify link status detection.

Change-Id: I3166710a102ab9c2aef6590717d500c02fca3cac
Reviewed-on: https://gerrit.chromium.org/gerrit/48361
Tested-by: Bowgo Tsai <bowgotsai@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
Commit-Queue: Bowgo Tsai <bowgotsai@chromium.org>
drivers/net/ethernet/realtek/r8169.c