Hi Jonas, > I hope you don't mind if I move the discussion back to openwrt-devel.
Nope. > Answering only you wasn't intentional; Heh, I did not notice that. > I changed my default now to > "reply all" so it doesn't happen again. :) <...> >>>> The automatic detection won't work with this switch due to the MDIO bus >>>> issue, so it won't be registered never. At the end, you can't use the >>>> netif_rx function of the phy device. >>> If it doesn't get detected, this really is a non issue. >> Well, this is not true totally. I did try it on several boards, and it looks >> strange: > > That's the kind of feedback I had hoped for /before/ the patch got committed > ;-) Sorry, i did not have time earlier. >> Planex MZK-W300NH: >> (Atheros AR9130 rev 1, CPU:400.000 MHz, AHB:200.000 MHz, DDR:400.000 MHz) >> <...> >> 3rd boot: >>> 0x000000050000-0x0000007c0000 : "firmware" >>> ar8216: Unknown Atheros device [ver=16777215, rev=255, phy_id=004dd042] >>> ar8216: Unknown Atheros device [ver=16777215, rev=255, phy_id=004dd042] >>> ar8216: Unknown Atheros device [ver=16777215, rev=255, phy_id=004dd042] >>> ar8216: Unknown Atheros device [ver=16777215, rev=255, phy_id=004dd042] >>> ag71xx_mdio: probed >>> eth0: Atheros AG71xx at 0xb9000000, irq 4 >>> eth1: Atheros AG71xx at 0xba000000, irq 5 >>> ar8216: Unknown Atheros device [ver=16777215, rev=255, phy_id=004dd042] >>> eth1: AR0 PHY driver attached. >>> Atheros AR71xx hardware watchdog driver version 0.1.0 >> The ar8216 messages are ugly, and i bet that users will open tickets due to >> this. > > Okay, it seems it sometimes *does* work, and sometimes doesn't. Exactly. It is not reliable. > Perhaps demoting the level to KERN_DEBUG would be better. That would be better, yes. Although it does not solve the issue completely. >> TRENDnet TEW-632BRP: >> (Atheros AR9130 rev 1, CPU:400.000 MHz, AHB:100.000 MHz, DDR:400.000 MHz) >> >>> 0x000000030000-0x0000003f0000 : "firmware" >>> ag71xx_mdio: probed >>> eth0: Atheros AG71xx at 0xb9000000, irq 4 >>> eth1: Atheros AG71xx at 0xba000000, irq 5 >>> eth1: AR8216 PHY driver attached. >>> Atheros AR71xx hardware watchdog driver version 0.1.0 >> The switch is detected on the WAN interface at every boot. It is confusing a >> bit. Ethernet seems to be working, but the switch is not configurable via >> swconfig. > > Looking at the mach-tew-632brp.c, I guess the switch cpu port is > attached to eth0, and eth1 is the WAN port. That is right. > This is under the assumption it is usable like the ar8316. > To prevent a false switch on the wan interface, the driver register > itself as switch only if the phy address is 0. > The problem probably here is that eth0 doesn't have a phy_mask, > therefore the ag71xx never calls phy_connect() for it. Defining a > phy_mask should fix it. Yes, it does fix it. > And perhaps outputting whether the driver attached in switch mode or > in simple phy mode would be helpful. Yeah, that would be more informative. >> Planex MZK-W04NU: >> (Atheros AR9132 rev 1, CPU:400.000 MHz, AHB:100.000 MHz, DDR:400.000 MHz) >> >> The AHB bus runs 200MHz originally on this device, but i have a patched >> bootloader. Additionaly, i have modified the phy mask for the ethernet >> interface. >> >>> 0x000000050000-0x0000007c0000 : "firmware" >>> ag71xx_mdio: probed >>> eth0: Atheros AG71xx at 0xb9000000, irq 4 >>> eth0: AR8216 PHY driver attached. >>> eth1: Atheros AG71xx at 0xba000000, irq 5 >>> eth1: AR8216 PHY driver attached. >>> Atheros AR71xx hardware watchdog driver version 0.1.0 >> The switch is detected on both interfaces, and it is configurable with >> swconfig. >> But both LAN and WAN ports are stops working after i have configured the >> switch. > > Okay, in that case, you are probably bitten by the problem I described > and wrote a patch for, Well, I have removed the 'has_ar8216' flag, so the ethernet driver does not adds/removes the header. And because the AR8216 driver is attached, it must use the mangle routine from that driver. > although I am a bit stumped why the WAN port stopped working. I have no idea. I will do more testing later. > Perhaps an easier workaround would be to unconditionally enable header > mode for the ar8216, the special netif_receive_skb() handling wouldn't > be needed anymore. Do you mean the special handling in the ag71xx driver itself? > Although this would disable the invalid VID fixup. > >>> I also just saw that all 3 devices having 'has_ar8216' do not have a >>> phy_mask >>> defined, so the driver never has a chance to attach anyway. >> Incorrect, see above. > > You are right, they still have for the WAN port where it attaches itself. Yes, i have missed this fact earlier. > Looking at the TEW-632BRP, I assume its bootloader doesn't enable the > header mode? It doesn't have the 'has_ar8216' flag set. You are right, it is working in 'normal' mode. The AHB bus is running at 100MHz on that board. > Can you check with the attached patch if it helps the Planex MZK-W04NU? Sure. Regards, Gabor _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
