Gigabit Ethernet wont connect with linux 4.20

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

cajjed
Posts: 37
Joined: Thu Aug 25, 2016 3:12 am

Gigabit Ethernet wont connect with linux 4.20

Fri Mar 08, 2019 12:34 am

I have a custom 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:

Code: Select all

			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:

Code: Select all

[Match]
Name=eth0

[Network]
DHCP=yes

After restart:

Code: Select all

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:

Code: Select all

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 192.168.2.6/24 brd 192.168.2.255 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?
blue_z
Location: USA
Posts: 1921
Joined: Thu Apr 19, 2007 10:15 pm

Re: Gigabit Ethernet wont connect with linux 4.20

Fri Mar 08, 2019 11:43 pm

cajjed wrote: When I use kernel 4.20 the gigabit ethernet wont connect until I unplug and replug the ethernet cable.
...
The problem goes away if I switch back to kernel 4.18.
Presumably these are mainline kernel versions?
Have you read this topic, which cites similar mainline kernel versions but nearly the exact opposite symptom?

cajjed wrote: The dts files are identical ...
What does that mean?
Are you using the same .dts and .dtsi files for both kernel versions?
Have you compared the .dts and .dtsi files for Atmel EK boards in both kernel versions, and noticed any differences?

FYI Device Tree files (especially Atmel's) can be kernel version specific.
IOW they may not be portable to other kernel versions.

cajjed wrote: Any insight on where I might look to identify the issue?
What does kernel version 4.19 do?
Can you try to bisect the issue down to a kernel version and then a patch?

Regards
pbugalski
Posts: 11
Joined: Thu Nov 29, 2018 4:28 pm

Re: Gigabit Ethernet wont connect with linux 4.20

Tue Mar 12, 2019 7:15 pm

I think both problems are related with the same issue. Version 4.19 made something wrong to at91 ethernet support.
I have described ifdown/ifup sequence, because it was simplest to reproduce. But generally network on sama5d2 with new kernels is not very stable and sometimes kernel panic occurs. Another problem I observed only with musl library and initramfs - if device is started without ethernet cable connected, there is interesting message like "unexpected IRQ 100" after plugging cable.
I was also comparing network stability on Beaglebone and 4.19 kernel works perfectly there.
nferre
Site Admin
Posts: 203
Joined: Wed Feb 14, 2007 11:17 am

Re: Gigabit Ethernet wont connect with linux 4.20

Wed Mar 13, 2019 3:41 pm

I've been reported an regression with the phy on recent kernels: didn't had the chance to track this down yet.
If it's confirmed, it's not related to the SoC itself... but still an issue I admit.
pbugalski
Posts: 11
Joined: Thu Nov 29, 2018 4:28 pm

Re: Gigabit Ethernet wont connect with linux 4.20

Wed Mar 13, 2019 4:51 pm

I don't think it's phy regression, it looks to me more like there were some issue in at91 driver already, but was hidden before change in 4.19.
Commit which makes sama5d2 ethernet not working looks good and as I wrote before it works on other devices without any problem:
https://git.kernel.org/pub/scm/linux/ke ... 8cfd9d6c77
cajjed
Posts: 37
Joined: Thu Aug 25, 2016 3:12 am

Re: Gigabit Ethernet wont connect with linux 4.20

Fri Mar 15, 2019 1:16 am

I did play with the kernel some but I didn't know exactly where to look since you don't get any error or warning in my case. I am happy to continue to experiment if you can point me in the right direction.
abelloni
Posts: 16
Joined: Sat May 03, 2014 7:34 pm

Re: Gigabit Ethernet wont connect with linux 4.20

Tue Apr 16, 2019 1:58 pm

This is the patch you need to apply to solve that particular issue:

https://lore.kernel.org/lkml/2019041610 ... otlin.com/

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 2 guests