Modify

Opened 6 years ago

Closed 2 years ago

#9192 closed defect (fixed)

WAG354G broken in trunk

Reported by: Sven Bachmann <dev@…> Owned by: florian
Priority: normal Milestone: Barrier Breaker 14.07
Component: base system Version: Trunk
Keywords: wag354g Cc:

Description

In current trunk (26494) the Linksys WAG354G (AR7) support is broken. With the backfire 10.03 binaries provided on the website it works.
Currently I have no serial attached, so the only help I can give is that rev. 22727 breaks it for the first time, but this was with Kernel 2.6.32 and now 2.6.37 is being used.

The test that fails is:

  1. Flash device with the image openwrt-WA32-jffs2-64k-code.bin
  2. wait until the device is pingable via 192.168.1.1
  3. telnet to the device

Attachments (1)

w400g_bootlog_r34116.txt (32.5 KB) - added by de@… 4 years ago.

Download all attachments as: .zip

Change History (21)

comment:1 Changed 6 years ago by florian

  • Owner changed from developers to florian
  • Status changed from new to accepted

comment:2 Changed 6 years ago by ath

Same for me on my WAG354Gv1, removing 972-cpmac_fixup.patch fixes the issue. I haven't tried it on other AR7 machines though.

It's probably due to the code removed in the if (phy_id == PHY_MAX_ADDR) block which was originally added in [20022].

dmesg with trunk (broken ethernet):

cpmac-mii: probed
cpmac: No PHY present
cpmac: device eth1 (regs: 08610000, irq: 27, phy: 1:1f, mac: 00:14:bf:c5:c4:02)

and with 972-cpmac_fixup.patch removed (ethernet OK):

cpmac-mii: probed
cpmac cpmac.1: no PHY present, falling back to switch on MDIO bus 0
cpmac: device eth0 (regs: 08612800, irq: 41, phy: 0:01, mac: 00:14:bf:c5:c4:02)
cpmac: device eth1 (regs: 08610000, irq: 27, phy: 1:1f, mac: 00:14:bf:c5:c4:02)

comment:3 follow-ups: Changed 5 years ago by nicholas.bartle@…

Same with me on my WAG54G - in as much as I have the same error, but removing 972 patch doesn't fix the problem

comment:4 in reply to: ↑ 3 Changed 5 years ago by anonymous

Replying to nicholas.bartle@…:

Same with me on my WAG54G - in as much as I have the same error, but removing 972 patch doesn't fix the problem

Insalling rc5 (so r27608) gives me a working PHY:

cpmac-mii: probed
cpmac cpmac.1: trying external MII
cpmac cpmac.1: using fixed PHY
PHY 0:01 not found
eth%d: Could not attach to PHY
cpmac: device eth0 (regs: 08610000, irq: 27, phy: 1:1f, mac: 00:13:10:01:00:00)

comment:5 in reply to: ↑ 3 Changed 5 years ago by nicholas.bartle@…

Replying to nicholas.bartle@…:

Same with me on my WAG54G - in as much as I have the same error, but removing 972 patch doesn't fix the problem

Actually scratch that - didn't remove 972 properly.

So, having removed the 972 patch (properly!) I now have a working PHY :-)

root@OpenWrt:/# dmesg | grep cpmac
cpmac-mii: probed
cpmac cpmac.1: no PHY present, falling back to switch on MDIO bus 0
cpmac: device eth0 (regs: 08612800, irq: 41, phy: 0:01, mac: 00:13:10:01:b2:f4)
cpmac: device eth1 (regs: 08610000, irq: 27, phy: 1:1f, mac: 00:13:10:01:b2:f4)

For anyone else stumbling on this ticket, this is on a Linksys WAG54G v2 (AR7WRD) running trunk @ r28387 but with patch 972 removed.

comment:6 Changed 4 years ago by florian

  • Resolution set to fixed
  • Status changed from accepted to closed

Fixed with r33750 and r33751

comment:7 Changed 4 years ago by de@…

unfortunately it's still the same for me on Acorp W400G, there is incoming traffic, but no outgoing.

[    0.600000] Fixed MDIO Bus: probed
[    0.860000] EXTERNAL SWITCH!!!
[    0.940000] cpmac-mii: probed
[    1.010000] cpmac: device eth0 (regs: 08612800, irq: 41, phy: cpmac-1:00, mac: 00:14:22:33:44:56)
[    1.090000] cpmac: device eth1 (regs: 08610000, irq: 27, phy: cpmac-1:1f, mac: 00:14:22:33:44:56)

removing 972-cpmac resolves the issue. Running r34116

btw, is RTL8305SC supported as anything else except dumb switch?

comment:8 Changed 4 years ago by anonymous

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:9 Changed 4 years ago by florian

Please post the full log so we can understand whether the link is UP or not.

Changed 4 years ago by de@…

comment:10 Changed 4 years ago by de@…

the link is down, while physically it's up, the led is on.
I've attached bootlog above.

comment:11 Changed 4 years ago by anonymous

Can you try the following patch:

diff --git a/target/linux/ar7/patches-3.3/972-cpmac_fixup.patch b/target/linux/ar7/patches-3.3/972-cpmac_fixup.patch
index 456e9b3..6ced5bc 100644
--- a/target/linux/ar7/patches-3.3/972-cpmac_fixup.patch
+++ b/target/linux/ar7/patches-3.3/972-cpmac_fixup.patch
@@ -130,7 +130,7 @@
 -              dev_err(&pdev->dev, "no PHY present, falling back "
 -                                      "to switch on MDIO bus 0\n");
 -              strncpy(mdio_bus_id, "fixed-0", MII_BUS_ID_SIZE); /* fixed phys bus */
-+      if (phy_id == PHY_MAX_ADDR && pdev->id == 1) {
++      if (phy_id == PHY_MAX_ADDR) {
 +              printk(KERN_ERR "cpmac: No PHY present, using fixed PHY\n");
                phy_id = pdev->id;
 +              strncpy(mdio_bus_id, "fixed-0", MII_BUS_ID_SIZE);

comment:12 Changed 4 years ago by de@…

tried the patch, didn't help

comment:13 Changed 4 years ago by florian

Can you break up the bridge, remove all the vlan configuration from /etc/config/network and see if you can get something that works for you?

comment:14 Changed 4 years ago by de@…

I've removed bridge, VLANs weren't working ever on this for me (that's what i'm also struggling to accomplish, to make WAN port). Brought up eth0, assigned IP, but still same.

UP BROADCAST MULTICAST  MTU:1500  Metric:1

there is no RUNNING for both, eth0 and eth1

comment:15 Changed 4 years ago by florian

With the patch above do you get both cpmacs to print "No PHY Present, using fixed PHY"?

comment:16 Changed 4 years ago by de@…

I dont think output is any different with or without patch.

Bootlog with patch: http://pastebin.com/KMChpKdz

I couldnt apply patch automatically, so i did it manually, and if im not wrong I've only had to replace

      if (phy_id == PHY_MAX_ADDR && pdev->id == 1) {

with

      if (phy_id == PHY_MAX_ADDR) {

comment:17 Changed 4 years ago by florian

It looks like there is a valid switch on eth0, just we don't know how to drive it. eth1 is using the PHY address 31, which suggests it should fallback to fixed PHY maybe.

comment:18 Changed 4 years ago by jasmine.aura@…

Built r34879 for DSL-2640T (AR7WRD w/ ADM6996M external switch) and found it is broken as well.
I attached boot log over serial, in #12779.

Since I found TNET1350 (ACX) also broken, but was working with backfire 10.03.1, I attached bootlog of the latter as well, in #12789.

comment:19 Changed 2 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

comment:20 Changed 2 years ago by florian

  • Resolution set to fixed
  • Status changed from reopened to closed

Should be fixed with r42168, r42169

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.