bmips: huawei,hg556a-b: enable external switch
Until now, only SoCs with bcm6368-enetsw driver could enable the external switches. This enables external BCM5325E switch on Huawei HG556a (BCM6358).
However, there's still work to do to get this working, but that's what this Pull Request is for :).
Ping @ffainelli @KanjiMonster
I need some help here, because I get some errors while trying to expose the external BCM5325 on the Huawei HG556a...
Here's the log:
[ 0.000000] Linux version 5.15.104 (noltari@atlantis) (mips-openwrt-linux-musl-gcc (OpenWrt GCC 12.2.0 r22187+1-19817fa3f5) 12.2.0, GNU ld (GNU Binutils) 2.40.0) #0 SMP Wed Mar 29 16:22:35 2023
[ 0.000000] CPU0 revision is: 0002a010 (Broadcom BMIPS4350)
[ 0.000000] MIPS: machine is Huawei EchoLife HG556a (version B)
[ 0.000000] 64MB of RAM installed
[ 0.000000] earlycon: bcm63xx_uart0 at MMIO 0xfffe0100 (options '115200n8')
[ 0.000000] printk: bootconsole [bcm63xx_uart0] enabled
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Reserving 0KB of memory at 4194303KB for kdump
[ 0.000000] Primary instruction cache 32kB, VIPT, 2-way, linesize 16 bytes.
[ 0.000000] Primary data cache 16kB, 2-way, VIPT, cache aliases, linesize 16 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] percpu: Embedded 11 pages/cpu s13328 r8192 d23536 u45056
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 16240
[ 0.000000] Kernel command line: earlycon
[ 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] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 42008K/65536K available (6657K kernel code, 617K rwdata, 1360K rodata, 13948K init, 213K bss, 23528K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
[ 0.000000] Tracing variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 256
[ 0.000000] irq_bcm6345_l1: registered BCM6345 L1 intc (IRQs: 32)
[ 0.000000] irq_bcm6345_l1: CPU0 (irq = 2)
[ 0.000000] brcm,bcm6358 detected @ 300 MHz
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 12741736309 ns
[ 0.000003] sched_clock: 32 bits at 150MHz, resolution 6ns, wraps every 14316557820ns
[ 0.008405] Calibrating delay loop... 298.59 BogoMIPS (lpj=1492992)
[ 0.084886] pid_max: default: 32768 minimum: 301
[ 0.090389] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.097976] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.117603] rcu: Hierarchical SRCU implementation.
[ 0.124017] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[ 0.132845] smp: Bringing up secondary CPUs ...
[ 0.137488] smp: Brought up 1 node, 1 CPU
[ 0.152315] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.162563] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[ 0.169908] pinctrl core: initialized pinctrl subsystem
[ 0.179055] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.257436] clocksource: Switched to clocksource MIPS
[ 0.267021] NET: Registered PF_INET protocol family
[ 0.273008] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.282798] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[ 0.291682] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.299789] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.307848] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[ 0.315222] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.322469] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.329493] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.337798] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.343721] PCI: CLS 0 bytes, default 16
[ 0.448351] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[ 0.469964] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.475983] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.549097] fffe0100.serial: ttyS0 at MMIO 0xfffe0100 (irq = 8, base_baud = 1562500) is a bcm63xx_uart
[ 0.558913] printk: console [ttyS0] enabled
[ 0.558913] printk: console [ttyS0] enabled
[ 0.567580] printk: bootconsole [bcm63xx_uart0] disabled
[ 0.567580] printk: bootconsole [bcm63xx_uart0] disabled
[ 0.648904] physmap-flash 1e000000.nor: physmap platform flash device: [mem 0x1e000000-0x1fffffff]
[ 0.658556] 1e000000.nor: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000001 Chip ID 0x002101
[ 0.669061] Amd/Fujitsu Extended Query Table at 0x0040
[ 0.674345] Amd/Fujitsu Extended Query version 1.3.
[ 0.679608] number of CFI chips: 1
[ 1.465925] 4 fixed-partitions partitions found on MTD device 1e000000.nor
[ 1.475379] Creating 4 MTD partitions on "1e000000.nor":
[ 1.480997] 0x000000000000-0x000000020000 : "cfe"
[ 1.499132] 0x000000020000-0x000000ee0000 : "firmware"
[ 1.508881] mtdsplit_bcm63xx: CFE image tag found at 0x0 with version 8, board type HW556
[ 1.517320] 2 bcm63xx-fw partitions found on MTD device firmware
[ 1.523695] Creating 2 MTD partitions on "firmware":
[ 1.528922] 0x000000000100-0x000000120000 : "kernel"
[ 1.534009] mtd: partition "kernel" doesn't start on an erase/write block boundary -- force read-only
[ 1.553739] 0x000000120000-0x000000ec0000 : "rootfs"
[ 1.562710] mtd: setting mtd3 (rootfs) as root device
[ 1.568149] 1 squashfs-split partitions found on MTD device rootfs
[ 1.574523] 0x000000340000-0x000000ec0000 : "rootfs_data"
[ 1.591452] 0x000000ee0000-0x000000fe0000 : "cal_data"
[ 1.601008] 0x000000fe0000-0x000001000000 : "nvram"
[ 1.727442] bcm6348-iudma fffe5000.dma: bcm6348-iudma @ 0xfffe5000
[ 1.734497] bcm6348-emac fffe4800.ethernet: mtd mac 5c:4c:a9:6e:4a:a2
[ 1.744686] bcm53xx fffe4800.ethernet-mii:1e: found switch: BCM5325, rev 0
[ 1.752050] bcm53xx fffe4800.ethernet-mii:1e: failed to register switch: -517
[ 1.759621] bcm6348-emac fffe4800.ethernet: MDIO bus init
[ 1.821610] bcm6348-emac fffe4800.ethernet: eth0 at 0xfffe4800, IRQ 11
[ 1.832866] bcm7038-wdt fffe005c.watchdog: Registered BCM7038 Watchdog
[ 1.849800] NET: Registered PF_INET6 protocol family
[ 1.918506] Segment Routing with IPv6
[ 1.922516] In-situ OAM (IOAM) with IPv6
[ 1.926808] NET: Registered PF_PACKET protocol family
[ 1.933773] 8021q: 802.1Q VLAN Support v1.8
[ 1.940157] ath9k-fixup 30000000.ath9k-fixup: mtd mac 5c:4c:a9:6e:4a:a3
[ 1.958538] bcm53xx fffe4800.ethernet-mii:1e: found switch: BCM5325, rev 0
[ 2.088953] bcm53xx fffe4800.ethernet-mii:1e: b53_disable_port: port=0
[ 2.095975] bcm53xx fffe4800.ethernet-mii:1e: b53_disable_port: port=1
[ 2.103089] bcm53xx fffe4800.ethernet-mii:1e: b53_disable_port: port=2
[ 2.110177] bcm53xx fffe4800.ethernet-mii:1e: b53_disable_port: port=3
[ 2.117170] bcm53xx fffe4800.ethernet-mii:1e: b53_disable_port: port=4
[ 2.318438] bcm53xx fffe4800.ethernet-mii:1e: Using legacy PHYLIB callbacks. Please migrate to PHYLINK!
[ 2.378938] bcm53xx fffe4800.ethernet-mii:1e lan1 (uninitialized): PHY [dsa-0.0:00] driver [Generic PHY] (irq=POLL)
[ 2.393475] bcm53xx fffe4800.ethernet-mii:1e lan2 (uninitialized): PHY [dsa-0.0:01] driver [Generic PHY] (irq=POLL)
[ 2.408205] bcm53xx fffe4800.ethernet-mii:1e lan3 (uninitialized): PHY [dsa-0.0:02] driver [Generic PHY] (irq=POLL)
[ 2.422807] bcm53xx fffe4800.ethernet-mii:1e lan4 (uninitialized): PHY [dsa-0.0:03] driver [Generic PHY] (irq=POLL)
[ 2.437159] bcm53xx fffe4800.ethernet-mii:1e: b53_disable_port: port=4
[ 2.444312] DSA: tree 0 setup
[ 2.507576] registering PCI controller with io_map_base unset
[ 2.514104] PCI host bridge to bus 0000:00
[ 2.518463] pci_bus 0000:00: root bus resource [mem 0x30000000-0x37ffffff]
[ 2.525548] pci_bus 0000:00: root bus resource [io 0x8000000-0x800ffff]
[ 2.532552] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[ 2.541080] pci 0000:00:01.0: [168c:ff1d] type 00 class 0x020000
[ 2.549416] pci 0000:00:01.0: reg 0x10: [mem 0x00000000-0x0000ffff]
[ 2.565729] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[ 2.572714] pci 0000:00:01.0: BAR 0: assigned [mem 0x30000000-0x3000ffff]
[ 2.580312] pci 0000:00:01.0: fixup device configuration
[ 2.607889] pci 0000:00:01.0: ath9k_pci_fixup+0x0/0x30c took 26914 usecs
[ 2.814949] Freeing unused kernel image (initmem) memory: 13948K
[ 2.821252] This architecture does not have kernel memory protection.
[ 2.827955] Run /init as init process
[ 4.749626] init: Console is alive
[ 4.754198] init: - watchdog -
[ 4.806349] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[ 4.866585] usbcore: registered new interface driver usbfs
[ 4.872682] usbcore: registered new interface driver hub
[ 4.878577] usbcore: registered new device driver usb
[ 4.916022] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 4.929169] fsl-ehci: Freescale EHCI Host controller driver
[ 4.942164] ehci-platform: EHCI generic platform driver
[ 4.987508] ehci-platform fffe1300.usb: EHCI Host Controller
[ 4.993486] ehci-platform fffe1300.usb: new USB bus registered, assigned bus number 1
[ 5.002332] ehci-platform fffe1300.usb: irq 10, io mem 0xfffe1300
[ 5.037543] ehci-platform fffe1300.usb: USB 2.0 started, EHCI 1.00, overcurrent ignored
[ 5.049349] hub 1-0:1.0: USB hub found
[ 5.056586] hub 1-0:1.0: 2 ports detected
[ 5.090937] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 5.101562] ohci-platform: OHCI generic platform driver
[ 5.108124] ohci-platform fffe1400.usb: Generic Platform OHCI controller
[ 5.115171] ohci-platform fffe1400.usb: new USB bus registered, assigned bus number 2
[ 5.123792] ohci-platform fffe1400.usb: irq 9, io mem 0xfffe1400
[ 5.205348] hub 2-0:1.0: USB hub found
[ 5.212730] hub 2-0:1.0: 2 ports detected
[ 5.231227] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 5.250113] init: - preinit -
[ 5.347702] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 5.570794] random: procd: uninitialized urandom read (4 bytes read)
[ 5.579301] hub 1-1:1.0: USB hub found
[ 5.584032] hub 1-1:1.0: 2 ports detected
[ 6.135216] random: jshn: uninitialized urandom read (4 bytes read)
[ 6.270133] random: jshn: uninitialized urandom read (4 bytes read)
[ 6.675351] random: jshn: uninitialized urandom read (4 bytes read)
[ 6.873572] bcm53xx fffe4800.ethernet-mii:1e: b53_enable_port: port=0
[ 6.880727] bcm6348-emac fffe4800.ethernet: eth0: phy link UP mii/100Mbps/Full/off
[ 6.889783] ------------[ cut here ]------------
[ 6.894519] WARNING: CPU: 0 PID: 334 at drivers/net/dsa/b53/b53_mdio.c:73 b53_mdio_op+0xd0/0x128
[ 6.903731] Modules linked in: ohci_platform ohci_hcd fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd gpio_button_hotplug usbcore nls_base usb_common crc32c_generic
[ 6.918971] CPU: 0 PID: 334 Comm: ip Not tainted 5.15.104 #0
[ 6.924786] Stack : 00000000 8009204c 00000000 00000004 00000000 00000000 830b5ae4 81620000
[ 6.933446] 80800000 807326e8 81aeb608 807fb0a3 00000000 10008700 830b5a90 818512c0
[ 6.942101] 00000000 00000000 807326e8 830b5930 00000000 00000000 ffffefff ffffffea
[ 6.950748] 000000aa 830b593c 000000aa 80801ea0 10008701 807326e8 00000000 80463808
[ 6.959403] 00000009 00000032 81bd7b0c 00000005 000007f8 00000000 00000000 81620000
[ 6.968049] ...
[ 6.970559] Call Trace:
[ 6.973066] [<80018b98>] show_stack+0x28/0xf0
[ 6.977565] [<8036b7f8>] dump_stack_lvl+0x5c/0x7c
[ 6.982408] [<8003bb04>] __warn+0x9c/0x124
[ 6.986618] [<8003bbe8>] warn_slowpath_fmt+0x5c/0xac
[ 6.991726] [<80463808>] b53_mdio_op+0xd0/0x128
[ 6.996384] [<80463cd8>] b53_mdio_read16+0x24/0x5c
[ 7.001313] [<8045dec4>] b53_port_set_ucast_flood+0x54/0xcc
[ 7.007056] [<8045ee04>] b53_enable_port+0x124/0x260
[ 7.012163] [<806790e0>] dsa_port_enable_rt+0x34/0xb4
[ 7.017359] [<8067b450>] dsa_slave_open+0xb4/0x1e0
[ 7.022288] [<804c3d38>] __dev_open+0x120/0x1d4
[ 7.026957] [<804c421c>] __dev_change_flags+0x1b0/0x224
[ 7.032333] [<804c42b8>] dev_change_flags+0x28/0x70
[ 7.037349] [<805a2cc4>] devinet_ioctl+0x6f0/0x8dc
[ 7.042279] [<805a648c>] inet_ioctl+0x19c/0x210
[ 7.046938] [<80490adc>] sock_ioctl+0x19c/0x478
[ 7.051596] [<801e6d38>] sys_ioctl+0x470/0xa68
[ 7.056166] [<8002215c>] syscall_common+0x34/0x58
[ 7.061010]
[ 7.062667] ---[ end trace fb530ff0cd0f34f6 ]---
[ 7.068636] ------------[ cut here ]------------
[ 7.073361] WARNING: CPU: 0 PID: 334 at drivers/net/dsa/b53/b53_mdio.c:73 b53_mdio_op+0xd0/0x128
[ 7.082527] Modules linked in: ohci_platform ohci_hcd fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd gpio_button_hotplug usbcore nls_base usb_common crc32c_generic
[ 7.097748] CPU: 0 PID: 334 Comm: ip Tainted: G W 5.15.104 #0
[ 7.104999] Stack : 00000000 8009204c 00000000 00000004 00000000 00000000 830b5b04 81620000
[ 7.113659] 80800000 807326e8 81aeb608 807fb0a3 00000000 10008700 830b5ab0 818512c0
[ 7.122313] 00000000 00000000 807326e8 830b5950 00000000 00000000 ffffefff ffffffea
[ 7.130960] 000000c9 830b595c 000000c9 80801ea0 10008701 807326e8 00000000 80463808
[ 7.139606] 00000009 00000032 81bd7b0c 00000005 0000096c 00000000 00000000 81620000
[ 7.148252] ...
[ 7.150762] Call Trace:
[ 7.153270] [<80018b98>] show_stack+0x28/0xf0
[ 7.157759] [<8036b7f8>] dump_stack_lvl+0x5c/0x7c
[ 7.162592] [<8003bb04>] __warn+0x9c/0x124
[ 7.166803] [<8003bbe8>] warn_slowpath_fmt+0x5c/0xac
[ 7.171913] [<80463808>] b53_mdio_op+0xd0/0x128
[ 7.176569] [<8045df08>] b53_port_set_ucast_flood+0x98/0xcc
[ 7.182305] [<8045ee04>] b53_enable_port+0x124/0x260
[ 7.187412] [<806790e0>] dsa_port_enable_rt+0x34/0xb4
[ 7.192608] [<8067b450>] dsa_slave_open+0xb4/0x1e0
[ 7.197536] [<804c3d38>] __dev_open+0x120/0x1d4
[ 7.202204] [<804c421c>] __dev_change_flags+0x1b0/0x224
[ 7.207581] [<804c42b8>] dev_change_flags+0x28/0x70
[ 7.212598] [<805a2cc4>] devinet_ioctl+0x6f0/0x8dc
[ 7.217527] [<805a648c>] inet_ioctl+0x19c/0x210
[ 7.222186] [<80490adc>] sock_ioctl+0x19c/0x478
[ 7.226844] [<801e6d38>] sys_ioctl+0x470/0xa68
[ 7.231416] [<8002215c>] syscall_common+0x34/0x58
[ 7.236257]
[ 7.237930] ---[ end trace fb530ff0cd0f34f7 ]---
[ 7.243709] ------------[ cut here ]------------
[ 7.248517] WARNING: CPU: 0 PID: 334 at drivers/net/dsa/b53/b53_mdio.c:73 b53_mdio_op+0xd0/0x128
[ 7.257654] Modules linked in: ohci_platform ohci_hcd fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd gpio_button_hotplug usbcore nls_base usb_common crc32c_generic
[ 7.272854] CPU: 0 PID: 334 Comm: ip Tainted: G W 5.15.104 #0
[ 7.280103] Stack : 00000000 8009204c 00000000 00000004 00000000 00000000 830b5ae4 81620000
[ 7.288764] 80800000 807326e8 81aeb608 807fb0a3 00000000 10008700 830b5a90 818512c0
[ 7.297418] 00000000 00000000 807326e8 830b5930 00000000 00000000 ffffefff ffffffea
[ 7.306065] 000000e7 830b593c 000000e7 80801ea0 10008701 807326e8 00000000 80463808
[ 7.314721] 00000009 00000034 81bd7b0c 00000005 00000ad4 00000000 00000000 81620000
[ 7.323366] ...
[ 7.325876] Call Trace:
[ 7.328384] [<80018b98>] show_stack+0x28/0xf0
[ 7.332872] [<8036b7f8>] dump_stack_lvl+0x5c/0x7c
[ 7.337708] [<8003bb04>] __warn+0x9c/0x124
[ 7.341917] [<8003bbe8>] warn_slowpath_fmt+0x5c/0xac
[ 7.347027] [<80463808>] b53_mdio_op+0xd0/0x128
[ 7.351684] [<80463cd8>] b53_mdio_read16+0x24/0x5c
[ 7.356613] [<8045eabc>] b53_port_set_mcast_flood+0x54/0x19c
[ 7.362437] [<8045ee14>] b53_enable_port+0x134/0x260
[ 7.367544] [<806790e0>] dsa_port_enable_rt+0x34/0xb4
[ 7.372740] [<8067b450>] dsa_slave_open+0xb4/0x1e0
[ 7.377668] [<804c3d38>] __dev_open+0x120/0x1d4
[ 7.382337] [<804c421c>] __dev_change_flags+0x1b0/0x224
[ 7.387713] [<804c42b8>] dev_change_flags+0x28/0x70
[ 7.392730] [<805a2cc4>] devinet_ioctl+0x6f0/0x8dc
[ 7.397660] [<805a648c>] inet_ioctl+0x19c/0x210
[ 7.402318] [<80490adc>] sock_ioctl+0x19c/0x478
[ 7.406977] [<801e6d38>] sys_ioctl+0x470/0xa68
[ 7.411547] [<8002215c>] syscall_common+0x34/0x58
[ 7.416390]
[ 7.418050] ---[ end trace fb530ff0cd0f34f8 ]---
[ 7.423851] ------------[ cut here ]------------
[ 7.428667] WARNING: CPU: 0 PID: 334 at drivers/net/dsa/b53/b53_mdio.c:73 b53_mdio_op+0xd0/0x128
[ 7.437803] Modules linked in: ohci_platform ohci_hcd fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd gpio_button_hotplug usbcore nls_base usb_common crc32c_generic
[ 7.453002] CPU: 0 PID: 334 Comm: ip Tainted: G W 5.15.104 #0
[ 7.460254] Stack : 00000000 8009204c 00000000 00000004 00000000 00000000 830b5b04 81620000
[ 7.468913] 80800000 807326e8 81aeb608 807fb0a3 00000000 10008700 830b5ab0 818512c0
[ 7.477569] 00000000 00000000 807326e8 830b5950 00000000 00000000 ffffefff ffffffea
[ 7.486215] 00000106 830b595c 00000106 80801ea0 10008701 807326e8 00000000 80463808
[ 7.494870] 00000009 00000034 81bd7b0c 00000005 00000c48 00000000 00000000 81620000
[ 7.503517] ...
[ 7.506026] Call Trace:
[ 7.508534] [<80018b98>] show_stack+0x28/0xf0
[ 7.513030] [<8036b7f8>] dump_stack_lvl+0x5c/0x7c
[ 7.517866] [<8003bb04>] __warn+0x9c/0x124
[ 7.522077] [<8003bbe8>] warn_slowpath_fmt+0x5c/0xac
[ 7.527185] [<80463808>] b53_mdio_op+0xd0/0x128
[ 7.531842] [<8045eb00>] b53_port_set_mcast_flood+0x98/0x19c
[ 7.537668] [<8045ee14>] b53_enable_port+0x134/0x260
[ 7.542775] [<806790e0>] dsa_port_enable_rt+0x34/0xb4
[ 7.547971] [<8067b450>] dsa_slave_open+0xb4/0x1e0
[ 7.552898] [<804c3d38>] __dev_open+0x120/0x1d4
[ 7.557559] [<804c421c>] __dev_change_flags+0x1b0/0x224
[ 7.562935] [<804c42b8>] dev_change_flags+0x28/0x70
[ 7.567952] [<805a2cc4>] devinet_ioctl+0x6f0/0x8dc
[ 7.572880] [<805a648c>] inet_ioctl+0x19c/0x210
[ 7.577541] [<80490adc>] sock_ioctl+0x19c/0x478
[ 7.582199] [<801e6d38>] sys_ioctl+0x470/0xa68
[ 7.586769] [<8002215c>] syscall_common+0x34/0x58
[ 7.591610]
[ 7.593295] ---[ end trace fb530ff0cd0f34f9 ]---
[ 7.599149] ------------[ cut here ]------------
[ 7.603873] WARNING: CPU: 0 PID: 334 at drivers/net/dsa/b53/b53_mdio.c:73 b53_mdio_op+0xd0/0x128
[ 7.613014] Modules linked in: ohci_platform ohci_hcd fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd gpio_button_hotplug usbcore nls_base usb_common crc32c_generic
[ 7.628217] CPU: 0 PID: 334 Comm: ip Tainted: G W 5.15.104 #0
[ 7.635466] Stack : 00000000 8009204c 00000000 00000004 00000000 00000000 830b5ae4 81620000
[ 7.644126] 80800000 807326e8 81aeb608 807fb0a3 00000000 10008700 830b5a90 818512c0
[ 7.652781] 00000000 00000000 807326e8 830b5930 00000000 00000000 ffffefff ffffffea
[ 7.661428] 00000124 830b593c 00000124 80801ea0 10008701 807326e8 00000000 80463808
[ 7.670083] 00000009 00000036 81bd7b0c 00000005 00000db0 00000000 00000000 81620000
[ 7.678729] ...
[ 7.681239] Call Trace:
[ 7.683746] [<80018b98>] show_stack+0x28/0xf0
[ 7.688235] [<8036b7f8>] dump_stack_lvl+0x5c/0x7c
[ 7.693070] [<8003bb04>] __warn+0x9c/0x124
[ 7.697281] [<8003bbe8>] warn_slowpath_fmt+0x5c/0xac
[ 7.702389] [<80463808>] b53_mdio_op+0xd0/0x128
[ 7.707047] [<80463cd8>] b53_mdio_read16+0x24/0x5c
[ 7.711975] [<8045eb2c>] b53_port_set_mcast_flood+0xc4/0x19c
[ 7.717808] [<8045ee14>] b53_enable_port+0x134/0x260
[ 7.722916] [<806790e0>] dsa_port_enable_rt+0x34/0xb4
[ 7.728111] [<8067b450>] dsa_slave_open+0xb4/0x1e0
[ 7.733040] [<804c3d38>] __dev_open+0x120/0x1d4
[ 7.737708] [<804c421c>] __dev_change_flags+0x1b0/0x224
[ 7.743085] [<804c42b8>] dev_change_flags+0x28/0x70
[ 7.748102] [<805a2cc4>] devinet_ioctl+0x6f0/0x8dc
[ 7.753031] [<805a648c>] inet_ioctl+0x19c/0x210
[ 7.757690] [<80490adc>] sock_ioctl+0x19c/0x478
[ 7.762349] [<801e6d38>] sys_ioctl+0x470/0xa68
[ 7.766918] [<8002215c>] syscall_common+0x34/0x58
[ 7.771761]
[ 7.773461] ---[ end trace fb530ff0cd0f34fa ]---
[ 7.779468] ------------[ cut here ]------------
[ 7.784203] WARNING: CPU: 0 PID: 334 at drivers/net/dsa/b53/b53_mdio.c:73 b53_mdio_op+0xd0/0x128
[ 7.793347] Modules linked in: ohci_platform ohci_hcd fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd gpio_button_hotplug usbcore nls_base usb_common crc32c_generic
[ 7.808556] CPU: 0 PID: 334 Comm: ip Tainted: G W 5.15.104 #0
[ 7.815804] Stack : 00000000 8009204c 00000000 00000004 00000000 00000000 830b5b04 81620000
[ 7.824464] 80800000 807326e8 81aeb608 807fb0a3 00000000 10008700 830b5ab0 818512c0
[ 7.833119] 00000000 00000000 807326e8 830b5950 00000000 00000000 ffffefff ffffffea
[ 7.841765] 00000143 830b595c 00000143 80801ea0 10008701 807326e8 00000000 80463808
[ 7.850411] 00000009 00000036 81bd7b0c 00000005 00000f24 00000000 00000000 81620000
[ 7.859058] ...
[ 7.861569] Call Trace:
[ 7.864076] [<80018b98>] show_stack+0x28/0xf0
[ 7.868563] [<8036b7f8>] dump_stack_lvl+0x5c/0x7c
[ 7.873400] [<8003bb04>] __warn+0x9c/0x124
[ 7.877609] [<8003bbe8>] warn_slowpath_fmt+0x5c/0xac
[ 7.882718] [<80463808>] b53_mdio_op+0xd0/0x128
[ 7.887375] [<8045eb64>] b53_port_set_mcast_flood+0xfc/0x19c
[ 7.893201] [<8045ee14>] b53_enable_port+0x134/0x260
[ 7.898308] [<806790e0>] dsa_port_enable_rt+0x34/0xb4
[ 7.903503] [<8067b450>] dsa_slave_open+0xb4/0x1e0
[ 7.908431] [<804c3d38>] __dev_open+0x120/0x1d4
[ 7.913100] [<804c421c>] __dev_change_flags+0x1b0/0x224
[ 7.918476] [<804c42b8>] dev_change_flags+0x28/0x70
[ 7.923494] [<805a2cc4>] devinet_ioctl+0x6f0/0x8dc
[ 7.928422] [<805a648c>] inet_ioctl+0x19c/0x210
[ 7.933082] [<80490adc>] sock_ioctl+0x19c/0x478
[ 7.937740] [<801e6d38>] sys_ioctl+0x470/0xa68
[ 7.942311] [<8002215c>] syscall_common+0x34/0x58
[ 7.947153]
[ 7.948846] ---[ end trace fb530ff0cd0f34fb ]---
[ 7.954639] ------------[ cut here ]------------
[ 7.959448] WARNING: CPU: 0 PID: 334 at drivers/net/dsa/b53/b53_mdio.c:73 b53_mdio_op+0xd0/0x128
[ 7.968585] Modules linked in: ohci_platform ohci_hcd fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd gpio_button_hotplug usbcore nls_base usb_common crc32c_generic
[ 7.983784] CPU: 0 PID: 334 Comm: ip Tainted: G W 5.15.104 #0
[ 7.991036] Stack : 00000000 8009204c 00000000 00000004 00000000 00000000 830b5ae4 81620000
[ 7.999695] 80800000 807326e8 81aeb608 807fb0a3 00000000 10008700 830b5a90 818512c0
[ 8.008350] 00000000 00000000 807326e8 830b5930 00000000 00000000 ffffefff ffffffea
[ 8.016996] 00000161 830b593c 00000161 80801ea0 10008701 807326e8 00000000 80463808
[ 8.025642] 00000009 0000003c 81bd7b0c 00000005 0000108c 00000000 00000000 81620000
[ 8.034289] ...
[ 8.036799] Call Trace:
[ 8.039307] [<80018b98>] show_stack+0x28/0xf0
[ 8.043804] [<8036b7f8>] dump_stack_lvl+0x5c/0x7c
[ 8.048639] [<8003bb04>] __warn+0x9c/0x124
[ 8.052850] [<8003bbe8>] warn_slowpath_fmt+0x5c/0xac
[ 8.057958] [<80463808>] b53_mdio_op+0xd0/0x128
[ 8.062616] [<80463cd8>] b53_mdio_read16+0x24/0x5c
[ 8.067544] [<8045df90>] b53_port_set_learning+0x54/0xcc
[ 8.073009] [<8045ee24>] b53_enable_port+0x144/0x260
[ 8.078117] [<806790e0>] dsa_port_enable_rt+0x34/0xb4
[ 8.083312] [<8067b450>] dsa_slave_open+0xb4/0x1e0
[ 8.088241] [<804c3d38>] __dev_open+0x120/0x1d4
[ 8.092909] [<804c421c>] __dev_change_flags+0x1b0/0x224
[ 8.098286] [<804c42b8>] dev_change_flags+0x28/0x70
[ 8.103302] [<805a2cc4>] devinet_ioctl+0x6f0/0x8dc
[ 8.108232] [<805a648c>] inet_ioctl+0x19c/0x210
[ 8.112892] [<80490adc>] sock_ioctl+0x19c/0x478
[ 8.117549] [<801e6d38>] sys_ioctl+0x470/0xa68
[ 8.122119] [<8002215c>] syscall_common+0x34/0x58
[ 8.126962]
[ 8.128668] ---[ end trace fb530ff0cd0f34fc ]---
[ 8.134558] ------------[ cut here ]------------
[ 8.139375] WARNING: CPU: 0 PID: 334 at drivers/net/dsa/b53/b53_mdio.c:73 b53_mdio_op+0xd0/0x128
[ 8.148511] Modules linked in: ohci_platform ohci_hcd fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd gpio_button_hotplug usbcore nls_base usb_common crc32c_generic
[ 8.163712] CPU: 0 PID: 334 Comm: ip Tainted: G W 5.15.104 #0
[ 8.170961] Stack : 00000000 8009204c 00000000 00000004 00000000 00000000 830b5b04 81620000
[ 8.179621] 80800000 807326e8 81aeb608 807fb0a3 00000000 10008700 830b5ab0 818512c0
[ 8.188276] 00000000 00000000 807326e8 830b5950 00000000 00000000 ffffefff ffffffea
[ 8.196922] 00000180 830b595c 00000180 80801ea0 10008701 807326e8 00000000 80463808
[ 8.205568] 00000009 0000003c 81bd7b0c 00000005 00001200 00000000 00000000 81620000
[ 8.214215] ...
[ 8.216724] Call Trace:
[ 8.219232] [<80018b98>] show_stack+0x28/0xf0
[ 8.223721] [<8036b7f8>] dump_stack_lvl+0x5c/0x7c
[ 8.228565] [<8003bb04>] __warn+0x9c/0x124
[ 8.232776] [<8003bbe8>] warn_slowpath_fmt+0x5c/0xac
[ 8.237883] [<80463808>] b53_mdio_op+0xd0/0x128
[ 8.242542] [<8045dfd8>] b53_port_set_learning+0x9c/0xcc
[ 8.248007] [<8045ee24>] b53_enable_port+0x144/0x260
[ 8.253113] [<806790e0>] dsa_port_enable_rt+0x34/0xb4
[ 8.258311] [<8067b450>] dsa_slave_open+0xb4/0x1e0
[ 8.263239] [<804c3d38>] __dev_open+0x120/0x1d4
[ 8.267907] [<804c421c>] __dev_change_flags+0x1b0/0x224
[ 8.273283] [<804c42b8>] dev_change_flags+0x28/0x70
[ 8.278302] [<805a2cc4>] devinet_ioctl+0x6f0/0x8dc
[ 8.283230] [<805a648c>] inet_ioctl+0x19c/0x210
[ 8.287889] [<80490adc>] sock_ioctl+0x19c/0x478
[ 8.292546] [<801e6d38>] sys_ioctl+0x470/0xa68
[ 8.297117] [<8002215c>] syscall_common+0x34/0x58
[ 8.301960]
[ 8.303615] ---[ end trace fb530ff0cd0f34fd ]---
[ 8.309479] ------------[ cut here ]------------
[ 8.314204] WARNING: CPU: 0 PID: 334 at drivers/net/dsa/b53/b53_mdio.c:73 b53_mdio_op+0xd0/0x128
[ 8.323343] Modules linked in: ohci_platform ohci_hcd fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd gpio_button_hotplug usbcore nls_base usb_common crc32c_generic
[ 8.338546] CPU: 0 PID: 334 Comm: ip Tainted: G W 5.15.104 #0
[ 8.345797] Stack : 00000000 8009204c 00000000 00000004 00000000 00000000 830b5b0c 81620000
[ 8.354457] 80800000 807326e8 81aeb608 807fb0a3 00000000 10008700 830b5ab8 818512c0
[ 8.363112] 00000000 00000000 807326e8 830b5958 00000000 00000000 ffffefff ffffffea
[ 8.371758] 0000019e 830b5964 0000019e 80801ea0 10008701 807326e8 00000000 80463808
[ 8.380405] 00000009 00000000 81bd778c 00000005 00001368 00000000 00000000 81620000
[ 8.389051] ...
[ 8.391561] Call Trace:
[ 8.394069] [<80018b98>] show_stack+0x28/0xf0
[ 8.398566] [<8036b7f8>] dump_stack_lvl+0x5c/0x7c
[ 8.403411] [<8003bb04>] __warn+0x9c/0x124
[ 8.407621] [<8003bbe8>] warn_slowpath_fmt+0x5c/0xac
[ 8.412728] [<80463808>] b53_mdio_op+0xd0/0x128
[ 8.417387] [<8045d574>] b53_write8.isra.0+0x54/0x78
[ 8.422495] [<8045ee60>] b53_enable_port+0x180/0x260
[ 8.427602] [<806790e0>] dsa_port_enable_rt+0x34/0xb4
[ 8.432798] [<8067b450>] dsa_slave_open+0xb4/0x1e0
[ 8.437726] [<804c3d38>] __dev_open+0x120/0x1d4
[ 8.442394] [<804c421c>] __dev_change_flags+0x1b0/0x224
[ 8.447770] [<804c42b8>] dev_change_flags+0x28/0x70
[ 8.452788] [<805a2cc4>] devinet_ioctl+0x6f0/0x8dc
[ 8.457716] [<805a648c>] inet_ioctl+0x19c/0x210
[ 8.462376] [<80490adc>] sock_ioctl+0x19c/0x478
[ 8.467034] [<801e6d38>] sys_ioctl+0x470/0xa68
[ 8.471605] [<8002215c>] syscall_common+0x34/0x58
[ 8.476447]
[ 8.478178] ---[ end trace fb530ff0cd0f34fe ]---
[ 8.485374] bcm53xx fffe4800.ethernet-mii:1e lan1: configuring for phy/mii link mode
[ 8.494553] 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
[ 11.054414] bcm53xx fffe4800.ethernet-mii:1e: b53_disable_port: port=0
[ 11.091706] procd: - early -
[ 11.095390] procd: - watchdog -
[ 11.908364] procd: - watchdog -
[ 11.912755] procd: - ubus -
[ 11.943223] random: ubusd: uninitialized urandom read (4 bytes read)
[ 11.968189] random: ubusd: uninitialized urandom read (4 bytes read)
[ 11.976025] random: ubusd: uninitialized urandom read (4 bytes read)
[ 11.995224] procd: - init -
Please press Enter to activate this console.
[ 13.674319] random: jshn: uninitialized urandom read (4 bytes read)
[ 13.756289] random: ubusd: uninitialized urandom read (4 bytes read)
[ 13.788190] random: ubus: uninitialized urandom read (4 bytes read)
[ 14.016618] kmodloader: loading kernel modules from /etc/modules.d/*
[ 14.457008] PPP generic driver version 2.4.2
[ 14.490199] NET: Registered PF_PPPOX protocol family
[ 14.555115] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 14.784952] urngd: v1.0.2 started.
[ 15.263083] random: crng init done
[ 15.266564] random: 21 urandom warning(s) missed due to ratelimiting
BusyBox v1.36.0 (2023-03-28 18:01:22 UTC) built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt SNAPSHOT, r0+22450-2c2e03c62f
-----------------------------------------------------
v=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/# vi /etc/config/network
root@OpenWrt:/# [ 87.181365] bcm6348-emac fffe4800.ethernet: eth0: phy link DOWN mii/100Mbps/Full/off
[ 87.319440] bcm6348-emac fffe4800.ethernet: eth0: phy link UP mii/100Mbps/Full/off
[ 87.354998] bcm53xx fffe4800.ethernet-mii:1e: b53_enable_port: port=0
[ 87.365620] bcm53xx fffe4800.ethernet-mii:1e lan1: configuring for phy/mii link mode
[ 87.467105] switch: port 1(lan1) entered blocking state
[ 87.472691] switch: port 1(lan1) entered disabled state
[ 87.483266] device lan1 entered promiscuous mode
[ 87.488157] device eth0 entered promiscuous mode
[ 87.507667] bcm53xx fffe4800.ethernet-mii:1e: port 0 failed to add f2:c6:2d:77:b1:7c vid 1 to fdb: -122
[ 87.552548] bcm53xx fffe4800.ethernet-mii:1e: port 0 failed to add 5c:4c:a9:6e:4a:a2 vid 0 to fdb: -122
[ 87.637753] bcm53xx fffe4800.ethernet-mii:1e: port 0 failed to add 5c:4c:a9:6e:4a:a2 vid 1 to fdb: -122
[ 87.707780] bcm53xx fffe4800.ethernet-mii:1e: port 0 failed to delete f2:c6:2d:77:b1:7c vid 1 from fdb: -2
[ 88.121639] bcm53xx fffe4800.ethernet-mii:1e: b53_enable_port: port=1
[ 88.132292] bcm53xx fffe4800.ethernet-mii:1e lan2: configuring for phy/mii link mode
[ 88.140836] 8021q: adding VLAN 0 to HW filter on device lan2
[ 88.258894] switch: port 2(lan2) entered blocking state
[ 88.264289] switch: port 2(lan2) entered disabled state
[ 88.273235] device lan2 entered promiscuous mode
[ 88.293081] bcm53xx fffe4800.ethernet-mii:1e: port 1 failed to add 5c:4c:a9:6e:4a:a2 vid 1 to fdb: -122
[ 88.357922] bcm53xx fffe4800.ethernet-mii:1e: port 1 failed to add 5c:4c:a9:6e:4a:a2 vid 0 to fdb: -122
[ 88.769387] bcm53xx fffe4800.ethernet-mii:1e: b53_enable_port: port=2
[ 88.780037] bcm53xx fffe4800.ethernet-mii:1e lan3: configuring for phy/mii link mode
[ 88.788544] 8021q: adding VLAN 0 to HW filter on device lan3
[ 88.884486] switch: port 3(lan3) entered blocking state
[ 88.890119] switch: port 3(lan3) entered disabled state
[ 88.940524] device lan3 entered promiscuous mode
[ 88.953522] bcm53xx fffe4800.ethernet-mii:1e: port 2 failed to add 5c:4c:a9:6e:4a:a2 vid 1 to fdb: -122
[ 88.977609] bcm53xx fffe4800.ethernet-mii:1e: port 2 failed to add 5c:4c:a9:6e:4a:a2 vid 0 to fdb: -122
[ 89.156036] bcm53xx fffe4800.ethernet-mii:1e: b53_enable_port: port=3
[ 89.166632] bcm53xx fffe4800.ethernet-mii:1e lan4: configuring for phy/mii link mode
[ 89.175171] 8021q: adding VLAN 0 to HW filter on device lan4
[ 89.299092] switch: port 4(lan4) entered blocking state
[ 89.304483] switch: port 4(lan4) entered disabled state
[ 89.376290] device lan4 entered promiscuous mode
[ 89.389532] bcm53xx fffe4800.ethernet-mii:1e: port 3 failed to add 5c:4c:a9:6e:4a:a2 vid 1 to fdb: -122
[ 89.439369] bcm53xx fffe4800.ethernet-mii:1e: port 3 failed to add 5c:4c:a9:6e:4a:a2 vid 0 to fdb: -122
[ 91.298000] bcm53xx fffe4800.ethernet-mii:1e lan4: Link is Up - 100Mbps/Full - flow control off
[ 91.307151] switch: port 4(lan4) entered blocking state
[ 91.312693] switch: port 4(lan4) entered forwarding state
[ 91.368267] IPv6: ADDRCONF(NETDEV_CHANGE): switch: link becomes ready
[ 91.428085] IPv6: ADDRCONF(NETDEV_CHANGE): switch.1: link becomes ready
For some reason, bcm53xx fffe4800.ethernet-mii:1e: b53_enable_port: port=0 generates a lot of warnings the first time that the following lines are executed:
b53_port_set_ucast_floodb53_port_set_mcast_floodb53_port_set_learningb53_write8(dev, B53_CTRL_PAGE, B53_PORT_CTRL(port), 0);https://github.com/torvalds/linux/blob/fcd476ea6a888ef6e6627f4c21a2ea8cca3e9312/drivers/net/dsa/b53/b53_common.c#L574-L576 https://github.com/torvalds/linux/blob/fcd476ea6a888ef6e6627f4c21a2ea8cca3e9312/drivers/net/dsa/b53/b53_common.c#L584 However, when network is restarted it doesn't :$
There are also warnings when b53_fdb_add is called, but that should be normal, according to (and other places returning EOPNOTSUPP if is5325()...):
https://github.com/torvalds/linux/blob/fcd476ea6a888ef6e6627f4c21a2ea8cca3e9312/drivers/net/dsa/b53/b53_common.c#L1695-L1696
And I can't get any traffic going in/out, which I can if I don't expose the switch...
Any idea on what could be happening? Maybe the switch has to be reset by GPIO? Maybe something isn't correctly configured?
Thanks in advance!
5325 switches are not really that well supported within the B53 driver, you might find some slightly useful patches in these old branches to try to bring them up to date:
https://github.com/ffainelli/linux/commits/b53-25
5325 switches are not really that well supported within the B53 driver, you might find some slightly useful patches in these old branches to try to bring them up to date:
https://github.com/ffainelli/linux/commits/b53-25
Thanks for the patches @ffainelli. I've updated them to apply on latest linux sources: https://github.com/Noltari/linux/commits/b53-bcm5325
However, I still don't get any traffic in/out, so I will try to investigate this, but I've updated the PR so that anyone can look into it :).
The new bootlog:
[ 0.000000] Linux version 5.15.104 (noltari@atlantis) (mips-openwrt-linux-musl-gcc (OpenWrt GCC 12.2.0 r22187+1-19817fa3f5) 12.2.0, GNU ld (GNU Binutils) 2.40.0) #0 SMP Thu Mar 30 17:31:54 2023
[ 0.000000] CPU0 revision is: 0002a010 (Broadcom BMIPS4350)
[ 0.000000] MIPS: machine is Huawei EchoLife HG556a (version B)
[ 0.000000] 64MB of RAM installed
[ 0.000000] earlycon: bcm63xx_uart0 at MMIO 0xfffe0100 (options '115200n8')
[ 0.000000] printk: bootconsole [bcm63xx_uart0] enabled
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Reserving 0KB of memory at 4194303KB for kdump
[ 0.000000] Primary instruction cache 32kB, VIPT, 2-way, linesize 16 bytes.
[ 0.000000] Primary data cache 16kB, 2-way, VIPT, cache aliases, linesize 16 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] percpu: Embedded 11 pages/cpu s13328 r8192 d23536 u45056
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 16240
[ 0.000000] Kernel command line: earlycon
[ 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] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 42008K/65536K available (6658K kernel code, 616K rwdata, 1360K rodata, 13948K init, 213K bss, 23528K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
[ 0.000000] Tracing variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 256
[ 0.000000] irq_bcm6345_l1: registered BCM6345 L1 intc (IRQs: 32)
[ 0.000000] irq_bcm6345_l1: CPU0 (irq = 2)
[ 0.000000] brcm,bcm6358 detected @ 300 MHz
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 12741736309 ns
[ 0.000003] sched_clock: 32 bits at 150MHz, resolution 6ns, wraps every 14316557820ns
[ 0.008406] Calibrating delay loop... 299.82 BogoMIPS (lpj=1499136)
[ 0.084937] pid_max: default: 32768 minimum: 301
[ 0.090421] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.098003] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.117577] rcu: Hierarchical SRCU implementation.
[ 0.123991] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[ 0.132818] smp: Bringing up secondary CPUs ...
[ 0.137463] smp: Brought up 1 node, 1 CPU
[ 0.152497] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.162762] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[ 0.170098] pinctrl core: initialized pinctrl subsystem
[ 0.179244] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.257302] clocksource: Switched to clocksource MIPS
[ 0.266855] NET: Registered PF_INET protocol family
[ 0.272835] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.282604] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[ 0.291485] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.299591] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.307642] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[ 0.315017] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.322274] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.329291] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.337566] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.343516] PCI: CLS 0 bytes, default 16
[ 0.448346] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[ 0.469832] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.475858] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.542894] fffe0100.serial: ttyS0 at MMIO 0xfffe0100 (irq = 8, base_baud = 1562500) is a bcm63xx_uart
[ 0.552686] printk: console [ttyS0] enabled
[ 0.552686] printk: console [ttyS0] enabled
[ 0.561349] printk: bootconsole [bcm63xx_uart0] disabled
[ 0.561349] printk: bootconsole [bcm63xx_uart0] disabled
[ 0.638653] physmap-flash 1e000000.nor: physmap platform flash device: [mem 0x1e000000-0x1fffffff]
[ 0.648287] 1e000000.nor: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000001 Chip ID 0x002101
[ 0.658796] Amd/Fujitsu Extended Query Table at 0x0040
[ 0.664077] Amd/Fujitsu Extended Query version 1.3.
[ 0.669339] number of CFI chips: 1
[ 1.467658] 4 fixed-partitions partitions found on MTD device 1e000000.nor
[ 1.476889] Creating 4 MTD partitions on "1e000000.nor":
[ 1.482597] 0x000000000000-0x000000020000 : "cfe"
[ 1.500906] 0x000000020000-0x000000ee0000 : "firmware"
[ 1.510263] mtdsplit_bcm63xx: CFE image tag found at 0x0 with version 8, board type HW556
[ 1.518984] 2 bcm63xx-fw partitions found on MTD device firmware
[ 1.525152] Creating 2 MTD partitions on "firmware":
[ 1.530377] 0x000000000100-0x000000120000 : "kernel"
[ 1.535460] mtd: partition "kernel" doesn't start on an erase/write block boundary -- force read-only
[ 1.555201] 0x000000120000-0x000000ec0000 : "rootfs"
[ 1.564139] mtd: setting mtd3 (rootfs) as root device
[ 1.569593] 1 squashfs-split partitions found on MTD device rootfs
[ 1.575963] 0x000000340000-0x000000ec0000 : "rootfs_data"
[ 1.592848] 0x000000ee0000-0x000000fe0000 : "cal_data"
[ 1.602245] 0x000000fe0000-0x000001000000 : "nvram"
[ 1.727290] bcm6348-iudma fffe5000.dma: bcm6348-iudma @ 0xfffe5000
[ 1.734343] bcm6348-emac fffe4800.ethernet: mtd mac 5c:4c:a9:6e:4a:a2
[ 1.744494] bcm53xx fffe4800.ethernet-mii:1e: found switch: BCM5325, rev 0
[ 1.751851] bcm53xx fffe4800.ethernet-mii:1e: failed to register switch: -517
[ 1.759419] bcm6348-emac fffe4800.ethernet: MDIO bus init
[ 1.820968] bcm6348-emac fffe4800.ethernet: eth0 at 0xfffe4800, IRQ 11
[ 1.832146] bcm7038-wdt fffe005c.watchdog: Registered BCM7038 Watchdog
[ 1.849154] NET: Registered PF_INET6 protocol family
[ 1.917845] Segment Routing with IPv6
[ 1.921850] In-situ OAM (IOAM) with IPv6
[ 1.926150] NET: Registered PF_PACKET protocol family
[ 1.933064] 8021q: 802.1Q VLAN Support v1.8
[ 1.939446] ath9k-fixup 30000000.ath9k-fixup: mtd mac 5c:4c:a9:6e:4a:a3
[ 1.957687] bcm53xx fffe4800.ethernet-mii:1e: found switch: BCM5325, rev 0
[ 2.285714] bcm53xx fffe4800.ethernet-mii:1e: Using legacy PHYLIB callbacks. Please migrate to PHYLINK!
[ 2.346666] bcm53xx fffe4800.ethernet-mii:1e lan1 (uninitialized): PHY [dsa-0.0:00] driver [Generic PHY] (irq=POLL)
[ 2.361305] bcm53xx fffe4800.ethernet-mii:1e lan2 (uninitialized): PHY [dsa-0.0:01] driver [Generic PHY] (irq=POLL)
[ 2.375796] bcm53xx fffe4800.ethernet-mii:1e lan3 (uninitialized): PHY [dsa-0.0:02] driver [Generic PHY] (irq=POLL)
[ 2.390587] bcm53xx fffe4800.ethernet-mii:1e lan4 (uninitialized): PHY [dsa-0.0:03] driver [Generic PHY] (irq=POLL)
[ 2.405249] DSA: tree 0 setup
[ 2.467544] registering PCI controller with io_map_base unset
[ 2.474064] PCI host bridge to bus 0000:00
[ 2.478403] pci_bus 0000:00: root bus resource [mem 0x30000000-0x37ffffff]
[ 2.485480] pci_bus 0000:00: root bus resource [io 0x8000000-0x800ffff]
[ 2.492465] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[ 2.500987] pci 0000:00:01.0: [168c:ff1d] type 00 class 0x020000
[ 2.509336] pci 0000:00:01.0: reg 0x10: [mem 0x00000000-0x0000ffff]
[ 2.525688] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[ 2.532673] pci 0000:00:01.0: BAR 0: assigned [mem 0x30000000-0x3000ffff]
[ 2.540267] pci 0000:00:01.0: fixup device configuration
[ 2.567688] pci 0000:00:01.0: ath9k_pci_fixup+0x0/0x30c took 26763 usecs
[ 2.774754] Freeing unused kernel image (initmem) memory: 13948K
[ 2.781057] This architecture does not have kernel memory protection.
[ 2.787760] Run /init as init process
[ 4.700226] init: Console is alive
[ 4.704825] init: - watchdog -
[ 4.757809] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[ 4.816280] usbcore: registered new interface driver usbfs
[ 4.822389] usbcore: registered new interface driver hub
[ 4.828315] usbcore: registered new device driver usb
[ 4.866353] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 4.879568] fsl-ehci: Freescale EHCI Host controller driver
[ 4.890663] ehci-platform: EHCI generic platform driver
[ 4.927616] ehci-platform fffe1300.usb: EHCI Host Controller
[ 4.933592] ehci-platform fffe1300.usb: new USB bus registered, assigned bus number 1
[ 4.942433] ehci-platform fffe1300.usb: irq 10, io mem 0xfffe1300
[ 4.977329] ehci-platform fffe1300.usb: USB 2.0 started, EHCI 1.00, overcurrent ignored
[ 4.989207] hub 1-0:1.0: USB hub found
[ 4.996432] hub 1-0:1.0: 2 ports detected
[ 5.031099] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 5.041692] ohci-platform: OHCI generic platform driver
[ 5.048315] ohci-platform fffe1400.usb: Generic Platform OHCI controller
[ 5.055271] ohci-platform fffe1400.usb: new USB bus registered, assigned bus number 2
[ 5.063887] ohci-platform fffe1400.usb: irq 9, io mem 0xfffe1400
[ 5.145301] hub 2-0:1.0: USB hub found
[ 5.152630] hub 2-0:1.0: 2 ports detected
[ 5.171125] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 5.190052] init: - preinit -
[ 5.287468] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 5.511487] random: procd: uninitialized urandom read (4 bytes read)
[ 5.519387] hub 1-1:1.0: USB hub found
[ 5.529658] hub 1-1:1.0: 2 ports detected
[ 6.074992] random: jshn: uninitialized urandom read (4 bytes read)
[ 6.209532] random: jshn: uninitialized urandom read (4 bytes read)
[ 6.618410] random: jshn: uninitialized urandom read (4 bytes read)
[ 6.816853] bcm6348-emac fffe4800.ethernet: eth0: phy link UP mii/100Mbps/Full/off
[ 6.825794] ------------[ cut here ]------------
[ 6.830707] WARNING: CPU: 0 PID: 333 at drivers/net/dsa/b53/b53_mdio.c:73 b53_mdio_op+0xd0/0x128
[ 6.839876] Modules linked in: ohci_platform ohci_hcd fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd gpio_button_hotplug usbcore nls_base usb_common crc32c_generic
[ 6.855047] CPU: 0 PID: 333 Comm: ip Not tainted 5.15.104 #0
[ 6.860856] Stack : 00000000 8009204c 00000000 00000004 00000000 00000000 830afb14 81620000
[ 6.869516] 80800000 807326b0 81ae8a48 807fb0a3 00000000 10008700 830afac0 818512c0
[ 6.878170] 00000000 00000000 807326b0 830af960 00000000 00000000 ffffefff ffffffea
[ 6.886817] 000000a3 830af96c 000000a3 80801ea0 10008701 807326b0 00000000 80463adc
[ 6.895463] 00000009 00000032 81bd4a0c 00000005 000007a4 00000000 00000000 81620000
[ 6.904110] ...
[ 6.906619] Call Trace:
[ 6.909128] [<80018b98>] show_stack+0x28/0xf0
[ 6.913624] [<8036b7e8>] dump_stack_lvl+0x5c/0x7c
[ 6.918469] [<8003bb04>] __warn+0x9c/0x124
[ 6.922680] [<8003bbe8>] warn_slowpath_fmt+0x5c/0xac
[ 6.927787] [<80463adc>] b53_mdio_op+0xd0/0x128
[ 6.932445] [<80463fac>] b53_mdio_read16+0x24/0x5c
[ 6.937373] [<80461470>] b53_enable_port+0xf8/0x2d4
[ 6.942400] [<806793b4>] dsa_port_enable_rt+0x34/0xb4
[ 6.947595] [<8067b724>] dsa_slave_open+0xb4/0x1e0
[ 6.952524] [<804c400c>] __dev_open+0x120/0x1d4
[ 6.957192] [<804c44f0>] __dev_change_flags+0x1b0/0x224
[ 6.962568] [<804c458c>] dev_change_flags+0x28/0x70
[ 6.967586] [<805a2f98>] devinet_ioctl+0x6f0/0x8dc
[ 6.972515] [<805a6760>] inet_ioctl+0x19c/0x210
[ 6.977174] [<80490db0>] sock_ioctl+0x19c/0x478
[ 6.981832] [<801e6d28>] sys_ioctl+0x470/0xa68
[ 6.986403] [<8002215c>] syscall_common+0x34/0x58
[ 6.991245]
[ 6.992884] ---[ end trace b029a90375582e62 ]---
[ 6.999048] ------------[ cut here ]------------
[ 7.003778] WARNING: CPU: 0 PID: 333 at drivers/net/dsa/b53/b53_mdio.c:73 b53_mdio_op+0xd0/0x128
[ 7.012972] Modules linked in: ohci_platform ohci_hcd fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd gpio_button_hotplug usbcore nls_base usb_common crc32c_generic
[ 7.028196] CPU: 0 PID: 333 Comm: ip Tainted: G W 5.15.104 #0
[ 7.035441] Stack : 00000000 8009204c 00000000 00000004 00000000 00000000 830afb34 81620000
[ 7.044101] 80800000 807326b0 81ae8a48 807fb0a3 00000000 10008700 830afae0 818512c0
[ 7.052756] 00000000 00000000 807326b0 830af980 00000000 00000000 ffffefff ffffffea
[ 7.061403] 000000c1 830af98c 000000c1 80801ea0 10008701 807326b0 00000000 80463adc
[ 7.070058] 00000009 00000032 81bd4a0c 00000005 0000090c 00000000 00000000 81620000
[ 7.078704] ...
[ 7.081215] Call Trace:
[ 7.083723] [<80018b98>] show_stack+0x28/0xf0
[ 7.088219] [<8036b7e8>] dump_stack_lvl+0x5c/0x7c
[ 7.093053] [<8003bb04>] __warn+0x9c/0x124
[ 7.097265] [<8003bbe8>] warn_slowpath_fmt+0x5c/0xac
[ 7.102372] [<80463adc>] b53_mdio_op+0xd0/0x128
[ 7.107030] [<804614b4>] b53_enable_port+0x13c/0x2d4
[ 7.112138] [<806793b4>] dsa_port_enable_rt+0x34/0xb4
[ 7.117334] [<8067b724>] dsa_slave_open+0xb4/0x1e0
[ 7.122263] [<804c400c>] __dev_open+0x120/0x1d4
[ 7.126931] [<804c44f0>] __dev_change_flags+0x1b0/0x224
[ 7.132307] [<804c458c>] dev_change_flags+0x28/0x70
[ 7.137323] [<805a2f98>] devinet_ioctl+0x6f0/0x8dc
[ 7.142253] [<805a6760>] inet_ioctl+0x19c/0x210
[ 7.146913] [<80490db0>] sock_ioctl+0x19c/0x478
[ 7.151570] [<801e6d28>] sys_ioctl+0x470/0xa68
[ 7.156140] [<8002215c>] syscall_common+0x34/0x58
[ 7.160984]
[ 7.162654] ---[ end trace b029a90375582e63 ]---
[ 7.168519] ------------[ cut here ]------------
[ 7.173247] WARNING: CPU: 0 PID: 333 at drivers/net/dsa/b53/b53_mdio.c:73 b53_mdio_op+0xd0/0x128
[ 7.182411] Modules linked in: ohci_platform ohci_hcd fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd gpio_button_hotplug usbcore nls_base usb_common crc32c_generic
[ 7.197623] CPU: 0 PID: 333 Comm: ip Tainted: G W 5.15.104 #0
[ 7.204875] Stack : 00000000 8009204c 00000000 00000004 00000000 00000000 830afae4 81620000
[ 7.213534] 80800000 807326b0 81ae8a48 807fb0a3 00000000 10008700 830afa90 818512c0
[ 7.222190] 00000000 00000000 807326b0 830af930 00000000 00000000 ffffefff ffffffea
[ 7.230835] 000000de 830af93c 000000de 80801ea0 10008701 807326b0 00000000 80463adc
[ 7.239483] 00000009 00000034 81bd4a0c 00000005 00000a68 00000000 00000000 81620000
[ 7.248129] ...
[ 7.250639] Call Trace:
[ 7.253147] [<80018b98>] show_stack+0x28/0xf0
[ 7.257635] [<8036b7e8>] dump_stack_lvl+0x5c/0x7c
[ 7.262470] [<8003bb04>] __warn+0x9c/0x124
[ 7.266680] [<8003bbe8>] warn_slowpath_fmt+0x5c/0xac
[ 7.271788] [<80463adc>] b53_mdio_op+0xd0/0x128
[ 7.276447] [<80463fac>] b53_mdio_read16+0x24/0x5c
[ 7.281375] [<8045eac8>] b53_port_set_mcast_flood+0x54/0x19c
[ 7.287198] [<804614cc>] b53_enable_port+0x154/0x2d4
[ 7.292305] [<806793b4>] dsa_port_enable_rt+0x34/0xb4
[ 7.297501] [<8067b724>] dsa_slave_open+0xb4/0x1e0
[ 7.302429] [<804c400c>] __dev_open+0x120/0x1d4
[ 7.307090] [<804c44f0>] __dev_change_flags+0x1b0/0x224
[ 7.312466] [<804c458c>] dev_change_flags+0x28/0x70
[ 7.317483] [<805a2f98>] devinet_ioctl+0x6f0/0x8dc
[ 7.322412] [<805a6760>] inet_ioctl+0x19c/0x210
[ 7.327072] [<80490db0>] sock_ioctl+0x19c/0x478
[ 7.331729] [<801e6d28>] sys_ioctl+0x470/0xa68
[ 7.336300] [<8002215c>] syscall_common+0x34/0x58
[ 7.341143]
[ 7.342801] ---[ end trace b029a90375582e64 ]---
[ 7.348656] ------------[ cut here ]------------
[ 7.353378] WARNING: CPU: 0 PID: 333 at drivers/net/dsa/b53/b53_mdio.c:73 b53_mdio_op+0xd0/0x128
[ 7.362514] Modules linked in: ohci_platform ohci_hcd fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd gpio_button_hotplug usbcore nls_base usb_common crc32c_generic
[ 7.377719] CPU: 0 PID: 333 Comm: ip Tainted: G W 5.15.104 #0
[ 7.384970] Stack : 00000000 8009204c 00000000 00000004 00000000 00000000 830afb04 81620000
[ 7.393631] 80800000 807326b0 81ae8a48 807fb0a3 00000000 10008700 830afab0 818512c0
[ 7.402285] 00000000 00000000 807326b0 830af950 00000000 00000000 ffffefff ffffffea
[ 7.410932] 000000fd 830af95c 000000fd 80801ea0 10008701 807326b0 00000000 80463adc
[ 7.419578] 00000009 00000034 81bd4a0c 00000005 00000bdc 00000000 00000000 81620000
[ 7.428225] ...
[ 7.430735] Call Trace:
[ 7.433243] [<80018b98>] show_stack+0x28/0xf0
[ 7.437739] [<8036b7e8>] dump_stack_lvl+0x5c/0x7c
[ 7.442584] [<8003bb04>] __warn+0x9c/0x124
[ 7.446794] [<8003bbe8>] warn_slowpath_fmt+0x5c/0xac
[ 7.451902] [<80463adc>] b53_mdio_op+0xd0/0x128
[ 7.456561] [<8045eb0c>] b53_port_set_mcast_flood+0x98/0x19c
[ 7.462385] [<804614cc>] b53_enable_port+0x154/0x2d4
[ 7.467492] [<806793b4>] dsa_port_enable_rt+0x34/0xb4
[ 7.472688] [<8067b724>] dsa_slave_open+0xb4/0x1e0
[ 7.477616] [<804c400c>] __dev_open+0x120/0x1d4
[ 7.482275] [<804c44f0>] __dev_change_flags+0x1b0/0x224
[ 7.487651] [<804c458c>] dev_change_flags+0x28/0x70
[ 7.492669] [<805a2f98>] devinet_ioctl+0x6f0/0x8dc
[ 7.497598] [<805a6760>] inet_ioctl+0x19c/0x210
[ 7.502257] [<80490db0>] sock_ioctl+0x19c/0x478
[ 7.506915] [<801e6d28>] sys_ioctl+0x470/0xa68
[ 7.511486] [<8002215c>] syscall_common+0x34/0x58
[ 7.516328]
[ 7.518011] ---[ end trace b029a90375582e65 ]---
[ 7.523773] ------------[ cut here ]------------
[ 7.528587] WARNING: CPU: 0 PID: 333 at drivers/net/dsa/b53/b53_mdio.c:73 b53_mdio_op+0xd0/0x128
[ 7.537721] Modules linked in: ohci_platform ohci_hcd fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd gpio_button_hotplug usbcore nls_base usb_common crc32c_generic
[ 7.552922] CPU: 0 PID: 333 Comm: ip Tainted: G W 5.15.104 #0
[ 7.560175] Stack : 00000000 8009204c 00000000 00000004 00000000 00000000 830afae4 81620000
[ 7.568834] 80800000 807326b0 81ae8a48 807fb0a3 00000000 10008700 830afa90 818512c0
[ 7.577490] 00000000 00000000 807326b0 830af930 00000000 00000000 ffffefff ffffffea
[ 7.586135] 0000011b 830af93c 0000011b 80801ea0 10008701 807326b0 00000000 80463adc
[ 7.594782] 00000009 00000036 81bd4a0c 00000005 00000d44 00000000 00000000 81620000
[ 7.603428] ...
[ 7.605939] Call Trace:
[ 7.608447] [<80018b98>] show_stack+0x28/0xf0
[ 7.612935] [<8036b7e8>] dump_stack_lvl+0x5c/0x7c
[ 7.617770] [<8003bb04>] __warn+0x9c/0x124
[ 7.621981] [<8003bbe8>] warn_slowpath_fmt+0x5c/0xac
[ 7.627088] [<80463adc>] b53_mdio_op+0xd0/0x128
[ 7.631746] [<80463fac>] b53_mdio_read16+0x24/0x5c
[ 7.636675] [<8045eb38>] b53_port_set_mcast_flood+0xc4/0x19c
[ 7.642499] [<804614cc>] b53_enable_port+0x154/0x2d4
[ 7.647606] [<806793b4>] dsa_port_enable_rt+0x34/0xb4
[ 7.652802] [<8067b724>] dsa_slave_open+0xb4/0x1e0
[ 7.657730] [<804c400c>] __dev_open+0x120/0x1d4
[ 7.662399] [<804c44f0>] __dev_change_flags+0x1b0/0x224
[ 7.667774] [<804c458c>] dev_change_flags+0x28/0x70
[ 7.672792] [<805a2f98>] devinet_ioctl+0x6f0/0x8dc
[ 7.677721] [<805a6760>] inet_ioctl+0x19c/0x210
[ 7.682379] [<80490db0>] sock_ioctl+0x19c/0x478
[ 7.687039] [<801e6d28>] sys_ioctl+0x470/0xa68
[ 7.691610] [<8002215c>] syscall_common+0x34/0x58
[ 7.696451]
[ 7.698107] ---[ end trace b029a90375582e66 ]---
[ 7.703893] ------------[ cut here ]------------
[ 7.708700] WARNING: CPU: 0 PID: 333 at drivers/net/dsa/b53/b53_mdio.c:73 b53_mdio_op+0xd0/0x128
[ 7.717834] Modules linked in: ohci_platform ohci_hcd fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd gpio_button_hotplug usbcore nls_base usb_common crc32c_generic
[ 7.733034] CPU: 0 PID: 333 Comm: ip Tainted: G W 5.15.104 #0
[ 7.740280] Stack : 00000000 8009204c 00000000 00000004 00000000 00000000 830afb04 81620000
[ 7.748939] 80800000 807326b0 81ae8a48 807fb0a3 00000000 10008700 830afab0 818512c0
[ 7.757595] 00000000 00000000 807326b0 830af950 00000000 00000000 ffffefff ffffffea
[ 7.766241] 0000013a 830af95c 0000013a 80801ea0 10008701 807326b0 00000000 80463adc
[ 7.774896] 00000009 00000036 81bd4a0c 00000005 00000eb8 00000000 00000000 81620000
[ 7.783542] ...
[ 7.786053] Call Trace:
[ 7.788561] [<80018b98>] show_stack+0x28/0xf0
[ 7.793048] [<8036b7e8>] dump_stack_lvl+0x5c/0x7c
[ 7.797883] [<8003bb04>] __warn+0x9c/0x124
[ 7.802094] [<8003bbe8>] warn_slowpath_fmt+0x5c/0xac
[ 7.807203] [<80463adc>] b53_mdio_op+0xd0/0x128
[ 7.811860] [<8045eb70>] b53_port_set_mcast_flood+0xfc/0x19c
[ 7.817685] [<804614cc>] b53_enable_port+0x154/0x2d4
[ 7.822792] [<806793b4>] dsa_port_enable_rt+0x34/0xb4
[ 7.827988] [<8067b724>] dsa_slave_open+0xb4/0x1e0
[ 7.832916] [<804c400c>] __dev_open+0x120/0x1d4
[ 7.837585] [<804c44f0>] __dev_change_flags+0x1b0/0x224
[ 7.842960] [<804c458c>] dev_change_flags+0x28/0x70
[ 7.847977] [<805a2f98>] devinet_ioctl+0x6f0/0x8dc
[ 7.852906] [<805a6760>] inet_ioctl+0x19c/0x210
[ 7.857566] [<80490db0>] sock_ioctl+0x19c/0x478
[ 7.862225] [<801e6d28>] sys_ioctl+0x470/0xa68
[ 7.866796] [<8002215c>] syscall_common+0x34/0x58
[ 7.871637]
[ 7.873326] ---[ end trace b029a90375582e67 ]---
[ 7.879169] ------------[ cut here ]------------
[ 7.883890] WARNING: CPU: 0 PID: 333 at drivers/net/dsa/b53/b53_mdio.c:73 b53_mdio_op+0xd0/0x128
[ 7.893028] Modules linked in: ohci_platform ohci_hcd fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd gpio_button_hotplug usbcore nls_base usb_common crc32c_generic
[ 7.908232] CPU: 0 PID: 333 Comm: ip Tainted: G W 5.15.104 #0
[ 7.915483] Stack : 00000000 8009204c 00000000 00000004 00000000 00000000 830afb14 81620000
[ 7.924144] 80800000 807326b0 81ae8a48 807fb0a3 00000000 10008700 830afac0 818512c0
[ 7.932799] 00000000 00000000 807326b0 830af960 00000000 00000000 ffffefff ffffffea
[ 7.941444] 00000158 830af96c 00000158 80801ea0 10008701 807326b0 00000000 80463adc
[ 7.950092] 00000009 0000003c 81bd4a0c 00000005 00001020 00000000 00000000 81620000
[ 7.958737] ...
[ 7.961247] Call Trace:
[ 7.963755] [<80018b98>] show_stack+0x28/0xf0
[ 7.968253] [<8036b7e8>] dump_stack_lvl+0x5c/0x7c
[ 7.973096] [<8003bb04>] __warn+0x9c/0x124
[ 7.977307] [<8003bbe8>] warn_slowpath_fmt+0x5c/0xac
[ 7.982414] [<80463adc>] b53_mdio_op+0xd0/0x128
[ 7.987072] [<80463fac>] b53_mdio_read16+0x24/0x5c
[ 7.992001] [<804614f0>] b53_enable_port+0x178/0x2d4
[ 7.997109] [<806793b4>] dsa_port_enable_rt+0x34/0xb4
[ 8.002304] [<8067b724>] dsa_slave_open+0xb4/0x1e0
[ 8.007233] [<804c400c>] __dev_open+0x120/0x1d4
[ 8.011901] [<804c44f0>] __dev_change_flags+0x1b0/0x224
[ 8.017276] [<804c458c>] dev_change_flags+0x28/0x70
[ 8.022295] [<805a2f98>] devinet_ioctl+0x6f0/0x8dc
[ 8.027224] [<805a6760>] inet_ioctl+0x19c/0x210
[ 8.031883] [<80490db0>] sock_ioctl+0x19c/0x478
[ 8.036540] [<801e6d28>] sys_ioctl+0x470/0xa68
[ 8.041111] [<8002215c>] syscall_common+0x34/0x58
[ 8.045954]
[ 8.047635] ---[ end trace b029a90375582e68 ]---
[ 8.053463] ------------[ cut here ]------------
[ 8.058276] WARNING: CPU: 0 PID: 333 at drivers/net/dsa/b53/b53_mdio.c:73 b53_mdio_op+0xd0/0x128
[ 8.067411] Modules linked in: ohci_platform ohci_hcd fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd gpio_button_hotplug usbcore nls_base usb_common crc32c_generic
[ 8.082620] CPU: 0 PID: 333 Comm: ip Tainted: G W 5.15.104 #0
[ 8.089872] Stack : 00000000 8009204c 00000000 00000004 00000000 00000000 830afb34 81620000
[ 8.098532] 80800000 807326b0 81ae8a48 807fb0a3 00000000 10008700 830afae0 818512c0
[ 8.107187] 00000000 00000000 807326b0 830af980 00000000 00000000 ffffefff ffffffea
[ 8.115832] 00000176 830af98c 00000176 80801ea0 10008701 807326b0 00000000 80463adc
[ 8.124480] 00000009 0000003c 81bd4a0c 00000005 00001188 00000000 00000000 81620000
[ 8.133126] ...
[ 8.135636] Call Trace:
[ 8.138144] [<80018b98>] show_stack+0x28/0xf0
[ 8.142640] [<8036b7e8>] dump_stack_lvl+0x5c/0x7c
[ 8.147484] [<8003bb04>] __warn+0x9c/0x124
[ 8.151696] [<8003bbe8>] warn_slowpath_fmt+0x5c/0xac
[ 8.156803] [<80463adc>] b53_mdio_op+0xd0/0x128
[ 8.161462] [<80461528>] b53_enable_port+0x1b0/0x2d4
[ 8.166577] [<806793b4>] dsa_port_enable_rt+0x34/0xb4
[ 8.171774] [<8067b724>] dsa_slave_open+0xb4/0x1e0
[ 8.176703] [<804c400c>] __dev_open+0x120/0x1d4
[ 8.181361] [<804c44f0>] __dev_change_flags+0x1b0/0x224
[ 8.186737] [<804c458c>] dev_change_flags+0x28/0x70
[ 8.191756] [<805a2f98>] devinet_ioctl+0x6f0/0x8dc
[ 8.196684] [<805a6760>] inet_ioctl+0x19c/0x210
[ 8.201343] [<80490db0>] sock_ioctl+0x19c/0x478
[ 8.206001] [<801e6d28>] sys_ioctl+0x470/0xa68
[ 8.210572] [<8002215c>] syscall_common+0x34/0x58
[ 8.215415]
[ 8.217086] ---[ end trace b029a90375582e69 ]---
[ 8.222984] ------------[ cut here ]------------
[ 8.227798] WARNING: CPU: 0 PID: 333 at drivers/net/dsa/b53/b53_mdio.c:73 b53_mdio_op+0xd0/0x128
[ 8.236856] Modules linked in: ohci_platform ohci_hcd fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd gpio_button_hotplug usbcore nls_base usb_common crc32c_generic
[ 8.252048] CPU: 0 PID: 333 Comm: ip Tainted: G W 5.15.104 #0
[ 8.259297] Stack : 00000000 8009204c 00000000 00000004 00000000 00000000 830afb34 81620000
[ 8.267956] 80800000 807326b0 81ae8a48 807fb0a3 00000000 10008700 830afae0 818512c0
[ 8.276612] 00000000 00000000 807326b0 830af980 00000000 00000000 ffffefff ffffffea
[ 8.285257] 00000193 830af98c 00000193 80801ea0 10008701 807326b0 00000000 80463adc
[ 8.293905] 00000009 00000000 81bd4a0c 00000005 000012e4 00000000 00000000 81620000
[ 8.302551] ...
[ 8.305061] Call Trace:
[ 8.307569] [<80018b98>] show_stack+0x28/0xf0
[ 8.312065] [<8036b7e8>] dump_stack_lvl+0x5c/0x7c
[ 8.316910] [<8003bb04>] __warn+0x9c/0x124
[ 8.321120] [<8003bbe8>] warn_slowpath_fmt+0x5c/0xac
[ 8.326228] [<80463adc>] b53_mdio_op+0xd0/0x128
[ 8.330886] [<80461578>] b53_enable_port+0x200/0x2d4
[ 8.335994] [<806793b4>] dsa_port_enable_rt+0x34/0xb4
[ 8.341190] [<8067b724>] dsa_slave_open+0xb4/0x1e0
[ 8.346118] [<804c400c>] __dev_open+0x120/0x1d4
[ 8.350787] [<804c44f0>] __dev_change_flags+0x1b0/0x224
[ 8.356162] [<804c458c>] dev_change_flags+0x28/0x70
[ 8.361180] [<805a2f98>] devinet_ioctl+0x6f0/0x8dc
[ 8.366108] [<805a6760>] inet_ioctl+0x19c/0x210
[ 8.370768] [<80490db0>] sock_ioctl+0x19c/0x478
[ 8.375427] [<801e6d28>] sys_ioctl+0x470/0xa68
[ 8.379997] [<8002215c>] syscall_common+0x34/0x58
[ 8.384840]
[ 8.386493] ---[ end trace b029a90375582e6a ]---
[ 8.393752] bcm53xx fffe4800.ethernet-mii:1e lan1: configuring for phy/mii link mode
[ 8.402779] 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
[ 10.990612] procd: - early -
[ 10.994315] procd: - watchdog -
[ 11.810770] procd: - watchdog -
[ 11.815172] procd: - ubus -
[ 11.845801] random: ubusd: uninitialized urandom read (4 bytes read)
[ 11.870440] random: ubusd: uninitialized urandom read (4 bytes read)
[ 11.878616] random: ubusd: uninitialized urandom read (4 bytes read)
[ 11.898071] procd: - init -
Please press Enter to activate this console.
[ 13.579321] random: jshn: uninitialized urandom read (4 bytes read)
[ 13.667745] random: ubusd: uninitialized urandom read (4 bytes read)
[ 13.697815] random: ubus: uninitialized urandom read (4 bytes read)
[ 13.911498] kmodloader: loading kernel modules from /etc/modules.d/*
[ 14.345858] PPP generic driver version 2.4.2
[ 14.380013] NET: Registered PF_PPPOX protocol family
[ 14.445087] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 14.700751] urngd: v1.0.2 started.
[ 15.143099] random: crng init done
[ 15.146580] random: 21 urandom warning(s) missed due to ratelimiting
BusyBox v1.36.0 (2023-03-28 18:01:22 UTC) built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt SNAPSHOT, r0+22457-f737653154
-----------------------------------------------------
v=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/# vi /etc/config/network
root@OpenWrt:/# [ 124.274204] bcm6348-emac fffe4800.ethernet: eth0: phy link DOWN mii/100Mbps/Full/off
[ 124.387977] bcm6348-emac fffe4800.ethernet: eth0: phy link UP mii/100Mbps/Full/off
[ 124.466410] bcm53xx fffe4800.ethernet-mii:1e lan1: configuring for phy/mii link mode
[ 124.538478] switch: port 1(lan1) entered blocking state
[ 124.543867] switch: port 1(lan1) entered disabled state
[ 124.554573] device lan1 entered promiscuous mode
[ 124.559466] device eth0 entered promiscuous mode
[ 124.578892] bcm53xx fffe4800.ethernet-mii:1e: port 0 failed to add 66:a4:d0:7a:cd:f0 vid 1 to fdb: -28
[ 124.649175] bcm53xx fffe4800.ethernet-mii:1e: port 0 failed to delete 66:a4:d0:7a:cd:f0 vid 1 from fdb: -2
[ 125.168086] bcm53xx fffe4800.ethernet-mii:1e lan2: configuring for phy/mii link mode
[ 125.176499] 8021q: adding VLAN 0 to HW filter on device lan2
[ 125.302834] switch: port 2(lan2) entered blocking state
[ 125.308470] switch: port 2(lan2) entered disabled state
[ 125.317385] device lan2 entered promiscuous mode
[ 125.805614] bcm53xx fffe4800.ethernet-mii:1e lan3: configuring for phy/mii link mode
[ 125.814324] 8021q: adding VLAN 0 to HW filter on device lan3
[ 125.900291] switch: port 3(lan3) entered blocking state
[ 125.905683] switch: port 3(lan3) entered disabled state
[ 125.970511] device lan3 entered promiscuous mode
[ 126.140992] bcm53xx fffe4800.ethernet-mii:1e lan4: configuring for phy/mii link mode
[ 126.149532] 8021q: adding VLAN 0 to HW filter on device lan4
[ 126.245835] switch: port 4(lan4) entered blocking state
[ 126.251417] switch: port 4(lan4) entered disabled state
[ 126.308886] device lan4 entered promiscuous mode
[ 128.257719] bcm53xx fffe4800.ethernet-mii:1e lan4: Link is Up - 100Mbps/Full - flow control off
[ 128.266838] switch: port 4(lan4) entered blocking state
[ 128.272381] switch: port 4(lan4) entered forwarding state
[ 128.318122] IPv6: ADDRCONF(NETDEV_CHANGE): switch: link becomes ready
[ 128.377667] IPv6: ADDRCONF(NETDEV_CHANGE): switch.1: link becomes ready
Best regards, Álvaro.
I did some research on the BCM5325E registers and made some progress @KanjiMonster @ffainelli.
I can now see packets going out of the HG556a if I ping another device. However, it seems that the packet is sent with the Broadcom tag ... This is the full packet:
0000 ff ff ff ff ff ff 5c 4c a9 6e 4a a2 88 74 40 00 ......\L.nJ..t@.
0010 00 01 08 06 00 01 08 00 06 04 00 01 5c 4c a9 6e ............\L.n
0020 4a a2 c0 a8 01 04 00 00 00 00 00 00 c0 a8 01 0a J...............
0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0040 00 00 00 00 00 00 00 00 ........
Broadcom Tag:
88 74 40 00 00 01
So port 1, which matches lan2 (the one I'm using)...
Any ideas on why is the tag not processed/removed by the switch?
Any ideas on why is the tag not processed/removed by the switch?
IIRC for the tag to work/be enabled B53_SWITCH_MODE must have SM_SW_FWD_MODE enabled, and B53_GLOBAL_CONFIG needs to have GC_FRM_MGMT_PORT_M set to GC_FRM_MGMT_PORT_MII. Not sure if anything else is needed. Since b53_brcm_hdr_setup() doesn't clear GC_FRM_MGMT_PORT_M before setting a value, maybe check if the bootloader set bit 6, causing it to have an invalid value when setting bit 7.
@KanjiMonster I've just checked and BIT(6) wasn't set:
[ 2.009702] bcm53xx fffe4800.ethernet-mii:1e: found switch: BCM5325, rev 0
[ 2.149232] bcm53xx fffe4800.ethernet-mii:1e: b53_brcm_hdr_setup: B53_GLOBAL_CONFIG=2
[ 2.157399] bcm53xx fffe4800.ethernet-mii:1e: b53_brcm_hdr_setup: B53_GLOBAL_CONFIG=82
@KanjiMonster @ffainelli Maybe the tag isn't processed because the Frame Octet Count (bits 26-16), the Dest Dev ID (bits 9-8) or Src Dev ID (bits 5-4) aren't filled? Is it possible that BCM5325 needs this but BCM63xx doesn't? If so, what values should be used for Dest/Src Dev IDs?
In addition to what @KanjiMonster recommended, can you check that register 00h, page 08h which follows the layout of B53_PORT_CTRL looks correct?
It seems to me like we may be missing the additional inner FCS required by the tagging format, the datasheet is explicit about the format:
MAC DA | MAC SA | 0x8874 | 4b tag | Original Type/Length | Data | Original FCS | Re-calculated FCS
the original FCS must be provided as a place holder even if the switch will ignore it.
Regarding the destination device ID, this will be set to 0 (single switch). The frame octet count should start counting the frame length at starting at the MAC DA and including the original FCS, but excluding the BRCM Ether Type, 4-bytes tag and re-calculated FCS. So basically skb->len AFAICT.
In addition to what @KanjiMonster recommended, can you check that register 00h, page 08h which follows the layout of B53_PORT_CTRL looks correct?
I will check that in the next days, but I thought that register 00h of page 08h was the Memory RW Control Register...
It seems to me like we may be missing the additional inner FCS required by the tagging format, the datasheet is explicit about the format:
MAC DA | MAC SA | 0x8874 | 4b tag | Original Type/Length | Data | Original FCS | Re-calculated FCS
the original FCS must be provided as a place holder even if the switch will ignore it.
Ok, I will check that too.
Regarding the destination device ID, this will be set to 0 (single switch). The frame octet count should start counting the frame length at starting at the MAC DA and including the original FCS, but excluding the BRCM Ether Type, 4-bytes tag and re-calculated FCS. So basically skb->len AFAICT.
Thanks!
In addition to what @KanjiMonster recommended, can you check that register 00h, page 08h which follows the layout of B53_PORT_CTRL looks correct?
Do you mean register 08h, page 00h? Page 08h seems to be "Memory Access Registers"...
It seems to me like we may be missing the additional inner FCS required by the tagging format, the datasheet is explicit about the format:
MAC DA | MAC SA | 0x8874 | 4b tag | Original Type/Length | Data | Original FCS | Re-calculated FCS
the original FCS must be provided as a place holder even if the switch will ignore it.
Regarding the destination device ID, this will be set to 0 (single switch). The frame octet count should start counting the frame length at starting at the MAC DA and including the original FCS, but excluding the BRCM Ether Type, 4-bytes tag and re-calculated FCS. So basically skb->len AFAICT.
This is what I tried with the following patch but still no luck: https://github.com/Noltari/openwrt/blob/pullRequest/bmips-hg556a-external-switch/target/linux/bmips/patches-6.6/520-dsa-brcm-legacy-fixes.patch
With the current patches the device correctly receives packets from other devices with a proper legacy tag that correctly indicates the corresponding ethernet port, but whenever the device sends a packet to other devices nothing happens, even with the patch that I mentioned before I can see nothing getting out of the device... So, RX seems to be OK but TX is KO...
BTW, sometimes I can see these "port 0 failed to add/delete mac address to/from fdb" errors, but not always...
[ 113.065094] bcm6348-emac fffe4800.ethernet: eth0: phy link DOWN mii/100Mbps/Full/off
[ 113.175699] bcm6348-emac fffe4800.ethernet: eth0: phy link UP mii/100Mbps/Full/off
[ 113.203828] bcm53xx fffe4800.ethernet-mii:1e lan1: configuring for phy/mii link mode
[ 113.261367] switch: port 1(lan1) entered blocking state
[ 113.266769] switch: port 1(lan1) entered disabled state
[ 113.272541] bcm53xx fffe4800.ethernet-mii:1e lan1: entered allmulticast mode
[ 113.280002] bcm6348-emac fffe4800.ethernet eth0: entered allmulticast mode
[ 113.295237] bcm53xx fffe4800.ethernet-mii:1e lan1: entered promiscuous mode
[ 113.309460] bcm53xx fffe4800.ethernet-mii:1e: port 0 failed to add 36:40:17:7f:bf:0d vid 1 to fdb: -28
[ 113.346370] bcm53xx fffe4800.ethernet-mii:1e: port 0 failed to delete 36:40:17:7f:bf:0d vid 1 from fdb: -2
[ 113.866263] bcm53xx fffe4800.ethernet-mii:1e lan2: configuring for phy/mii link mode
[ 113.874980] 8021q: adding VLAN 0 to HW filter on device lan2
[ 113.955451] switch: port 2(lan2) entered blocking state
[ 113.961126] switch: port 2(lan2) entered disabled state
[ 113.966584] bcm53xx fffe4800.ethernet-mii:1e lan2: entered allmulticast mode
[ 113.977975] bcm53xx fffe4800.ethernet-mii:1e lan2: entered promiscuous mode
[ 114.332706] bcm53xx fffe4800.ethernet-mii:1e lan3: configuring for phy/mii link mode
[ 114.341351] 8021q: adding VLAN 0 to HW filter on device lan3
[ 114.421526] switch: port 3(lan3) entered blocking state
[ 114.426927] switch: port 3(lan3) entered disabled state
[ 114.432756] bcm53xx fffe4800.ethernet-mii:1e lan3: entered allmulticast mode
[ 114.513403] bcm53xx fffe4800.ethernet-mii:1e lan3: entered promiscuous mode
[ 114.666445] bcm53xx fffe4800.ethernet-mii:1e lan4: configuring for phy/mii link mode
[ 114.675175] 8021q: adding VLAN 0 to HW filter on device lan4
[ 114.752471] switch: port 4(lan4) entered blocking state
[ 114.757874] switch: port 4(lan4) entered disabled state
[ 114.763650] bcm53xx fffe4800.ethernet-mii:1e lan4: entered allmulticast mode
[ 114.837733] bcm53xx fffe4800.ethernet-mii:1e lan4: entered promiscuous mode
[ 115.949875] bcm53xx fffe4800.ethernet-mii:1e lan2: Link is Up - 100Mbps/Full - flow control off
[ 115.959002] switch: port 2(lan2) entered blocking state
[ 115.964564] switch: port 2(lan2) entered forwarding state
I decided to give this another shot after @KanjiMonster fixes to b53 and RX seems to be fine:
[ 116.884490] RX tag: 88 74 20 44 00 01
[ 116.888278] skb len=60 headroom=80 headlen=60 tailroom=628
[ 116.888278] mac=(66,14) mac_len=14 net=(80,0) trans=80
[ 116.888278] shinfo(txflags=0 nr_frags=0 gso(size=0 type=0 segs=0))
[ 116.888278] csum(0x0 start=0 offset=0 ip_summed=0 complete_sw=0 valid=0 level=0)
[ 116.888278] hash(0x0 sw=0 l4=0) proto=0x00f8 pkttype=1 iif=2
[ 116.888278] priority=0x0 mark=0x0 alloc_cpu=0 vlan_all=0x0
[ 116.888278] encapsulation=0 inner(proto=0x0000, mac=0, net=0, trans=0)
[ 116.931518] dev name=eth0 feat=0x0200000000004000
[ 116.936359] skb linear: 00000000: 20 44 00 01 81 00 00 01 08 06 00 01 08 00 06 04
[ 116.944244] skb linear: 00000010: 00 01 28 ee 52 05 28 3e c0 a8 02 02 00 00 00 00
[ 116.952129] skb linear: 00000020: 00 00 c0 a8 02 01 00 00 00 00 00 00 00 00 00 00
[ 116.960012] skb linear: 00000030: 00 00 00 00 00 00 00 00 fc 5e ca 3d
However, TX is still wrong because I don't see anything leaving the device:
[ 117.407859] TX tag: 88 74 40 96 00 01
[ 117.411650] skb len=160 headroom=12 headlen=160 tailroom=1620
[ 117.411650] mac=(18,14) mac_len=0 net=(32,48) trans=80
[ 117.411650] shinfo(txflags=0 nr_frags=0 gso(size=0 type=0 segs=0))
[ 117.411650] csum(0x0 start=0 offset=0 ip_summed=0 complete_sw=0 valid=0 level=0)
[ 117.411650] hash(0x0 sw=0 l4=0) proto=0x86dd pkttype=0 iif=0
[ 117.411650] priority=0x7 mark=0x104 alloc_cpu=0 vlan_all=0x0
[ 117.411650] encapsulation=0 inner(proto=0x0000, mac=0, net=0, trans=0)
[ 117.455347] dev name=lan2 feat=0x0202000000004220
[ 117.460186] sk family=10 type=3 proto=58
[ 117.464221] skb linear: 00000000: 33 33 00 00 00 16 5c 4c a9 6e 4a a2 88 74 40 96
[ 117.472105] skb linear: 00000010: 00 01 86 dd 60 00 00 00 00 60 00 01 00 00 00 00
[ 117.479989] skb linear: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 ff 02 00 00
[ 117.487873] skb linear: 00000030: 00 00 00 00 00 00 00 00 00 00 00 16 3a 00 05 02
[ 117.495759] skb linear: 00000040: 00 00 01 00 8f 00 1b 26 00 00 00 04 04 00 00 00
[ 117.503643] skb linear: 00000050: ff 05 00 00 00 00 00 00 00 00 00 00 00 01 00 03
[ 117.511528] skb linear: 00000060: 04 00 00 00 ff 02 00 00 00 00 00 00 00 00 00 00
[ 117.519414] skb linear: 00000070: 00 01 00 02 04 00 00 00 ff 02 00 00 00 00 00 00
[ 117.527298] skb linear: 00000080: 00 00 00 01 ff 6e 4a a2 04 00 00 00 ff 02 00 00
[ 117.535183] skb linear: 00000090: 00 00 00 00 00 00 00 00 00 00 00 02 da cc cf 88
I assume I'm using an incorrect len in the tag or maybe the checksum isn't correct...
Might be, I haven't really ever tried to make bcm5325 work in b53/dsa.
Might be, I haven't really ever tried to make bcm5325 work in b53/dsa.
~~I've checked and confirmed that the TX FCS is wrong. I'm trying to figure out how to calculate the correct one but so far I haven't been able to get the expected FCS...~~
EDIT: I figured it out and it's now working!
orig_fcs = crc32(~0, skb->data, skb_len) ^ 0xFFFFFFFF;
orig_fcs = swab32(orig_fcs);
I replaced all the patches with the ones sent upstream as RFC. I think this can be merged now we can support other bcm6358 devices. As soon as the patches are accepted upstream I will remove them from bmips and backport the final accepted versions to generic/backports.