EdgeRouter-X-SFP hangs with the current snapshots

Hello,

AFAIK, nobody mentioned that the current snapshots for the ER-X-SFP make the device unusable because it hangs most of the time. I suspect that it might have something to do with the support of the MT7530, DSA and the SFP port. However, I am unable to prove where the problem stems from (given that the device hangs most of the time without displaying any issue as far as I can tell).

root@OpenWrt:~# dmesg
[    0.000000] Linux version 5.4.105 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16178-1cd098784e)) #0 SMP Sat Mar 13 16:06:42 2021
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is Ubiquiti EdgeRouter X SFP
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] VPE topology {2,2} total 4
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] On node 0 totalpages: 65536
[    0.000000]   Normal zone: 576 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 65536 pages, LIFO batch:15
[    0.000000] percpu: Embedded 14 pages/cpu s26768 r8192 d22384 u57344
[    0.000000] pcpu-alloc: s26768 r8192 d22384 u57344 alloc=14*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64960
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Writing ErrCtl register=00050900
[    0.000000] Readback ErrCtl register=00050900
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 250280K/262144K available (6057K kernel code, 209K rwdata, 1292K rodata, 1260K init, 238K bss, 11864K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] NR_IRQS: 256
[    0.000000] random: get_random_bytes called from start_kernel+0x31c/0x534 with crng_init=0
[    0.000000] CPU Clock: 880MHz
[    0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
[    0.000008] sched_clock: 32 bits at 440MHz, resolution 2ns, wraps every 4880645118ns
[    0.015493] Calibrating delay loop... 583.68 BogoMIPS (lpj=1167360)
[    0.055830] pid_max: default: 32768 minimum: 301
[    0.065185] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.079591] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.097679] rcu: Hierarchical SRCU implementation.
[    0.107780] smp: Bringing up secondary CPUs ...
[    2.695174] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    2.695184] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    2.695197] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    2.695297] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.144959] Synchronize counters for CPU 1: done.
[    2.786230] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    2.786238] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    2.786245] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    2.786305] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.239403] Synchronize counters for CPU 2: done.
[    2.877353] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    2.877360] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    2.877368] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    2.877429] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.327000] Synchronize counters for CPU 3: done.
[    0.386611] smp: Brought up 1 node, 4 CPUs
[    0.399047] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.418339] futex hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.432175] pinctrl core: initialized pinctrl subsystem
[    0.444115] NET: Registered protocol family 16
[    0.464822] FPU Affinity set after 4688 emulations
[    0.480905] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.484014] random: fast init done
[    0.506869] clocksource: Switched to clocksource GIC
[    0.518649] NET: Registered protocol family 2
[    0.528156] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.544706] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.559879] TCP bind hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.574051] TCP: Hash tables configured (established 2048 bind 2048)
[    0.586785] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.599698] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.613812] NET: Registered protocol family 1
[    0.622378] PCI: CLS 0 bytes, default 32
[    0.718815] 4 CPUs re-calibrate udelay(lpj = 1163264)
[    0.730337] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[    0.754961] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.766449] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.787667] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.803887] GPIO line 487 (sfp_i2c_clk_gate) hogged as output/high
[    0.816362] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.827670] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.838965] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.850864] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.867103] printk: console [ttyS0] disabled
[    0.875541] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 19, base_baud = 3125000) is a 16550A
[    0.893485] printk: console [ttyS0] enabled
[    0.910034] printk: bootconsole [early0] disabled
[    0.931242] mt7621-nand 1e003000.nand: Using programmed access timing: 31c07388
[    0.946053] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xda
[    0.958711] nand: Macronix MX30LF2G18AC
[    0.966353] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.981436] mt7621-nand 1e003000.nand: ECC strength adjusted to 4 bits
[    0.994471] mt7621-nand 1e003000.nand: Using programmed access timing: 21005134
[    1.009037] mt7621-nand 1e003000.nand: Using programmed access timing: 21005134
[    1.023599] Scanning device for bad blocks
[    3.629345] 6 fixed-partitions partitions found on MTD device mt7621-nand
[    3.642886] Creating 6 MTD partitions on "mt7621-nand":
[    3.653305] 0x000000000000-0x000000080000 : "u-boot"
[    3.664524] 0x000000080000-0x0000000e0000 : "u-boot-env"
[    3.676543] 0x0000000e0000-0x000000140000 : "factory"
[    3.687942] 0x000000140000-0x000000440000 : "kernel1"
[    3.699518] 0x000000440000-0x000000740000 : "kernel2"
[    3.710943] 0x000000740000-0x00000ff00000 : "ubi"
[    3.724427] libphy: Fixed MDIO Bus: probed
[    3.757270] libphy: mdio: probed
[    3.763986] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
[    3.781202] mtk_soc_eth 1e100000.ethernet dsa: mediatek frame engine at 0xbe100000, irq 20
[    3.799008] i2c-mt7621 1e000900.i2c: clock 100 kHz
[    3.812264] NET: Registered protocol family 10
[    3.822532] Segment Routing with IPv6
[    3.829973] NET: Registered protocol family 17
[    3.838913] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    3.864970] 8021q: 802.1Q VLAN Support v1.8
[    3.875324] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
[    3.899908] libphy: dsa slave smi: probed
[    3.908354] mt7530 mdio-bus:1f eth0 (uninitialized): PHY [dsa-0.0:00] driver [Generic PHY]
[    3.926321] mt7530 mdio-bus:1f eth1 (uninitialized): PHY [dsa-0.0:01] driver [Generic PHY]
[    3.944288] mt7530 mdio-bus:1f eth2 (uninitialized): PHY [dsa-0.0:02] driver [Generic PHY]
[    3.962217] mt7530 mdio-bus:1f eth3 (uninitialized): PHY [dsa-0.0:03] driver [Generic PHY]
[    3.980209] mt7530 mdio-bus:1f eth4 (uninitialized): PHY [dsa-0.0:04] driver [Generic PHY]
[    3.998173] mt7530 mdio-bus:1f eth5 (uninitialized): PHY [mdio-bus:07] driver [Atheros 8031 ethernet]
[    4.017990] mt7530 mdio-bus:1f: configuring for fixed/rgmii link mode
[    4.035658] DSA: tree 0 setup
[    4.042876] UBI: auto-attach mtd5
[    4.049507] ubi0: attaching mtd5
[    4.056288] mt7530 mdio-bus:1f: Link is Up - 1Gbps/Full - flow control off
[    6.580189] ubi0: scanning is finished
[    6.606685] ubi0: attached mtd5 (name "ubi", size 247 MiB)
[    6.617651] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    6.631346] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    6.644861] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    6.658724] ubi0: good PEBs: 1982, bad PEBs: 0, corrupted PEBs: 0
[    6.670864] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[    6.685245] ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 189582723
[    6.703264] ubi0: available PEBs: 0, total reserved PEBs: 1982, PEBs reserved for bad PEB handling: 40
[    6.721819] ubi0: background thread "ubi_bgt0d" started, PID 479
[    6.725943] block ubiblock0_0: created from ubi0:0(rootfs)
[    6.744776] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[    6.758648] hctosys: unable to open rtc device (rtc0)
[    6.774421] VFS: Mounted root (squashfs filesystem) readonly on device 259:0.
[    6.792995] Freeing unused kernel memory: 1260K
[    6.802038] This architecture does not have kernel memory protection.
[    6.814870] Run /sbin/init as init process
[    7.293386] init: Console is alive
[    7.300434] init: - watchdog -
[    7.589740] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    7.684936] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    7.703180] init: - preinit -
[    8.384139] mtk_soc_eth 1e100000.ethernet dsa: configuring for fixed/rgmii link mode
[    8.400055] mtk_soc_eth 1e100000.ethernet dsa: Link is Up - 1Gbps/Full - flow control rx/tx
[    8.416771] IPv6: ADDRCONF(NETDEV_CHANGE): dsa: link becomes ready
[    8.555548] random: jshn: uninitialized urandom read (4 bytes read)
[    8.625818] random: jshn: uninitialized urandom read (4 bytes read)
[    8.666104] random: jshn: uninitialized urandom read (4 bytes read)
[    8.955448] device dsa entered promiscuous mode
[    8.965051] mt7530 mdio-bus:1f eth1: configuring for phy/gmii link mode
[    8.978623] 8021q: adding VLAN 0 to HW filter on device eth1
[   13.095469] mt7530 mdio-bus:1f eth1: Link is Up - 1Gbps/Full - flow control rx/tx
[   13.112452] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   13.264759] UBIFS (ubi0:1): default file-system created
[   13.276847] UBIFS (ubi0:1): Mounting in unauthenticated mode
[   13.288540] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 584
[   13.378471] urandom_read: 6 callbacks suppressed
[   13.378495] random: procd: uninitialized urandom read (4 bytes read)
[   13.434417] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[   13.450035] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[   13.469790] UBIFS (ubi0:1): FS size: 242397184 bytes (231 MiB, 1909 LEBs), journal size 12189696 bytes (11 MiB, 96 LEBs)
[   13.491438] UBIFS (ubi0:1): reserved for root: 4952683 bytes (4836 KiB)
[   13.504612] UBIFS (ubi0:1): media format: w5/r0 (latest is w5/r0), UUID 2EFAF5C0-EAB3-4E39-9B09-8A2A8F7DB024, small LPT model
[   13.530289] mount_root: overlay filesystem has not been fully initialized yet
[   13.544956] mount_root: switching to ubifs overlay
[   13.561210] urandom-seed: Seed file not found (/etc/urandom.seed)
[   13.638876] mt7530 mdio-bus:1f eth1: Link is Down
[   13.648840] device dsa left promiscuous mode
[   13.666694] procd: - early -
[   13.672589] procd: - watchdog -
[   14.222993] procd: - watchdog -
[   14.229936] procd: - ubus -
[   14.290634] procd: - init -
[   14.788034] kmodloader: loading kernel modules from /etc/modules.d/*
[   14.850081] i2c /dev entries driver
[   14.859912] pca953x 0-0025: 0-0025 supply vcc not found, using dummy regulator
[   14.874453] pca953x 0-0025: using no AI
[   14.951226] pca953x 0-0025: interrupt support not compiled in
[   14.968514] urngd: v1.0.2 started.
[   15.021431] libphy: SFP I2C Bus: probed
[   15.042926] sfp sfp_eth5: Host maximum power 1.0W
[   15.078836] sfp sfp_eth5: No tx_disable pin: SFP modules will always be emitting.
[   15.102712] xt_time: kernel timezone is -0000
[   15.118549] random: crng init done
[   15.126612] PPP generic driver version 2.4.2
[   15.136619] NET: Registered protocol family 24
[   15.173886] kmodloader: done loading kernel modules from /etc/modules.d/*
[   47.966732] mtk_soc_eth 1e100000.ethernet dsa: Link is Down
[   47.988502] mtk_soc_eth 1e100000.ethernet dsa: configuring for fixed/rgmii link mode
[   48.004441] mtk_soc_eth 1e100000.ethernet dsa: Link is Up - 1Gbps/Full - flow control rx/tx
[   48.008452] device dsa entered promiscuous mode
[   48.031087] mt7530 mdio-bus:1f eth1: configuring for phy/gmii link mode
[   48.045084] 8021q: adding VLAN 0 to HW filter on device eth1
[   48.059935] IPv6: ADDRCONF(NETDEV_CHANGE): dsa: link becomes ready
[   48.073138] br-lan: port 1(eth1) entered blocking state
[   48.083714] br-lan: port 1(eth1) entered disabled state
[   48.095133] device eth1 entered promiscuous mode
[   48.123939] mt7530 mdio-bus:1f eth2: configuring for phy/gmii link mode
[   48.139972] 8021q: adding VLAN 0 to HW filter on device eth2
[   48.156240] br-lan: port 2(eth2) entered blocking state
[   48.166869] br-lan: port 2(eth2) entered disabled state
[   48.178927] device eth2 entered promiscuous mode
[   48.200548] mt7530 mdio-bus:1f eth3: configuring for phy/gmii link mode
[   48.214771] 8021q: adding VLAN 0 to HW filter on device eth3
[   48.230289] br-lan: port 3(eth3) entered blocking state
[   48.240823] br-lan: port 3(eth3) entered disabled state
[   48.253228] device eth3 entered promiscuous mode
[   48.274366] mt7530 mdio-bus:1f eth4: configuring for phy/gmii link mode
[   48.288348] 8021q: adding VLAN 0 to HW filter on device eth4
[   48.304237] br-lan: port 4(eth4) entered blocking state
[   48.314741] br-lan: port 4(eth4) entered disabled state
[   48.327405] device eth4 entered promiscuous mode
[   48.348146] mt7530 mdio-bus:1f eth5: configuring for phy/rgmii-rxid link mode
[   48.363068] 8021q: adding VLAN 0 to HW filter on device eth5
[   48.375477] at803x_config_aneg: fiber
[   48.386300] br-lan: port 5(eth5) entered blocking state
[   48.396806] br-lan: port 5(eth5) entered disabled state
[   48.409673] device eth5 entered promiscuous mode
[   48.442689] mt7530 mdio-bus:1f eth0: configuring for phy/gmii link mode
[   48.456622] 8021q: adding VLAN 0 to HW filter on device eth0
[   51.111340] mt7530 mdio-bus:1f eth1: Link is Up - 1Gbps/Full - flow control rx/tx
[   51.126325] br-lan: port 1(eth1) entered blocking state
[   51.136770] br-lan: port 1(eth1) entered forwarding state
[   51.148488] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   52.551348] mt7530 mdio-bus:1f eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   52.566303] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
root@OpenWrt:~# cat /etc/config/network

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option packet_steering '1'
	option ula_prefix 'fda0:2842:0efe::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth1 eth2 eth3 eth4 eth5'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config interface 'wan'
	option ifname 'eth0'
	option proto 'dhcp'

config interface 'wan6'
	option ifname 'eth0'
	option proto 'dhcpv6'

Feel free to tell me what details I should show here. For the record, I tried the three last snapshots and while compiling my own (even the Target Profile "Ubiquiti EdgeRouter X SFP" available on buildroot).

Edit: I noticed that this behaviour disappeared when I remove the cable on eth0. I do not know why, everything is back to normal and you can finally access your device through ssh without having the device hanging and waiting to type commands. I am going to see what could cause that starting to see if the uci defaults are the same from 19.07.

I did not notice any such at least on r16134-c6652a7c94 based on 5.4.102. However, please note that 19.07 given it is NOT using DSA is using a different network configuration not compatible with later snapshot or upcoming 21.02. By default, eth0 is the WAN interface and the SFP is on the LAN bridge. However, I do use the SFP as WAN and put eth0 on the LAN bridge. Here my dmesg and network config.

root@OpenWrt:~# dmesg
[    0.000000] Linux version 5.4.102 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16134-c6652a7c94)) #0 SMP Sat Mar 6 19:23:48 2021
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is Ubiquiti EdgeRouter X SFP
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] VPE topology {2,2} total 4
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] On node 0 totalpages: 65536
[    0.000000]   Normal zone: 576 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 65536 pages, LIFO batch:15
[    0.000000] percpu: Embedded 14 pages/cpu s26768 r8192 d22384 u57344
[    0.000000] pcpu-alloc: s26768 r8192 d22384 u57344 alloc=14*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64960
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Writing ErrCtl register=00019b00
[    0.000000] Readback ErrCtl register=00019b00
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 250280K/262144K available (6069K kernel code, 205K rwdata, 1292K rodata, 1252K init, 238K bss, 11864K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] NR_IRQS: 256
[    0.000000] random: get_random_bytes called from start_kernel+0x340/0x558 with crng_init=0
[    0.000000] CPU Clock: 880MHz
[    0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
[    0.000009] sched_clock: 32 bits at 440MHz, resolution 2ns, wraps every 4880645118ns
[    0.015494] Calibrating delay loop... 583.68 BogoMIPS (lpj=1167360)
[    0.055834] pid_max: default: 32768 minimum: 301
[    0.065190] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.079596] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.097745] rcu: Hierarchical SRCU implementation.
[    0.107865] smp: Bringing up secondary CPUs ...
[    6.706004] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    6.706017] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    6.706030] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    6.706133] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.145053] Synchronize counters for CPU 1: done.
[    6.797070] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    6.797079] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    6.797087] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    6.797146] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.239512] Synchronize counters for CPU 2: done.
[    6.888176] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    6.888184] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    6.888192] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    6.888253] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.327113] Synchronize counters for CPU 3: done.
[    0.386719] smp: Brought up 1 node, 4 CPUs
[    0.399180] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.418461] futex hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.432311] pinctrl core: initialized pinctrl subsystem
[    0.444382] NET: Registered protocol family 16
[    0.464768] FPU Affinity set after 4688 emulations
[    0.481335] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.502179] clocksource: Switched to clocksource GIC
[    0.513885] NET: Registered protocol family 2
[    0.523514] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.540108] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.555235] TCP bind hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.569406] TCP: Hash tables configured (established 2048 bind 2048)
[    0.582183] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.595066] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.609181] NET: Registered protocol family 1
[    0.617742] PCI: CLS 0 bytes, default 32
[    0.714133] 4 CPUs re-calibrate udelay(lpj = 1167360)
[    0.725640] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[    0.740947] random: fast init done
[    0.751016] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.762516] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.783546] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.799642] GPIO line 487 (sfp_i2c_clk_gate) hogged as output/high
[    0.812157] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.823462] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.834775] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.846712] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.862960] printk: console [ttyS0] disabled
[    0.871416] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 19, base_baud = 3125000) is a 16550A
[    0.889347] printk: console [ttyS0] enabled
[    0.905892] printk: bootconsole [early0] disabled
[    0.927222] mt7621-nand 1e003000.nand: Using programmed access timing: 31c07388
[    0.942063] nand: device found, Manufacturer ID: 0x01, Chip ID: 0xda
[    0.954726] nand: AMD/Spansion S34ML02G2
[    0.962538] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 128
[    0.977792] mt7621-nand 1e003000.nand: ECC strength adjusted to 12 bits
[    0.991002] mt7621-nand 1e003000.nand: Using programmed access timing: 21005134
[    1.005563] mt7621-nand 1e003000.nand: Using programmed access timing: 21005134
[    1.020125] Scanning device for bad blocks
[    4.990718] 6 fixed-partitions partitions found on MTD device mt7621-nand
[    5.004239] Creating 6 MTD partitions on "mt7621-nand":
[    5.014677] 0x000000000000-0x000000080000 : "u-boot"
[    5.025898] 0x000000080000-0x0000000e0000 : "u-boot-env"
[    5.037938] 0x0000000e0000-0x000000140000 : "factory"
[    5.049316] 0x000000140000-0x000000440000 : "kernel1"
[    5.060819] 0x000000440000-0x000000740000 : "kernel2"
[    5.072205] 0x000000740000-0x00000ff00000 : "ubi"
[    5.085696] libphy: Fixed MDIO Bus: probed
[    5.120601] libphy: mdio: probed
[    5.127281] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
[    5.144392] mtk_soc_eth 1e100000.ethernet dsa: mediatek frame engine at 0xbe100000, irq 20
[    5.162329] i2c-mt7621 1e000900.i2c: clock 100 kHz
[    5.175660] NET: Registered protocol family 10
[    5.185916] Segment Routing with IPv6
[    5.193350] NET: Registered protocol family 17
[    5.202287] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    5.228338] 8021q: 802.1Q VLAN Support v1.8
[    5.238690] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
[    5.263163] libphy: dsa slave smi: probed
[    5.271592] mt7530 mdio-bus:1f eth0 (uninitialized): PHY [dsa-0.0:00] driver [Generic PHY]
[    5.289529] mt7530 mdio-bus:1f eth1 (uninitialized): PHY [dsa-0.0:01] driver [Generic PHY]
[    5.307513] mt7530 mdio-bus:1f eth2 (uninitialized): PHY [dsa-0.0:02] driver [Generic PHY]
[    5.325465] mt7530 mdio-bus:1f eth3 (uninitialized): PHY [dsa-0.0:03] driver [Generic PHY]
[    5.343467] mt7530 mdio-bus:1f eth4 (uninitialized): PHY [dsa-0.0:04] driver [Generic PHY]
[    5.361446] mt7530 mdio-bus:1f eth5 (uninitialized): PHY [mdio-bus:07] driver [Atheros 8031 ethernet]
[    5.381215] mt7530 mdio-bus:1f: configuring for fixed/rgmii link mode
[    5.398895] DSA: tree 0 setup
[    5.405273] mt7530 mdio-bus:1f: Link is Up - 1Gbps/Full - flow control off
[    5.406411] UBI: auto-attach mtd5
[    5.425632] ubi0: attaching mtd5
[    7.996134] ubi0: scanning is finished
[    8.022846] ubi0: attached mtd5 (name "ubi", size 247 MiB)
[    8.033813] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    8.047514] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    8.061048] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    8.074924] ubi0: good PEBs: 1982, bad PEBs: 0, corrupted PEBs: 0
[    8.087067] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[    8.101458] ubi0: max/mean erase counter: 10/5, WL threshold: 4096, image sequence number: 1057474844
[    8.119832] ubi0: available PEBs: 0, total reserved PEBs: 1982, PEBs reserved for bad PEB handling: 40
[    8.138413] ubi0: background thread "ubi_bgt0d" started, PID 480
[    8.142359] block ubiblock0_0: created from ubi0:0(rootfs)
[    8.161325] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[    8.175201] hctosys: unable to open rtc device (rtc0)
[    8.191120] VFS: Mounted root (squashfs filesystem) readonly on device 259:0.
[    8.209645] Freeing unused kernel memory: 1252K
[    8.218695] This architecture does not have kernel memory protection.
[    8.231520] Run /sbin/init as init process
[    8.714738] init: Console is alive
[    8.721770] init: - watchdog -
[    9.012762] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    9.108486] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    9.126542] init: - preinit -
[    9.810802] mtk_soc_eth 1e100000.ethernet dsa: configuring for fixed/rgmii link mode
[    9.826731] mtk_soc_eth 1e100000.ethernet dsa: Link is Up - 1Gbps/Full - flow control rx/tx
[    9.843447] IPv6: ADDRCONF(NETDEV_CHANGE): dsa: link becomes ready
[    9.982910] random: jshn: uninitialized urandom read (4 bytes read)
[   10.053641] random: jshn: uninitialized urandom read (4 bytes read)
[   10.093912] random: jshn: uninitialized urandom read (4 bytes read)
[   10.384501] device dsa entered promiscuous mode
[   10.394086] mt7530 mdio-bus:1f eth1: configuring for phy/gmii link mode
[   10.407673] 8021q: adding VLAN 0 to HW filter on device eth1
[   14.646471] UBIFS (ubi0:1): Mounting in unauthenticated mode
[   14.658235] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 584
[   14.700104] urandom_read: 6 callbacks suppressed
[   14.700115] random: procd: uninitialized urandom read (4 bytes read)
[   14.743151] UBIFS (ubi0:1): recovery needed
[   14.948569] UBIFS (ubi0:1): recovery completed
[   14.957608] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[   14.973216] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[   14.992985] UBIFS (ubi0:1): FS size: 242397184 bytes (231 MiB, 1909 LEBs), journal size 12189696 bytes (11 MiB, 96 LEBs)
[   15.014646] UBIFS (ubi0:1): reserved for root: 4952683 bytes (4836 KiB)
[   15.027833] UBIFS (ubi0:1): media format: w4/r0 (latest is w5/r0), UUID BA719AC2-2FF7-4C3C-8513-1EBD25935F98, small LPT model
[   15.065142] mount_root: switching to ubifs overlay
[   15.092208] urandom-seed: Seeding with /etc/urandom.seed
[   15.199298] device dsa left promiscuous mode
[   15.220744] procd: - early -
[   15.226630] procd: - watchdog -
[   15.774307] procd: - watchdog -
[   15.783340] procd: - ubus -
[   15.853680] procd: - init -
[   16.411413] kmodloader: loading kernel modules from /etc/modules.d/*
[   16.473446] i2c /dev entries driver
[   16.483629] pca953x 0-0025: 0-0025 supply vcc not found, using dummy regulator
[   16.498199] pca953x 0-0025: using no AI
[   16.574523] pca953x 0-0025: interrupt support not compiled in
[   16.597076] urngd: v1.0.2 started.
[   16.648780] libphy: SFP I2C Bus: probed
[   16.670265] sfp sfp_eth5: Host maximum power 1.0W
[   16.706163] sfp sfp_eth5: No tx_disable pin: SFP modules will always be emitting.
[   16.730369] xt_time: kernel timezone is -0000
[   16.748081] random: crng init done
[   16.754352] PPP generic driver version 2.4.2
[   16.764898] NET: Registered protocol family 24
[   16.801350] kmodloader: done loading kernel modules from /etc/modules.d/*
[   17.230172] sfp sfp_eth5: module FINISAR CORP.    FCMJ-8520-3      rev 4    sn PFA1F8W          dc 090305  
[   17.249606] Atheros 8031 ethernet mdio-bus:07: SFP interface sgmii
[   21.794332] mtk_soc_eth 1e100000.ethernet dsa: Link is Down
[   21.815892] mtk_soc_eth 1e100000.ethernet dsa: configuring for fixed/rgmii link mode
[   21.831829] mtk_soc_eth 1e100000.ethernet dsa: Link is Up - 1Gbps/Full - flow control rx/tx
[   21.848416] mt7530 mdio-bus:1f eth0: configuring for phy/gmii link mode
[   21.864179] 8021q: adding VLAN 0 to HW filter on device eth0
[   21.880375] IPv6: ADDRCONF(NETDEV_CHANGE): dsa: link becomes ready
[   21.898997] br-lan: port 1(eth0) entered blocking state
[   21.909517] br-lan: port 1(eth0) entered disabled state
[   21.921493] device eth0 entered promiscuous mode
[   21.930771] device dsa entered promiscuous mode
[   21.967545] mt7530 mdio-bus:1f eth1: configuring for phy/gmii link mode
[   21.981373] 8021q: adding VLAN 0 to HW filter on device eth1
[   21.996579] br-lan: port 2(eth1) entered blocking state
[   22.007148] br-lan: port 2(eth1) entered disabled state
[   22.019502] device eth1 entered promiscuous mode
[   22.039068] mt7530 mdio-bus:1f eth2: configuring for phy/gmii link mode
[   22.053164] 8021q: adding VLAN 0 to HW filter on device eth2
[   22.068077] br-lan: port 3(eth2) entered blocking state
[   22.078661] br-lan: port 3(eth2) entered disabled state
[   22.090637] device eth2 entered promiscuous mode
[   22.110112] mt7530 mdio-bus:1f eth3: configuring for phy/gmii link mode
[   22.124059] 8021q: adding VLAN 0 to HW filter on device eth3
[   22.138815] br-lan: port 4(eth3) entered blocking state
[   22.149360] br-lan: port 4(eth3) entered disabled state
[   22.161310] device eth3 entered promiscuous mode
[   22.180565] mt7530 mdio-bus:1f eth4: configuring for phy/gmii link mode
[   22.195301] 8021q: adding VLAN 0 to HW filter on device eth4
[   22.209991] br-lan: port 5(eth4) entered blocking state
[   22.220590] br-lan: port 5(eth4) entered disabled state
[   22.232988] device eth4 entered promiscuous mode
[   22.263748] mt7530 mdio-bus:1f eth5: configuring for phy/rgmii-rxid link mode
[   22.280758] 8021q: adding VLAN 0 to HW filter on device eth5
[   22.292867] at803x_config_aneg: fiber
[   25.970665] mt7530 mdio-bus:1f eth0: Link is Up - 1Gbps/Full - flow control off
[   25.985294] br-lan: port 1(eth0) entered blocking state
[   25.995734] br-lan: port 1(eth0) entered forwarding state
[   26.007413] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
root@OpenWrt:~# cat /etc/config/network 

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option packet_steering '1'
	option ula_prefix 'fd63:5aa3:a1cd::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0 eth1 eth2 eth3 eth4'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config interface 'wan'
	option ifname 'eth5'
	option proto 'dhcp'

config interface 'wan6'
	option ifname 'eth5'
	option proto 'dhcpv6'

I am using (for now) r16178-1cd098784e based on kernel version 5.4.105.

I should have clearer about this I guess but:

  • I knew that 19.07 is not using DSA, and therefore the SFP port cannot be used which is why I am using the snapshot(s)
  • again, since it was almost impossible to type commands since the device was hanging, I am running the stock version (like you said, with eth0 as wan and eth1 as the port to connect to the device. I did not modify any setting and could not find any errors (but maybe the loggers are not verbose enough) apart from some warning about DNS

However:

  • I did notice some DNS-related messages
  • I am running my own DNS resolver (with unbound) on another device
  • the ER-X-SFP could not access the Internet although it should have according to what I could gather.

Long story short, since I was unable to avoid the device to hang with WAN connected, I could not (and did not want to) configure the SFP port as the WAN port. I wanted to get some testing and the necessary configuration before attempting any swap with my current router.

Sorry if it was not clear ; if I should put this in the original post, feel free to tell me! :wink:

For now, I am leaning on the internal DNS and external DHCP WAN side to be problematic but I need to find some time to experiment more and coming back with some logs. But I would be willing to get some pointers if anyone can because I do not really know where to start at this point.

I now reset mine to the default config again but did not find anything unusual, It works just fine for me also with WAN on eth0 and my workstation LAN on eth1. I then updated it to latest snapshot from today and also that works without any issues. So there likely is something special about your environment which causes issues. In my case, a Cisco IOS device is giving out the WAN DHCP address and also does caching DNS for it. Do you have any other "router" which could provide it the "WAN" DHCP address to test whether it is maybe related to your ISP?

I never found the issue, I flashed it back, after having greatly changed how the network was setup in my flat, with another snapshot and it never occurred again.

What happened was most likely to some kind of networking loop I had done for the setup of OpenWrt on this specific device rather than anything else IMHO, but I can only guess.

Thanks anyway.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.