Bug 201081 - r8169 link negotiation limited to 10Mbit/Half duplex after resume from suspend
Summary: r8169 link negotiation limited to 10Mbit/Half duplex after resume from suspend
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Network (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: drivers_network@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-10 19:29 UTC by Neil MacLeod
Modified: 2018-10-01 08:30 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.19-rc1-4.19-rc4
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
dmesg before suspend (42.56 KB, text/plain)
2018-09-10 19:31 UTC, Neil MacLeod
Details
ethtool eth0 before suspend (1.17 KB, text/plain)
2018-09-10 19:33 UTC, Neil MacLeod
Details
dmesg after resume (45.29 KB, text/plain)
2018-09-10 19:34 UTC, Neil MacLeod
Details
ethtool eth0 after resume (1.00 KB, text/plain)
2018-09-10 19:34 UTC, Neil MacLeod
Details
dmesg 4.19-rc4: power on, suspend/resume, then reset. (46.01 KB, text/plain)
2018-09-17 03:33 UTC, Neil MacLeod
Details

Description Neil MacLeod 2018-09-10 19:29:42 UTC
Since 4.19-rc1 (up to and including 4.19-rc3) there is now a problem with the r8169 network interface when resuming from suspend - the negotiated network speed after resume is only 10Mbit/s half-duplex.

There is no problem with 4.18.y, and when booting into 4.19-rc3 from power-on the full 1000Mbit/s full duplex link is negotiated correctly.

Bisecting the kernel commits between 4.18.6 and 4.19-rc1 identifies the following commit as the bad commit:

"r8169: remove rtl8169_set_speed_xmii"[1]

Before suspend: dmesg[2], ethtool eth0[3] - 1000Mbit/s full duplex
After resume from suspend: dmesg[4], ethtool eth0[5] - 10Mbit/s half duplex

Anyone else seeing this?

Thanks
Neil

1. https://github.com/torvalds/linux/commit/a2965f12fde696d3754347bd48a7149b8de45b21
2. http://ix.io/1mn8 (dmesg before suspend)
3. http://ix.io/1ltR (ethtool before suspend)
4. http://ix.io/1mn9 (dmesg after resume)
5. http://ix.io/1ltO (ethtool after resume)

I will also attach the above logs to this issue.
Comment 1 Neil MacLeod 2018-09-10 19:31:44 UTC
Created attachment 278431 [details]
dmesg before suspend
Comment 2 Neil MacLeod 2018-09-10 19:33:27 UTC
Created attachment 278433 [details]
ethtool eth0 before suspend
Comment 3 Neil MacLeod 2018-09-10 19:34:05 UTC
Created attachment 278435 [details]
dmesg after resume
Comment 4 Neil MacLeod 2018-09-10 19:34:25 UTC
Created attachment 278437 [details]
ethtool eth0 after resume
Comment 5 Neil MacLeod 2018-09-17 00:17:19 UTC
Still an issue with 4.19-rc4.
Comment 6 Neil MacLeod 2018-09-17 03:24:29 UTC
I'm able to reset the interface after resuming from suspend and and the driver will correctly negotiate 1000Mbps/Full duplex:

LibreELEC (community): devel-20180917030540-#0917-g56eae68 (Generic.x86_64)
LibreELEC:~ # uname -a
Linux LibreELEC 4.19.0-rc4 #1 SMP Sun Sep 16 22:35:06 BST 2018 x86_64 GNU/Linux
LibreELEC:~ # ethtool eth0
Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
                                             1000baseT/Half 1000baseT/Full
        Link partner advertised pause frame use: Symmetric Receive-only
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000033 (51)
                               drv probe ifdown ifup
        Link detected: yes

Suspend, then resume...

LibreELEC:~ # ethtool eth0
Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Half
        Link partner advertised pause frame use: No
        Link partner advertised auto-negotiation: No
        Link partner advertised FEC modes: Not reported
        Speed: 10Mb/s
        Duplex: Half
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000033 (51)
                               drv probe ifdown ifup
        Link detected: yes
LibreELEC:~ # ethtool -r eth0
LibreELEC:~ # ethtool eth0
Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
                                             1000baseT/Half 1000baseT/Full
        Link partner advertised pause frame use: Symmetric Receive-only
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000033 (51)
                               drv probe ifdown ifup
        Link detected: yes
LibreELEC:~ # exit
Connection to revo closed.

Testing on Acer Aspire Revo 3700 with LibreELEC.
Comment 7 Neil MacLeod 2018-09-17 03:33:16 UTC
Created attachment 278575 [details]
dmesg 4.19-rc4: power on, suspend/resume, then reset.

dmesg 4.19-rc4:

[   18.197295] power on (1000Mbps/full)
[   64.414282] suspend/resume (10Mbps/half)
[  109.854914] reset (1000Mbps/full)
Comment 8 Heiner Kallweit 2018-09-17 12:24:08 UTC
Strange that the link partner advertised modes are reported with 10/half only, and that the link partner doesn't advertise autoneg after resume.

To get more clarity on who's to blame: Could you please check whether you face the same issue when using a different link partner?
And what's the current link partner type/model?
Comment 9 Heiner Kallweit 2018-09-17 15:32:43 UTC
Also worth a try:
Could you please check with the latest linux-next kernel?
Comment 10 Neil MacLeod 2018-09-17 15:47:24 UTC
I have been testing against a Netgear 10/100/1000 GS608 v3 8-port unmanaged switch.

After your suggestion I connected the Revo 3700 into a Netgear GS105e managed switch using a different CAT5e cable - the result is the same as with the GS608v3, only 10/half advertised after resume.

I also tried connecting the Revo 3700 to a Netgear DGND4000 router but again the same result, only 10/half advertised after resume.

So that's three different switches/routers, with 2 different CAT5e cables, all with the same result - only 10/half advertised after resuming.

This only started happening after a2965f12fde696d3754347bd48a7149b8de45b21. Prior to that all is fine. The Revo 3700 into GS608 can suspend/resume without a problem with 4.18.8, but not 4.19-rc1+.

I'll give linux-next a try.
Comment 11 Neil MacLeod 2018-09-17 17:45:27 UTC
Unfortunately linux-next[1] is no different[2]

When bootig with linux-next:

1) First power on:

[   16.914298] r8169 0000:03:00.0 eth0: Link is Up - 1Gbps/Full - flow control rx/tx

2) After suspend then resume:

[  108.754361] r8169 0000:03:00.0 eth0: Link is Up - 10Mbps/Half - flow control off

So unfortunately it's the same as 4.19-rc1-4.19-rc4.

1. https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f8dcd02792146c5047419ff4c856651acd04f7c6
2. http://ix.io/1mTi (dmesg)
Comment 12 Heiner Kallweit 2018-09-21 07:23:03 UTC
Fixed with 10bc6a6042c9 ("r8169: fix autoneg issue on resume with RTL8168E").
Should soon appear in the stable kernel.
Comment 13 Neil MacLeod 2018-10-01 08:30:40 UTC
Many thanks - confirming this is fixed in 4.19-rc6.

Note You need to log in before you can comment on or make changes to this bug.