Hi,
When playing around with my Ruckus ZF7372 and trying to get its secondary Ethernet port to report actual link status to userspace, I decided to take the plunge, and try to enable DSA ar9331
driver for built-in switch of AR9344 et al. It did probe and report the correct link status to userspace, however I could not get any traffic to get through.
Next, I dug up my old MR3420v2 with modded flash and RAM, to try on device with fuller configuration, and the results are more or less, the same:
- DSA tree is set up properly
- No traffic gets through on the DSA ports - I can see some traffic with Atheros header on the switch upstream port, when the link gets up, but not much else
- GMAC1 ends up as eth0 due to being the DSA CPU port and probe ordering
- No traffic on GMAC0 (now eth1) as well, when the appropriate PHY exposed by
ar9331
gets attached to it, even though link state is reported correctly, and I get bombarded with TX timeouts.
My boot log showing this is here:
***************************************
* U-Boot 1.1.4-7a540a78-clean *
* Build: 2018-02-23 *
***************************************
** Warning: bad env CRC, using default,
use 'saveenv' to save it in FLASH
BOARD: TP-Link TL-MR3420 v2
SOC: AR9341 rev. 3
CPU: MIPS 74Kc
RAM: 64 MB DDR1 16-bit CL3-3-3-8
FLASH: 16 MB Winbond W25Q128
MAC: 30:B5:C2:DD:81:CC
CLOCKS: CPU/RAM/AHB/SPI/REF
550/400/200/ 25/ 25 MHz
Hit any key to stop booting: 0
Booting image from 0x9F020000...
Vendor/image name: OpenWrt r19486+166-e20de2244270
Hardware ID: 0x34200002
Whole image size: 15.5 MB (16252928 bytes)
Kernel size: 2.4 MB (2565103 bytes)
Rootfs size: 5.3 MB (5535786 bytes)
Kernel load address: 0x80060000
Kernel entry point: 0x80060000
Header CRC... skipped
Data CRC... skipped
Stopping network... OK!
Uncompressing Kernel... OK!
Starting kernel...
[ 0.000000] Linux version 5.15.34 (lechu@buildserver) (mips-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r19486+138-e20de2244270) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 Sun Jun 5 11:35:56 2022
[ 0.000000] printk: bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[ 0.000000] MIPS: machine is TP-Link TL-MR3420 v2
[ 0.000000] SoC: Atheros AR9341 rev 3
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 16240
[ 0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[ 0.000000] Writing ErrCtl register=00000000
[ 0.000000] Readback ErrCtl register=00000000
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 55072K/65536K available (6292K kernel code, 612K rwdata, 1412K rodata, 1212K init, 218K bss, 10464K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS: 51
[ 0.000000] random: get_random_bytes called from start_kernel+0x548/0x740 with crng_init=0
[ 0.000000] CPU clock: 550.000 MHz
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6950037990 ns
[ 0.000002] sched_clock: 32 bits at 275MHz, resolution 3ns, wraps every 7809031678ns
[ 0.008886] Calibrating delay loop... 274.02 BogoMIPS (lpj=1370112)
[ 0.085933] pid_max: default: 32768 minimum: 301
[ 0.091414] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.099747] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.115021] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.126265] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[ 0.134146] pinctrl core: initialized pinctrl subsystem
[ 0.141450] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.148864] thermal_sys: Registered thermal governor 'step_wise'
[ 0.170254] clocksource: Switched to clocksource MIPS
[ 0.184018] NET: Registered PF_INET protocol family
[ 0.189754] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.198974] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.208557] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.217296] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.225334] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.232713] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.240170] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.248502] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.255037] PCI: CLS 0 bytes, default 32
[ 0.263411] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[ 0.276372] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.283082] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.295506] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[ 0.308040] pinctrl-single 1804002c.pinmux: 544 pins, size 68
[ 0.316003] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[ 0.326208] printk: console [ttyS0] disabled
[ 0.331228] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 9, base_baud = 1562500) is a 16550A
[ 0.341071] printk: console [ttyS0] enabled
[ 0.341071] printk: console [ttyS0] enabled
[ 0.350131] printk: bootconsole [early0] disabled
[ 0.350131] printk: bootconsole [early0] disabled
[ 0.383842] spi-nor spi0.0: w25q128 (16384 Kbytes)
[ 0.388886] 3 fixed-partitions partitions found on MTD device spi0.0
[ 0.395515] Creating 3 MTD partitions on "spi0.0":
[ 0.400511] 0x000000000000-0x000000020000 : "u-boot"
[ 0.408398] 0x000000020000-0x000000ff0000 : "firmware"
[ 0.415300] 2 tplink-fw partitions found on MTD device firmware
[ 0.421529] Creating 2 MTD partitions on "firmware":
[ 0.426670] 0x000000000000-0x0000002725ef : "kernel"
[ 0.431823] mtd: partition "kernel" doesn't end on an erase/write block -- force read-only
[ 0.443492] 0x0000002725f0-0x000000fd0000 : "rootfs"
[ 0.448652] mtd: partition "rootfs" doesn't start on an erase/write block boundary -- force read-only
[ 0.459243] mtd: device 3 (rootfs) set to be root filesystem
[ 0.466404] 1 squashfs-split partitions found on MTD device rootfs
[ 0.472890] 0x0000007c0000-0x000000fd0000 : "rootfs_data"
[ 0.479629] 0x000000ff0000-0x000001000000 : "art"
[ 0.881368] ag71xx 19000000.eth: Could not connect to PHY device. Deferring probe.
[ 1.565538] ag71xx 1a000000.eth: connected to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
[ 1.575629] eth0: Atheros AG71xx at 0xba000000, irq 5, mode: gmii
[ 1.582486] i2c_dev: i2c /dev entries driver
[ 1.588896] NET: Registered PF_INET6 protocol family
[ 1.602777] Segment Routing with IPv6
[ 1.606630] In-situ OAM (IOAM) with IPv6
[ 1.610905] NET: Registered PF_PACKET protocol family
[ 1.616244] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[ 1.630018] 8021q: 802.1Q VLAN Support v1.8
[ 1.635630] gpio-4 (tp-link:power:usb): hogged as output/high
[ 1.981366] ag71xx 19000000.eth: Could not connect to PHY device. Deferring probe.
[ 2.017142] DSA: failed to set STP state 3 (-122)
[ 2.022101] ar9331_switch mdio.0:10: configuring for fixed/gmii link mode
[ 2.030039] ar9331_switch mdio.0:10 lan4 (uninitialized): PHY [!ahb!eth@1a000000!mdio!switch@10:04] driver [Generic PHY] (irq=POLL)
[ 2.044292] ar9331_switch mdio.0:10 lan1 (uninitialized): PHY [!ahb!eth@1a000000!mdio!switch@10:01] driver [Generic PHY] (irq=POLL)
[ 2.058604] ar9331_switch mdio.0:10 lan2 (uninitialized): PHY [!ahb!eth@1a000000!mdio!switch@10:02] driver [Generic PHY] (irq=POLL)
[ 2.072927] ar9331_switch mdio.0:10 lan3 (uninitialized): PHY [!ahb!eth@1a000000!mdio!switch@10:03] driver [Generic PHY] (irq=POLL)
[ 2.086398] DSA: failed to set STP state 0 (-122)
[ 2.091442] DSA: tree 0 setup
[ 2.097111] ar9331_switch mdio.0:10: Link is Up - 1Gbps/Full - flow control off
[ 2.432082] ag71xx 19000000.eth: connected to PHY at !ahb!eth@1a000000!mdio!switch@10:00 [uid=004dd042, driver=Generic PHY]
[ 2.444743] eth1: Atheros AG71xx at 0xb9000000, irq 4, mode: mii
[ 2.463364] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[ 2.478438] Freeing unused kernel image (initmem) memory: 1212K
[ 2.484622] This architecture does not have kernel memory protection.
[ 2.491304] Run /sbin/init as init process
[ 2.580279] random: fast init done
[ 3.323605] init: Console is alive
[ 3.327701] init: - watchdog -
[ 5.610494] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[ 5.739777] usbcore: registered new interface driver usbfs
[ 5.745644] usbcore: registered new interface driver hub
[ 5.751331] usbcore: registered new device driver usb
[ 5.812347] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 5.833174] SCSI subsystem initialized
[ 5.845259] ehci-fsl: Freescale EHCI Host controller driver
[ 5.855123] ehci-platform: EHCI generic platform driver
[ 5.861070] ehci-platform 1b000000.usb: EHCI Host Controller
[ 5.866990] ehci-platform 1b000000.usb: new USB bus registered, assigned bus number 1
[ 5.875312] ehci-platform 1b000000.usb: irq 3, io mem 0x1b000000
[ 5.910286] ehci-platform 1b000000.usb: USB 2.0 started, EHCI 1.00
[ 5.917871] hub 1-0:1.0: USB hub found
[ 5.922823] hub 1-0:1.0: 1 port detected
[ 5.933425] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 5.951584] init: - preinit -
[ 7.421360] random: jshn: uninitialized urandom read (4 bytes read)
[ 7.620924] random: jshn: uninitialized urandom read (4 bytes read)
[ 7.726699] random: jshn: uninitialized urandom read (4 bytes read)
[ 8.412711] DSA: failed to set STP state 3 (-122)
[ 8.417613] ar9331_switch mdio.0:10 lan1: configuring for phy/internal link mode
[ 8.427048] eth0: link up (1000Mbps/Full duplex)
[ 8.433440] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[ 8.646733] urandom_read: 4 callbacks suppressed
[ 8.646761] random: procd: uninitialized urandom read (4 bytes read)
[ 13.007254] mount_root: loading kmods from internal overlay
[ 13.079382] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[ 13.088475] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[ 14.181233] jffs2: notice: (414) jffs2_build_xattr_subsystem: complete building xattr subsystem, 6 of xdatum (0 unchecked, 1 orphan) and 7 of xref (1 dead, 0 orphan) found.
[ 14.198098] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[ 14.210955] block: extroot: not configured
[ 14.283941] jffs2: notice: (412) jffs2_build_xattr_subsystem: complete building xattr subsystem, 6 of xdatum (0 unchecked, 1 orphan) and 7 of xref (1 dead, 0 orphan) found.
[ 14.997941] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[ 15.009684] block: extroot: not configured
[ 15.015701] mount_root: switching to jffs2 overlay
[ 15.033630] overlayfs: upper fs does not support tmpfile.
[ 15.046852] urandom-seed: Seeding with /etc/urandom.seed
[ 15.236571] DSA: failed to set STP state 0 (-122)
[ 15.256797] procd: - early -
[ 15.260235] procd: - watchdog -
[ 15.969050] random: jshn: uninitialized urandom read (4 bytes read)
Failed to connect to ubus
[ 16.140426] procd: - watchdog -
[ 16.150735] procd: - ubus -
[ 16.565665] random: ubusd: uninitialized urandom read (4 bytes read)
[ 16.948754] procd: - init -
Please press Enter to activate this console.
[ 19.265322] kmodloader: loading kernel modules from /etc/modules.d/*
[ 20.039202] urngd: v1.0.2 started.
[ 20.458289] random: crng init done
[ 20.689510] fuse: init (API version 7.34)
[ 20.747715] Loading modules backported from Linux version v5.15.33-0-g06f50ca83ace
[ 20.755620] Backport generated by backports.git v5.15.33-1-0-g183c4ab2
[ 20.935315] xt_time: kernel timezone is -0000
[ 21.664940] PPP generic driver version 2.4.2
[ 21.692891] NET: Registered PF_PPPOX protocol family
[ 21.954802] ieee80211 phy0: Atheros AR9340 Rev:3 mem=0xb8100000, irq=2
[ 22.023197] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 51.471944] eth0: link down
[ 51.516461] eth0: link up (1000Mbps/Full duplex)
[ 51.529056] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 51.539637] DSA: failed to set STP state 3 (-122)
[ 51.544608] ar9331_switch mdio.0:10 lan1: configuring for phy/internal link mode
[ 51.568404] br-lan: port 1(lan1) entered blocking state
[ 51.573902] br-lan: port 1(lan1) entered disabled state
[ 51.579722] device lan1 entered promiscuous mode
[ 51.584583] device eth0 entered promiscuous mode
[ 51.714279] DSA: failed to set STP state 3 (-122)
[ 51.719180] ar9331_switch mdio.0:10 lan2: configuring for phy/internal link mode
[ 51.748207] br-lan: port 2(lan2) entered blocking state
[ 51.753702] br-lan: port 2(lan2) entered disabled state
[ 51.759510] device lan2 entered promiscuous mode
[ 51.797147] DSA: failed to set STP state 3 (-122)
[ 51.802119] ar9331_switch mdio.0:10 lan3: configuring for phy/internal link mode
[ 51.830883] br-lan: port 3(lan3) entered blocking state
[ 51.836326] br-lan: port 3(lan3) entered disabled state
[ 51.842209] device lan3 entered promiscuous mode
[ 51.885804] DSA: failed to set STP state 3 (-122)
[ 51.890788] ar9331_switch mdio.0:10 lan4: configuring for phy/internal link mode
[ 51.920917] br-lan: port 4(lan4) entered blocking state
[ 51.926356] br-lan: port 4(lan4) entered disabled state
[ 51.938393] device lan4 entered promiscuous mode
[ 54.023317] eth1: link up (100Mbps/Full duplex)
[ 54.028079] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[ 69.140262] ------------[ cut here ]------------
[ 69.145063] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:477 dev_watchdog+0x298/0x2a0
[ 69.153660] NETDEV WATCHDOG: eth1 (ag71xx): transmit queue 0 timed out
[ 69.160419] Modules linked in: ath9k ath9k_common pppoe ppp_async iptable_nat ath9k_hw ath xt_state xt_nat xt_conntrack xt_REDIRECT xt_MASQUERADE xt_FLOWOFFLOAD xt_CT pppox ppp_generic nf_nat_tftp nf_nat_snmp_basic nf_nat_sip nf_nat_pptp nf_nat_irc nf_nat_h323 nf_nat_amanda nf_nat nf_flow_table nf_conntrack_tftp nf_conntrack_snmp nf_conntrack_sip nf_conntrack_pptp nf_conntrack_irc nf_conntrack_h323 nf_conntrack_broadcast nf_conntrack_amanda nf_conntrack mac80211 lzo ipt_REJECT cfg80211 xt_time xt_tcpudp xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG ts_kmp ts_fsm ts_bm slhc nf_reject_ipv4 nf_log_syslog nf_defrag_ipv6 nf_defrag_ipv4 mdio_netlink lzo_rle lzo_decompress lzo_compress iptable_raw iptable_mangle iptable_filter ip_tables crc_ccitt compat asn1_decoder fuse ledtrig_usbport xt_set ip_set_list_set ip_set_hash_netportnet ip_set_hash_netport ip_set_hash_netnet ip_set_hash_netiface ip_set_hash_net ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip
[ 69.160884] ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 vfat fat nls_utf8 nls_iso8859_1 nls_cp437 sha256_generic libsha256 seqiv jitterentropy_rng drbg hmac cmac crypto_acompress fsl_mph_dr_of ehci_platform ehci_fsl sd_mod scsi_mod scsi_common ehci_hcd gpio_button_hotplug ext4 mbcache jbd2 usbcore nls_base usb_common crc16 mii crc32c_generic
[ 69.296076] CPU: 0 PID: 0 Comm: swapper Not tainted 5.15.34 #0
[ 69.302119] Stack : 00000000 00000000 80c09dc4 809b0000 807f0000 80726010 807f0310 807efea3
[ 69.310806] 809b32d4 00000000 00000000 800c2210 8071edc8 00000001 80c09d80 6ad703c8
[ 69.319483] 00000000 00000000 80726010 80c09c18 ffffefff 00000000 00000000 ffffffea
[ 69.328169] 000000cd 80c09c24 000000cd 807f5fd8 809b0000 00000009 80c09e60 804f24a8
[ 69.336860] 00000009 00000000 ffffa5d2 8085c174 00000018 803b1100 00000000 809b0000
[ 69.345543] ...
[ 69.348076] Call Trace:
[ 69.350610] [<80067068>] show_stack+0x28/0xf0
[ 69.355149] [<80086d1c>] __warn+0xc0/0x12c
[ 69.359402] [<80086e14>] warn_slowpath_fmt+0x8c/0xac
[ 69.364550] [<804f24a8>] dev_watchdog+0x298/0x2a0
[ 69.369419] [<800d2954>] call_timer_fn.constprop.0+0x1c/0x8c
[ 69.375311] [<800d2da4>] run_timer_softirq+0x2ec/0x388
[ 69.380645] [<80683fe0>] __do_softirq+0x118/0x2cc
[ 69.385529] [<80343d50>] plat_irq_dispatch+0x94/0xc8
[ 69.390686] [<80062738>] handle_int+0x138/0x144
[ 69.395375] [<80683d7c>] r4k_wait_irqoff+0x18/0x24
[ 69.400344] [<80683e2c>] default_idle_call+0x20/0x3c
[ 69.405483] [<800b1e28>] do_idle+0x98/0x108
[ 69.409820] [<800b20e4>] cpu_startup_entry+0x18/0x28
[ 69.414968] [<80881ec4>] start_kernel+0x70c/0x740
[ 69.419847]
[ 69.421398] ---[ end trace 4cdaf1414fc94c6d ]---
[ 69.426172] eth1: tx timeout
and this is what I get when LAN1 port is enabled:
root@OpenWrt:/# tcpdump -i eth0 -nvvXX
tcpdump: listening on eth0, link-type NULL (BSD loopback), capture size 262144 bytes
[ 211.944661] ar9331_switch mdio.0:10 lan1: Link is Up - 100Mbps/Full - flow control rx/tx
[ 211.955578] br-lan: port 1(lan1) entered blocking state
[ 211.961050] br-lan: port 1(lan1) entered forwarding state
[ 211.969737] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
11:40:47.345153 AF Unknown (858996850), length 172:
0x0000: 7240 3333 0000 0016 30b5 c2dd 81cc 86dd r@33....0.......
0x0010: 6000 0000 0074 0001 0000 0000 0000 0000 `....t..........
0x0020: 0000 0000 0000 0000 ff02 0000 0000 0000 ................
0x0030: 0000 0000 0000 0016 3a00 0502 0000 0100 ........:.......
0x0040: 8f00 e171 0000 0005 0400 0000 ff02 0000 ...q............
0x0050: 0000 0000 0000 0001 ffdd 81cc 0400 0000 ................
0x0060: ff05 0000 0000 0000 0000 0000 0001 0003 ................
0x0070: 0400 0000 ff02 0000 0000 0000 0000 0000 ................
0x0080: 0001 0002 0400 0000 ff02 0000 0000 0000 ................
0x0090: 0000 0001 ff00 0001 0400 0000 ff02 0000 ................
0x00a0: 0000 0000 0000 0000 0000 0002 ............
11:40:47.385140 AF Unknown (858996850), length 88:
0x0000: 7240 3333 ffdd 81cc 30b5 c2dd 81cc 86dd r@33....0.......
0x0010: 6000 0000 0020 3aff 0000 0000 0000 0000 `.....:.........
0x0020: 0000 0000 0000 0000 ff02 0000 0000 0000 ................
0x0030: 0000 0001 ffdd 81cc 8700 42a6 0000 0000 ..........B.....
0x0040: fe80 0000 0000 0000 32b5 c2ff fedd 81cc ........2.......
0x0050: 0e01 0031 8678 abc5 ...1.x..
11:40:47.455136 AF Unknown (858996850), length 88:
0x0000: 7240 3333 ff00 0001 30b5 c2dd 81cc 86dd r@33....0.......
0x0010: 6000 0000 0020 3aff 0000 0000 0000 0000 `.....:.........
0x0020: 0000 0000 0000 0000 ff02 0000 0000 0000 ................
0x0030: 0000 0001 ff00 0001 8700 8de5 0000 0000 ................
0x0040: fd16 7dc7 1126 0000 0000 0000 0000 0001 ..}..&..........
0x0050: 0e01 9eb4 3b1c 78e2 ....;.x.
11:40:47.785134 AF Unknown (858996850), length 172:
0x0000: 7240 3333 0000 0016 30b5 c2dd 81cc 86dd r@33....0.......
0x0010: 6000 0000 0074 0001 0000 0000 0000 0000 `....t..........
0x0020: 0000 0000 0000 0000 ff02 0000 0000 0000 ................
0x0030: 0000 0000 0000 0016 3a00 0502 0000 0100 ........:.......
0x0040: 8f00 e171 0000 0005 0400 0000 ff02 0000 ...q............
0x0050: 0000 0000 0000 0001 ffdd 81cc 0400 0000 ................
0x0060: ff05 0000 0000 0000 0000 0000 0001 0003 ................
0x0070: 0400 0000 ff02 0000 0000 0000 0000 0000 ................
0x0080: 0001 0002 0400 0000 ff02 0000 0000 0000 ................
0x0090: 0000 0001 ff00 0001 0400 0000 ff02 0000 ................
0x00a0: 0000 0000 0000 0000 0000 0002 ............
11:40:48.395434 AF Unknown (858996850), length 192:
0x0000: 7240 3333 0000 0016 30b5 c2dd 81cc 86dd r@33....0.......
0x0010: 6000 0000 0088 0001 fe80 0000 0000 0000 `...............
0x0020: 32b5 c2ff fedd 81cc ff02 0000 0000 0000 2...............
0x0030: 0000 0000 0000 0016 3a00 0502 0000 0100 ........:.......
0x0040: 8f00 6a77 0000 0006 0400 0000 ff02 0000 ..jw............
0x0050: 0000 0000 0000 0001 ff00 0000 0400 0000 ................
0x0060: ff02 0000 0000 0000 0000 0001 ffdd 81cc ................
0x0070: 0400 0000 ff05 0000 0000 0000 0000 0000 ................
0x0080: 0001 0003 0400 0000 ff02 0000 0000 0000 ................
0x0090: 0000 0000 0001 0002 0400 0000 ff02 0000 ................
0x00a0: 0000 0000 0000 0001 ff00 0001 0400 0000 ................
0x00b0: ff02 0000 0000 0000 0000 0000 0000 0002 ................
11:40:48.425256 AF Unknown (858996850), length 92:
0x0000: 7240 3333 0000 0016 30b5 c2dd 81cc 86dd r@33....0.......
0x0010: 6000 0000 0024 0001 fe80 0000 0000 0000 `....$..........
0x0020: 32b5 c2ff fedd 81cc ff02 0000 0000 0000 2...............
0x0030: 0000 0000 0000 0016 3a00 0502 0000 0100 ........:.......
0x0040: 8f00 faa9 0000 0001 0400 0000 ff02 0000 ................
0x0050: 0000 0000 0000 0001 ff00 0000 ............
11:40:48.565237 AF Unknown (858996850), length 92:
0x0000: 7240 3333 0000 0016 30b5 c2dd 81cc 86dd r@33....0.......
0x0010: 6000 0000 0024 0001 fe80 0000 0000 0000 `....$..........
0x0020: 32b5 c2ff fedd 81cc ff02 0000 0000 0000 2...............
0x0030: 0000 0000 0000 0016 3a00 0502 0000 0100 ........:.......
0x0040: 8f00 faa9 0000 0001 0400 0000 ff02 0000 ................
0x0050: 0000 0000 0000 0001 ff00 0000 ............
11:40:49.115235 AF Unknown (858996850), length 192:
0x0000: 7240 3333 0000 0016 30b5 c2dd 81cc 86dd r@33....0.......
0x0010: 6000 0000 0088 0001 fe80 0000 0000 0000 `...............
0x0020: 32b5 c2ff fedd 81cc ff02 0000 0000 0000 2...............
0x0030: 0000 0000 0000 0016 3a00 0502 0000 0100 ........:.......
0x0040: 8f00 6a77 0000 0006 0400 0000 ff02 0000 ..jw............
0x0050: 0000 0000 0000 0001 ff00 0000 0400 0000 ................
0x0060: ff02 0000 0000 0000 0000 0001 ffdd 81cc ................
0x0070: 0400 0000 ff05 0000 0000 0000 0000 0000 ................
0x0080: 0001 0003 0400 0000 ff02 0000 0000 0000 ................
0x0090: 0000 0000 0001 0002 0400 0000 ff02 0000 ................
0x00a0: 0000 0000 0000 0001 ff00 0001 0400 0000 ................
0x00b0: ff02 0000 0000 0000 0000 0000 0000 0002 ................
11:41:04.321386 AF Unknown (858996850), length 176:
0x0000: 7240 3333 0000 0001 30b5 c2dd 81cc 86dd r@33....0.......
0x0010: 6005 a8b4 0078 3aff fe80 0000 0000 0000 `....x:.........
0x0020: 32b5 c2ff fedd 81cc ff02 0000 0000 0000 2...............
0x0030: 0000 0000 0000 0001 8600 bdb7 40c0 0000 ............@...
0x0040: 0000 0000 0000 0000 0101 30b5 c2dd 81cc ..........0.....
0x0050: 0501 0000 0000 05dc 0304 40c0 ffff ffff ..........@.....
0x0060: ffff ffff 0000 0000 fd16 7dc7 1126 0000 ..........}..&..
0x0070: 0000 0000 0000 0000 1803 3000 0000 0708 ..........0.....
0x0080: fd16 7dc7 1126 0000 0000 0000 0000 0000 ..}..&..........
0x0090: 1903 0000 0000 0708 fd16 7dc7 1126 0000 ..........}..&..
0x00a0: 0000 0000 0000 0001 0701 0000 0009 27c0 ..............'.
11:41:20.323586 AF Unknown (858996850), length 176:
0x0000: 7240 3333 0000 0001 30b5 c2dd 81cc 86dd r@33....0.......
0x0010: 6005 a8b4 0078 3aff fe80 0000 0000 0000 `....x:.........
0x0020: 32b5 c2ff fedd 81cc ff02 0000 0000 0000 2...............
0x0030: 0000 0000 0000 0001 8600 bdb7 40c0 0000 ............@...
0x0040: 0000 0000 0000 0000 0101 30b5 c2dd 81cc ..........0.....
0x0050: 0501 0000 0000 05dc 0304 40c0 ffff ffff ..........@.....
0x0060: ffff ffff 0000 0000 fd16 7dc7 1126 0000 ..........}..&..
0x0070: 0000 0000 0000 0000 1803 3000 0000 0708 ..........0.....
0x0080: fd16 7dc7 1126 0000 0000 0000 0000 0000 ..}..&..........
0x0090: 1903 0000 0000 0708 fd16 7dc7 1126 0000 ..........}..&..
0x00a0: 0000 0000 0000 0001 0701 0000 0009 27c0 ..............'.
[ 252.501877] ar9331_switch mdio.0:10 lan1: Link is Down
[ 252.507289] br-lan: port 1(lan1) entered disabled state
output of ip -a
root@OpenWrt:/# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 30:b5:c2:dd:81:cc brd ff:ff:ff:ff:ff:ff
inet6 fe80::32b5:c2ff:fedd:81cc/64 scope link
valid_lft forever preferred_lft forever
3: lan4@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN group default qlen 1000
link/ether 30:b5:c2:dd:81:cc brd ff:ff:ff:ff:ff:ff
4: lan1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP group default qlen 1000
link/ether 30:b5:c2:dd:81:cc brd ff:ff:ff:ff:ff:ff
5: lan2@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN group default qlen 1000
link/ether 30:b5:c2:dd:81:cc brd ff:ff:ff:ff:ff:ff
6: lan3@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN group default qlen 1000
link/ether 30:b5:c2:dd:81:cc brd ff:ff:ff:ff:ff:ff
7: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 30:b5:c2:dd:81:c9 brd ff:ff:ff:ff:ff:ff
8: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0
9: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 30:b5:c2:dd:81:cc brd ff:ff:ff:ff:ff:ff
10: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 30:b5:c2:dd:81:cc brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
valid_lft forever preferred_lft forever
inet6 fd5c:3091:e169::1/60 scope global noprefixroute
valid_lft forever preferred_lft forever
inet6 fe80::32b5:c2ff:fedd:81cc/64 scope link
valid_lft forever preferred_lft forever
And now, the questions:
- Has anyone here attempted bringing up that driver?
- I suspect that either parsing Atheros header is broken, or the PHY-to-MAC mapping in device tree (see ar934x.dtsi is borked)? Ideas on how to diagnose that?
- Any tips, how to trace down what causes TX timeouts on GMAC0?
My sources are here, on top of AR83x7 DSA PoC by @Ansuel: https://github.com/Leo-PL/openwrt/commits/ath79-builtin-switch-dsa-poc