]> git.baikalelectronics.ru Git - kernel.git/commit
r8169: fix powering up RTL8168h
authorHeiner Kallweit <hkallweit1@gmail.com>
Mon, 7 May 2018 19:11:21 +0000 (21:11 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 May 2018 02:54:18 +0000 (22:54 -0400)
commit9fc5e3a149ad0c0f866defc3e5afa195c2850712
treea9ea85799a93ce7d0f3df623359f4f0dbef47739
parent54c00d8c181dcb028d726ce2487580fc3694246c
r8169: fix powering up RTL8168h

Since commit 1fecf9684b5b "r8169: improve runtime pm in general and
suspend unused ports" interfaces w/o link are runtime-suspended after
10s. On systems where drivers take longer to load this can lead to the
situation that the interface is runtime-suspended already when it's
initially brought up.
This shouldn't be a problem because rtl_open() resumes MAC/PHY.
However with at least one chip version the interface doesn't properly
come up, as reported here:
https://bugzilla.kernel.org/show_bug.cgi?id=199549

The vendor driver uses a delay to give certain chip versions some
time to resume before starting the PHY configuration. So let's do
the same. I don't know which chip versions may be affected,
therefore apply this delay always.

This patch was reported to fix the issue for RTL8168h.
I was able to reproduce the issue on an Asus H310I-Plus which also
uses a RTL8168h. Also in my case the patch fixed the issue.

Reported-by: Slava Kardakov <ojab@ojab.ru>
Tested-by: Slava Kardakov <ojab@ojab.ru>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169.c