New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
N2 mainline ethernet failure, with upstream patch #2106
Comments
hi @n2qcn thanks for reporting and providing patch. Test kernel here https://armbian.lane-fu.com/debs-beta/ search for AR-376 |
Thanks for the build! the error has changed to: with the last two repeatable with an % ifconfig -a [ note for self: armbian-config is gone but nmtui is listed here to save future google time ] In my google of this issue I recall a chip reset issue on some boards, I'll try to post that hardware design issue as it might be a contributing factor, even if eth0 works in production builds. |
oops sorry minimal image doesnt have armbian config, ill build regular next time.... |
https://community.st.com/s/question/0D50X0000B8iBSB/stm32mp157-ethernet-problem bingo, lets try: https://patchwork.kernel.org/cover/10997069/ |
when i downloaded the patch series it gave me the same patch as the first one.... |
oh.. original patch failed to apply :P |
So Ive got some good news and bad news... I booted my N2 off that same image, and dmesg has been silent.. even when running iperf3
|
well this is embarrassing, Swapped the network switch got link and IP, switched back the original GS108Tv3 switch and got link and IP. sigh, all I needed was a switch power cycle. |
@n2qcn glad you got it working.... problems like these can always be crazy. I still appreciate the thoroughness of your research. Please don't hesitate to report any other issues that come up. |
The patch was indeed applied to the AR-376 kernel posted above as this file is present: Pls merge this patch $CURRENT |
interesting |
Hmm so at least most of the serious fails.. maybe you can help me figure out what specific patch to keep?
|
I think these 2 files...does that line up? I'll have to look more later
|
I've gone through two network switches and two N2s to make sure I don't have a hardware issue and feel confident the nightly builds on an N2 is a software issue. The great thing is we have a working build you posted above, so I agree we need to isolate what's the different between above and nightly. meson-gxbb-odroidc2.dts must be my first guess, but based on your patch output we shouldn't rule out other changes to the kernel from nightly. |
@n2qcn made new build -- wanna try debs-beta and image on https://armbian.lane-fu.com |
Both https://armbian.lane-fu.com/Armbian_20.08.0-trunk_Odroidn2_focal_current_5.7.10.img and https://armbian.lane-fu.com/Armbian_20.08.0-trunk-AR-376b_Odroidn2_focal_current_5.7.10.img get link and IP on first boot. We almost need an image that fails as the armbian-config process from release to nightly might be interjecting the failure. It sure loads alot of Debian/Ubuntu packages. |
release to nights has to change a lot of things anyway it's safe to say that our next -current kernel when we release 20.08 will work. still confused as to why you don't get link on other nightlies right now |
we agree the next built will work. Pls close this case if we don't want to worry about what is believed to be a release to nightly process issue. |
closing |
apt update ; apt full-upgrade yields the failure at the top of this issue in https://armbian.lane-fu.com/Armbian_20.08.0-trunk_Odroidn2_focal_current_5.7.10.img which installs: Unpacking python-apt-common (2.0.0ubuntu0.20.04.1) over (2.0.0) ... while Armbian_20.08.0-trunk-AR-376b_Odroidn2_focal_current_5.7.10.img only installs Unpacking python-apt-common (2.0.0ubuntu0.20.04.1) over (2.0.0) ... and works after reboot. |
unclosing |
okay.... last test... https://armbian.lane-fu.com cheeseburger-41 images/debs |
not sure what the test is here, but like the first Armbian_20.08.0-trunk_Odroidn2_focal_current_5.7.10.img and Armbian_20.08.0-trunk-AR-376b_Odroidn2_focal_current_5.7.10.img , the new Armbian_20.08.0-trunk-cheeseburger41_Odroidn2_focal_current_5.7.10.img all get link and IP. cheeseburger41 and AR-376b full-upgrade Unpacking python-apt-common (2.0.0ubuntu0.20.04.1) over (2.0.0) ... and get link and IP after reboot. But I did see Armbian_20.08.0-trunk_Odroidn2_focal_current_5.7.10.img was updated (NULL tag and binary file differed) that I wasn't directed to test does a full-upgrade of: Reading package lists... and yields the same error at top of post with no ethernet link and no IP. Perhaps what ever is in http://beta.armbian.com is not trunk and still contains whatever unidentified issues that causes the loss of ethernet link and once merged with your trunk all will be good in the world? |
for http://armbian.lane-fu.com/Armbian_20.08.0-trunk_Odroidn2_focal_current_5.7.10.img who's ethernet gets link and IP the apt upgrade package that causes the ethernet to fail is: update it with what's in your current build and we have world peace. This results in a broken ethernet: root@odroidn2:/home/rob# uname -a root@odroidn2:/home/rob# apt upgrade |
This patch does about the same as the top patch, but is isolated to meson-gxm-khadas-vim2.dts note: ifconfig eth0 down ; ifconfig up yields the same error at the top of the issue with the cheeseburger41 and other images and is likely a better unit test for this issue than a reboot. |
so that cheeseburger-41 image and debs contained no additional patches.. just all the stuff slated for next release.... |
ifconfig eth0 down ; ifconfig eth0 up on released 5.6.18 yields the same error at the top of this issue. It would be interesting to see if an N2 overlay without reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>; |
The N2+ with cheeseburger yields the errors at the top of this issue on bootup. Here is the fix: dtc -I dtb -O dts /boot/dtb/amlogic/meson-g12b-odroid-n2.dtb | grep -v 'reset-gpios = <0x21 0x0f 0x07>;' > /tmp/t This works with an N2 and N2+ in 5.6.18 and 5.7.10 with the acid test of I tried to write this as an overlay but failed. With alittle guidance (pointers to the git repo with the source of /boot/dtb/amlogic/meson-g12b-odroid-n2.dtb) I will research the proper way to make an overlay or a an armbiad build patch. |
This seems to work: #2166 Tested 3x - upgrading to latest build, works ok. |
The patch from #2166 breaks the network for me on N2+.
Removing the patch (putting Using kernel 5.9.8 with patches and config as of a085397 P.S. the issue was happening for me when using P.P.S. if other users of N2/N2+ have the same issue, please comment. |
With the No interface at startup or The only way I found in my case to end up with something stable, was removing the
When the system starts with a device-tree without the My ugly fix just adds and I consider all this as temporary fix. There definitely is a real issue somewhere, whether it is a hardware one on some revision of the Odroid N2, or a software one in the driver code. I don't have neither the time nor the expertise at the moment to truly take some time to address this, so it will have to do for now as I'm only using this board for personal use. Maybe some kernel developer could take a serious look at this. This fix has been stable on my N2 for the last few months with 5.6, 5.7 and 5.8 kernels. |
FYI, as I run into this thread when googling: We run into the same issue in Home Assistant OS, see home-assistant/operating-system#1038. The problem is the PHY requires at least 50ms after asserting reset before talking to it. Sent the patch also upstream: https://lkml.org/lkml/2020/11/30/1443 |
Going to re-open issue |
trying to figure out if this. is a situation where a patch that fixes 1 device breaks another. |
@Tonymac32 FYI re-opening and will explore this patch |
I've been using armbian's dtb for my N2 and N2+ with positive results. As a control I tested current 5.9.6 Focal and dist-upgrade to 5.9.10 on a N2+ and both found an IP and survived ifconfig down ; up The image above does not boot for me using U-Boot 2015.01 (Nov 30 2020 - 20:44:39) with: |
blerg thanks for testing... we've got some unrelated woes with Amlogic right now... |
GG. Hi, tested your patch on a 5.8 Debian Kernel, it seems to be working fine ! Waiting eagerly for your patch to be mainlined. Thanks for the hard work. PS: I used 80000 for the |
Bug not present anymore. |
https://forum.armbian.com/topic/14675-breaking-n2-eth0-in-nightly-and-mainline-patch/
eth0 establishes link on the N2 with released 5.6.18-meson64 (root@builder) but after switching to nightly 5.7.9-meson64 (root@stable) fails to get ethernet link and errors with
[ 76.174115] meson8b-dwmac ff3f0000.ethernet eth0: PHY [0.0:00] driver [RTL8211F Gigabit Ethernet] (irq=25)
[ 76.278174] meson8b-dwmac ff3f0000.ethernet: Failed to reset the dma
[ 76.278892] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed
[ 76.287895] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_open: Hw setup failed
I've tracked this to a needed delay in the overlay, a patch is available here:
https://forum.khadas.com/t/vim2-ethernet-problem-with-mainline-kernel/5817/7
https://patchwork.kernel.org/patch/10997079/
Thanks for an outstanding build!
The text was updated successfully, but these errors were encountered: