]>
Commit | Line | Data |
---|---|---|
d55578af GKH |
1 | From foo@baz Wed May 16 16:57:32 CEST 2018 |
2 | From: Heiner Kallweit <hkallweit1@gmail.com> | |
3 | Date: Mon, 7 May 2018 21:11:21 +0200 | |
4 | Subject: r8169: fix powering up RTL8168h | |
5 | ||
6 | From: Heiner Kallweit <hkallweit1@gmail.com> | |
7 | ||
8 | [ Upstream commit 3148dedfe79e422f448a10250d3e2cdf8b7ee617 ] | |
9 | ||
10 | Since commit a92a08499b1f "r8169: improve runtime pm in general and | |
11 | suspend unused ports" interfaces w/o link are runtime-suspended after | |
12 | 10s. On systems where drivers take longer to load this can lead to the | |
13 | situation that the interface is runtime-suspended already when it's | |
14 | initially brought up. | |
15 | This shouldn't be a problem because rtl_open() resumes MAC/PHY. | |
16 | However with at least one chip version the interface doesn't properly | |
17 | come up, as reported here: | |
18 | https://bugzilla.kernel.org/show_bug.cgi?id=199549 | |
19 | ||
20 | The vendor driver uses a delay to give certain chip versions some | |
21 | time to resume before starting the PHY configuration. So let's do | |
22 | the same. I don't know which chip versions may be affected, | |
23 | therefore apply this delay always. | |
24 | ||
25 | This patch was reported to fix the issue for RTL8168h. | |
26 | I was able to reproduce the issue on an Asus H310I-Plus which also | |
27 | uses a RTL8168h. Also in my case the patch fixed the issue. | |
28 | ||
29 | Reported-by: Slava Kardakov <ojab@ojab.ru> | |
30 | Tested-by: Slava Kardakov <ojab@ojab.ru> | |
31 | Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> | |
32 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
33 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
34 | --- | |
35 | drivers/net/ethernet/realtek/r8169.c | 3 +++ | |
36 | 1 file changed, 3 insertions(+) | |
37 | ||
38 | --- a/drivers/net/ethernet/realtek/r8169.c | |
39 | +++ b/drivers/net/ethernet/realtek/r8169.c | |
40 | @@ -4832,6 +4832,9 @@ static void rtl_pll_power_down(struct rt | |
41 | static void rtl_pll_power_up(struct rtl8169_private *tp) | |
42 | { | |
43 | rtl_generic_op(tp, tp->pll_power_ops.up); | |
44 | + | |
45 | + /* give MAC/PHY some time to resume */ | |
46 | + msleep(20); | |
47 | } | |
48 | ||
49 | static void rtl_init_pll_power_ops(struct rtl8169_private *tp) |