I have a Microchip sama5d36 board that has a gigabit ethernet (KSZ9031RNX) and 10/100 ethernet (DP83848J). When I use kernel 4.20 the gigabit ethernet wont connect until I unplug and replug the ethernet cable. This issue only shows up with certain router connections and only shows up on the gigabit port. The problem goes away if I switch back to kernel 4.18. The dts files are identical and I don't see any changes in the config settings that seem significant.

Here is my dts setting:

        macb0: ethernet@f0028000 {
            phy-mode = "rgmii";
            #address-cells = <1>;
            #size-cells = <0>;
            status = "okay";

            ethernet-phy@7 {
                reg = <0x7>;

I am using systemd-networkd and this is my setting in /etc/systemd/network:



After restart:

2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 00:1c:1e:08:a0:e1 brd ff:ff:ff:ff:ff:ff

After unplug and replug:

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:1c:1e:08:a0:e1 brd ff:ff:ff:ff:ff:ff
    inet brd scope global dynamic eth0
       valid_lft 85532sec preferred_lft 85532sec
    inet6 fe80::21c:1eff:fe08:a0e1/64 scope link 
       valid_lft forever preferred_lft forever

Any insight on where I might look to identify the issue?


Seems to be a bug. Try to upgrade to a newer kernel.

See https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.13
and https://www.spinics.net/lists/netdev/msg543703.html

commit cbae90516d2a5fd3c71d55a28bacc5f67625564d
Author: Heiner Kallweit
Date: Thu Jan 10 20:22:26 2019 +0100

net: phy: micrel: set soft_reset callback to genphy_soft_reset for KSZ9031

[ Upstream commit 1d16073a326891c2a964e4cb95bc18fbcafb5f74 ]

So far genphy_soft_reset was used automatically if the PHY driver didn't implement the soft_reset callback. This changed with the mentioned commit and broke KSZ9031. To fix this configure the KSZ9031 PHY driver to use genphy_soft_reset.

Fixes: 6e2d85ec0559 ("net: phy: Stop with excessive soft reset")
Reported-by: Tony Lindgren
Signed-off-by: Heiner Kallweit
Tested-by: Tony Lindgren
Tested-by: Sekhar Nori
Reviewed-by: Florian Fainelli
Signed-off-by: David S. Miller
Signed-off-by: Sasha Levin

  • Thanks for the information, that is very helpful. I had tried 4.20.14 so might have to wait for the next revision... – cajjed Mar 9 at 0:19
  • seems there's a patch in 4.20.15 with an explanation and adding a new fix: net: phy: Micrel KSZ8061: link failure after cable connect – A.B Mar 11 at 7:12
  • So I tried 4.20.15 and the issue still exists, same thing for 4.20.12. I will have to try some other iterations... – cajjed Mar 12 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.