Skip to content
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

v0.7.0 Ethernet NETDEV Watchdog #4

Open
vjgriswold opened this issue Sep 30, 2016 · 5 comments
Open

v0.7.0 Ethernet NETDEV Watchdog #4

vjgriswold opened this issue Sep 30, 2016 · 5 comments

Comments

@vjgriswold
Copy link

Upon attempting to enable eth0 for Nerves network connectivity, my system rapidly experiences an Ethernet Transmit Netdev Watchdog timeout (log attached). The issue appears to be related to the MediaTek's built-in switch not recognizing LinkUp / LinkDown events.

This issue also exists in v0.6.2 of the LinkIt binaries.

My system is a LinkIt Smart 7688 Duo R3 on a standard seeed Breakout Board. A log of the early boot is also attached.

Is this expected behavior? If not, how can I proceed to either resolve or help diagnose the problem? I have already attempted to build Nerves from source, and the results are the same as with the official binaries.

mtk_soc_eth-Watchdog.txt

nerves_v070_boot.txt

@fhunleth
Copy link
Collaborator

fhunleth commented Oct 2, 2016

Sorry for the delayed response.

I didn't see this when I used wired Ethernet with the Linux 3.x kernel. After I upgraded the kernel, I never tried wired Ethernet again. WiFi doesn't work for some reason with the older kernel and it's not easily debuggable due to it using a binary blog, so I really don't want to go back.

I'm actually out of town, so I can't look into this now, but my route to debug it would be to see if it happens with OpenWRT. It could also be that they fixed it in the past 2 months since I last pulled in their patches.

@vjgriswold
Copy link
Author

Thank you for the potential leads. Yes, both the "MediaTek standard" kernel-3.18 OpenWRT build and U-Boot have good Ethernet connectivity, but not the standard Nerves nor our own local Buildroot-based kernel-4.4 configuration. Both kernel-4.4 builds trigger "Netdev Watchdog" and fail to detect link status.

We agree about the binary-only radio driver in the OpenWRT 3.18 codebase; that is not a package with which we want to be working on a project.

I have unsuccessfully attempted to pull in the OpenWRT-trunk kernel 4.4 updates, and found no difference in Ethernet behavior. After exploring several other possible causes of the failure, I'm currently focused on the peripheral clocking and on some articles I read about certain non-obvious GPIO configurations being necessary for proper Ethernet PHY operation on the original RT3050 SoC.

@fhunleth
Copy link
Collaborator

fhunleth commented Oct 3, 2016

Ugh - thanks for digging into this.

@sacha
Copy link

sacha commented Apr 10, 2017

Any luck with a solution for this? There have been several releases since this bug was originally posted, but it (or something similar) appears to still exist.

The ethernet link LED (on the LinkIt breakout board) is on during the bootloader phase of startup, but turns off during kernel bootup. My switch continues to show an active link even after bootup.

At bootup I get:

[   21.110603] ------------[ cut here ]------------
[   21.119795] WARNING: CPU: 0 PID: 33 at net/sched/sch_generic.c:306 dev_watchdog+0x1dc/0x260()
[   21.136679] NETDEV WATCHDOG: eth0 (mtk_soc_eth): transmit queue 0 timed out
[   21.150461] Modules linked in:
[   21.156519] CPU: 0 PID: 33 Comm: beam Not tainted 4.4.14 #1

and then I get a periodic:

[  192.110560] mtk_soc_eth 10100000.ethernet eth0: transmit timed out
[  192.122826] mtk_soc_eth 10100000.ethernet eth0: dma_cfg:00000057
[  192.134736] mtk_soc_eth 10100000.ethernet eth0: tx_ring=0, base=07ad3000, max=128, ctx=1, dtx=0, fdx=0, next=1
[  192.154561] mtk_soc_eth 10100000.ethernet eth0: rx_ring=0, base=07ad2000, max=128, calc=127, drx=0

@fhunleth
Copy link
Collaborator

FYI. Due to other issues (bootloader and wifi), I've completely stopped spending time on the LinkIt Smart. I don't think that it's an inherently bad board, but it's a lot of effort to maintain compared to other ones. I'll leave this issue open in case others from the community have made progress. One would expect this issue to be resolved in a newer kernel eventually or there might be an OpenWRT patch floating around somewhere that fixes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants