-
-
Notifications
You must be signed in to change notification settings - Fork 10k
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
ar71xx: ag71xx minor fixes that help debugging #1217
Conversation
NB: Error only appears with ag71xx debug messages and dynamic printk enabled. This is probably why no one has caught it before. Previously phy probe debug messages used old (now wrong) functions to get the phy name for printing. There was also the chance of a NULL pointer in the event no phy_device was found. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
It's a little noisier but makes it obvious when the ar7240 switch was connected to the MDIO bus, and to which phy device (or the failure to do so). Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
The driver is written in such a way that with a board defintion that connects a fixed phy, mdio, and switch in a certain way, a kernel oops could result because of lack of previously probed mdio bus. This commit allows for easier debugging in this case by casting the correct blame with serial console messages. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
@@ -97,6 +97,17 @@ static int ag71xx_phy_connect_fixed(struct ag71xx *ag) | |||
ag->duplex = pdata->duplex; | |||
ag->speed = pdata->speed; | |||
|
|||
if (!ret) { | |||
dev_info(dev, "connected to fixed PHY at %s [uid=%08x, driver=%s]\n", | |||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,5,0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for the kernel rev #if. we use >=4.9 rest of the series is fine
manually fixed the comment and merged the series, Thanks ! |
@blogic @cshoredaniel I propose that the commits from this PR get reverted, until they are fixed.
I have problems connecting to my ar71xx WNDR3800 (ar7161 based) after compiling the current master r7713-a2a225517d. The reason seems to be the switch changes made by this PR. Instead of having both eth0 and eth1, kernel log has an error message "Missing PHY for ag71xx.0" from this PR, and the normal eth1 is assigned to be eth0. No eth1 is defined. That pretty much breaks all connectivity to the router.
Build r7581-7880a6f7fe from 29 July 2018 worked ok, and that is right before this PR got merged. Reverting both of these commits fixes things: Log after reverting matches again the expectations and the router works:
If only the "Add connect message: fixed phy" commit is reverted, then a kernel OOPS follows. Log below. I think that the "Add connect message: fixed phy" tries to give a too informative error message and some information is not found with all devices. That leads to OOPS. The second commit "Prevent kernel oops for board def" tries to mitigate that, but at the same time stops the execution of the function too early. Log of the OOPS
|
This reverts commit 0b9f4e8. This change reportedly breaks connectivity on some ar71xx devices, so revert it for now. Ref: openwrt/openwrt#1217 (comment) Reported-by: Hannu Nyman <hannu.nyman@iki.fi> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This reverts commit 7a3e133. This change reportedly breaks connectivity on some ar71xx devices, so revert it for now. Ref: openwrt/openwrt#1217 (comment) Reported-by: Hannu Nyman <hannu.nyman@iki.fi> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
I believe the issue is devices like @hnyman WNDR that have non ag71xxx switch attached. I don't think it's worth trying to make them work; they're just tweaks that were supposed to make life easier. Sorry. |
This reverts commit 0b9f4e880807e3cfd22d12b929202e1edcdc577c. This change reportedly breaks connectivity on some ar71xx devices, so revert it for now. Ref: openwrt/openwrt#1217 (comment) Reported-by: Hannu Nyman <hannu.nyman@iki.fi> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This reverts commit 7a3e133751870a3431e2430386a77a002eb24117. This change reportedly breaks connectivity on some ar71xx devices, so revert it for now. Ref: openwrt/openwrt#1217 (comment) Reported-by: Hannu Nyman <hannu.nyman@iki.fi> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This reverts commit 0b9f4e880807e3cfd22d12b929202e1edcdc577c. This change reportedly breaks connectivity on some ar71xx devices, so revert it for now. Ref: openwrt/openwrt#1217 (comment) Reported-by: Hannu Nyman <hannu.nyman@iki.fi> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This reverts commit 7a3e133751870a3431e2430386a77a002eb24117. This change reportedly breaks connectivity on some ar71xx devices, so revert it for now. Ref: openwrt/openwrt#1217 (comment) Reported-by: Hannu Nyman <hannu.nyman@iki.fi> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This is a trio of minor fixes/tweaks for ar71xx version of ag71xx that help debugging when working with the driver and/or modifying board definitions for ag71xx boards.