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

FS#2177 - ar71xx: Unusable networking with latest snapshot images #7084

Closed
openwrt-bot opened this issue Mar 11, 2019 · 4 comments
Closed

FS#2177 - ar71xx: Unusable networking with latest snapshot images #7084

openwrt-bot opened this issue Mar 11, 2019 · 4 comments
Labels

Comments

@openwrt-bot
Copy link

noblemtw:

  • TP Link TL-WPA8630 (Powerline wireless extender)

When updating the above device to the latest trunk, LAN access is lost, however Wireless works fine. The issue is apparent on both my own self compiled image as well as the dev openwrt snapshot, as can be seen from the below log snippet, eth0 enters a disabled state and never comes up;

boot-log-broken.txt:Sat Mar 9 19:10:05 2019 kern.info kernel: [ 1.860843] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:18 [uid=00808008, driver=Generic PHY]
boot-log-broken.txt:Sat Mar 9 19:10:05 2019 kern.info kernel: [ 1.870771] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:SGMII
boot-log-broken.txt:Sat Mar 9 19:10:05 2019 kern.info kernel: [ 4.619239] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
boot-log-broken.txt:Sat Mar 9 19:10:12 2019 kern.info kernel: [ 20.205456] br-lan: port 1(eth0) entered blocking state
boot-log-broken.txt:Sat Mar 9 19:10:12 2019 kern.info kernel: [ 20.210911] br-lan: port 1(eth0) entered disabled state
boot-log-broken.txt:Sat Mar 9 19:10:12 2019 kern.info kernel: [ 20.216564] device eth0 entered promiscuous mode

Expected behaviour taken from the logs of the device running the stable release;

boot-log-working.txt:Sat Mar 9 19:30:12 2019 kern.info kernel: [ 2.025604] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd036, driver=Atheros AR8216/AR8236/AR8316]
boot-log-working.txt:Sat Mar 9 19:30:12 2019 kern.info kernel: [ 2.037168] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:SGMII
boot-log-working.txt:Sat Mar 9 19:30:12 2019 kern.info kernel: [ 4.573592] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
boot-log-working.txt:Sat Mar 9 19:30:12 2019 kern.info kernel: [ 5.635550] eth0: link up (1000Mbps/Full duplex)
boot-log-working.txt:Sat Mar 9 19:30:12 2019 kern.info kernel: [ 5.640453] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
boot-log-working.txt:Sat Mar 9 19:30:12 2019 kern.info kernel: [ 22.348036] eth0: link down
boot-log-working.txt:Sat Mar 9 19:30:20 2019 kern.info kernel: [ 43.666896] br-lan: port 1(eth0) entered blocking state
boot-log-working.txt:Sat Mar 9 19:30:20 2019 kern.info kernel: [ 43.672306] br-lan: port 1(eth0) entered disabled state
boot-log-working.txt:Sat Mar 9 19:30:20 2019 kern.info kernel: [ 43.678060] device eth0 entered promiscuous mode
boot-log-working.txt:Sat Mar 9 19:30:21 2019 kern.info kernel: [ 44.675621] eth0: link up (1000Mbps/Full duplex)
boot-log-working.txt:Sat Mar 9 19:30:21 2019 kern.info kernel: [ 44.680539] br-lan: port 1(eth0) entered blocking state
boot-log-working.txt:Sat Mar 9 19:30:21 2019 kern.info kernel: [ 44.685973] br-lan: port 1(eth0) entered forwarding state
boot-log-working.txt:Sat Mar 9 19:30:21 2019 daemon.notice netifd: Network device 'eth0' link is up

The problem appears to the PHY being detected incorrectly, in the broken example, the below is observed and the Generic PHY driver used;

ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:18 [uid=00808008, driver=Generic PHY

where as this is seen on the working example, with the Atheros driver being used
ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd036, driver=Atheros AR8216/AR8236/AR8316]

I believe this issue is related to commit d3506d1 and reversing the patch restores LAN connectivity, with the PHY being detected exactly as per the above working example

I've attached boot logs with working/non-working examples, please let me know if any other information is required or if there's anything I can test to help resolve

@openwrt-bot
Copy link
Author

kuehro:

The same bug is present on Ubiquiti Nanostation M5 XW and can be resolved by the same fix:

Before

ag71xx.0: connected to PHY at ag71xx-mdio.0:01 [uid=004dd043, driver=Generic PHY]

and after reverting the commit

ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd043, driver=Atheros AR8216/AR8236/AR8316]

Please revert the commit.

@openwrt-bot
Copy link
Author

ynezz:

Hi,

thanks for reporting this and finding the offending commit! Could you please try following fix?

diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c index e92798c..f42c614 100644 --- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c +++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c @@ -127,7 +127,8 @@ static int ag71xx_phy_connect_multi(struct ag71xx *ag) if (ag->mii_bus->mdio_map[phy_addr] == NULL) continue;
  •   phydev = mdiobus_get_phy(ag->mii_bus, phy_addr);
    
  •   if (phydev == NULL)
    
  •   	phydev = mdiobus_get_phy(ag->mii_bus, phy_addr);
    
      DBG("%s: PHY found at %s, uid=%08x\n",
      dev_name(dev),
    

@openwrt-bot
Copy link
Author

ynezz:

I've prepared following [[https://git.openwrt.org/?p=openwrt/staging/ynezz.git;a=commit;h=dafbbf8eff947a81ccfd531cf0dab433b9c39c35
|commit]] which I planto push once you confirm, that it's working for you. Could you please give me your Tested-by: Real Name real@email.com so I can add it to the commit which fixes this problem as well?

@openwrt-bot
Copy link
Author

ynezz:

Should be fixed in 31ea08a

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

No branches or pull requests

1 participant