resumed working on this device and finally figured out why there was no traffic between the two switches when moving from 5.15.120 to a higher kernel version.
It was a reset issue. ipq5018 uses multiple bits and @robimarko's commit (4a5210893625f89723ea210d7c630b730abb37ad) accommodates for that.
This downstream patch needed to be adjusted so that the .bitmask property was explicitly set, from:
+ [GCC_GEPHY_MDC_SW_ARES] = { 0x56004, 0, 0x3 },
to:
+ [GCC_GEPHY_MDC_SW_ARES] = { .reg = 0x56004, .bitmask = 0x3 },
now got ethernet working on 5.15.137 and 6.1.62. However, with the latter, I now get a kernel panic related to nss-dp. Here is the bootlog:
## Loading kernel from FIT Image at 44000000 ...
Using 'config@mp03.1' configuration
Trying 'kernel-1' kernel subimage
Description: ARM64 OpenWrt Linux-6.1.62
Type: Kernel Image
Compression: gzip compressed
Data Start: 0x440000e8
Data Size: 12658063 Bytes = 12.1 MiB
Architecture: AArch64
OS: Linux
Load Address: 0x41000000
Entry Point: 0x41000000
Hash algo: crc32
Hash value: f3c7055c
Hash algo: sha1
Hash value: fc72c817321fc9400ad87f9f4fa4941767f2f613
Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 44000000 ...
Using 'config@mp03.1' configuration
Trying 'fdt-1' fdt subimage
Description: ARM64 OpenWrt linksys_mx2000 device tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x44c127b8
Data Size: 19985 Bytes = 19.5 KiB
Architecture: AArch64
Hash algo: crc32
Hash value: 5a963ed3
Hash algo: sha1
Hash value: 7915d7a3079ba16f695a154e5dd269766c5498f6
Verifying Hash Integrity ... crc32+ sha1+ OK
Booting using the fdt blob at 0x44c127b8
Uncompressing Kernel Image ... OK
Loading Device Tree to 4a3f8000, end 4a3ffe10 ... OK
fdt_fixup_qpic: QPIC: unable to find node '/soc/qpic-nand@79b0000'
Using machid 0x8040004 from environment
Starting kernel ...
Jumping to AARCH64 kernel via monitor
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x51af8014]
[ 0.000000] Linux version 6.1.62 (gemous@SL5-GEMOUS) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 12.3.0 r24414-255d5c9bf8) 12.3.0, GNU ld (GNU Binutils) 2.40.0) #0 SMP Thu Nov 16 11:38:18 2023
[ 0.000000] Machine model: Linksys MX2000 (Atlas 6)
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000040000000-0x000000005fffffff]
[ 0.000000] DMA32 empty
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000040000000-0x000000004a7fffff]
[ 0.000000] node 0: [mem 0x000000004a800000-0x000000004a9fffff]
[ 0.000000] node 0: [mem 0x000000004aa00000-0x000000004aafffff]
[ 0.000000] node 0: [mem 0x000000004ab00000-0x000000004adfffff]
[ 0.000000] node 0: [mem 0x000000004ae00000-0x000000005fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000005fffffff]
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.0 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: MIGRATE_INFO_TYPE not supported.
[ 0.000000] psci: SMC Calling Convention v1.0
[ 0.000000] psci: OSI mode supported.
[ 0.000000] psci: failed to set PC mode: -1
[ 0.000000] percpu: Embedded 17 pages/cpu s31080 r8192 d30360 u69632
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: detected: Spectre-v4
[ 0.000000] alternatives: applying boot alternatives
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 129024
[ 0.000000] Kernel command line: console=ttyMSM0,115200n8 swiotlb=1 coherent_pool=2M root=/dev/ubiblock0_1
[ 0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 488796K/524288K available (7808K kernel code, 842K rwdata, 2148K rodata, 8832K init, 273K bss, 35492K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[ 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=2
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] Root IRQ handler: gic_handle_irq
[ 0.000000] GICv2m: range[mem 0x0b00a000-0x0b00aff7], SPI[448:479]
[ 0.000000] GICv2m: range[mem 0x0b00b000-0x0b00bff7], SPI[480:511]
[ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[ 0.000000] arch_timer: cp15 and mmio timer(s) running at 24.00MHz (virt/virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000001] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000099] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000119] pid_max: default: 32768 minimum: 301
[ 0.000640] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
[ 0.000666] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
[ 0.003692] cblist_init_generic: Setting adjustable number of callback queues.
[ 0.003707] cblist_init_generic: Setting shift to 1 and lim to 1.
[ 0.004089] rcu: Hierarchical SRCU implementation.
[ 0.004101] rcu: Max phase no-delay instances is 1000.
[ 0.005088] smp: Bringing up secondary CPUs ...
[ 0.006204] Detected VIPT I-cache on CPU1
[ 0.006398] CPU1: Booted secondary processor 0x0000000001 [0x51af8014]
[ 0.006596] smp: Brought up 1 node, 2 CPUs
[ 0.006617] SMP: Total of 2 processors activated.
[ 0.006626] CPU features: detected: 32-bit EL0 Support
[ 0.006632] CPU features: detected: CRC32 instructions
[ 0.006722] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[ 0.006731] CPU: All CPU(s) started at EL1
[ 0.006734] alternatives: applying system-wide alternatives
[ 0.013814] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.013848] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[ 0.014111] pinctrl core: initialized pinctrl subsystem
[ 0.015911] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.017017] DMA: preallocated 2048 KiB GFP_KERNEL pool for atomic allocations
[ 0.017372] DMA: preallocated 2048 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[ 0.017712] DMA: preallocated 2048 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[ 0.018308] thermal_sys: Registered thermal governor 'step_wise'
[ 0.018733] cpuidle: using governor menu
[ 0.019044] ASID allocator initialised with 65536 entries
[ 0.045883] SCSI subsystem initialized
[ 0.046182] usbcore: registered new interface driver usbfs
[ 0.046239] usbcore: registered new interface driver hub
[ 0.046295] usbcore: registered new device driver usb
[ 0.046711] qcom_scm: convention: smc arm 64
[ 0.046748] qcom_scm firmware:scm: No available mechanism for setting download mode
[ 0.048982] clocksource: Switched to clocksource arch_sys_counter
[ 0.050688] NET: Registered PF_INET protocol family
[ 0.050902] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[ 0.052086] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.052121] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.052142] TCP established hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.052197] TCP bind hash table entries: 4096 (order: 5, 131072 bytes, linear)
[ 0.052384] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.052556] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.052599] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.052930] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.052995] PCI: CLS 0 bytes, default 64
[ 0.065633] workingset: timestamp_bits=46 max_order=17 bucket_order=0
[ 0.072783] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.072809] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.080294] bam-dma-engine 704000.dma-controller: num-channels unspecified in dt
[ 0.080321] bam-dma-engine 704000.dma-controller: num-ees unspecified in dt
[ 0.086876] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 0.088208] msm_serial 78af000.serial: msm_serial: detected port #0
[ 0.088273] msm_serial 78af000.serial: uartclk = 1843199
[ 0.088449] 78af000.serial: ttyMSM0 at MMIO 0x78af000 (irq = 20, base_baud = 115199) is a MSM
[ 0.088496] msm_serial: console setup on port #0
[ 0.714393] printk: console [ttyMSM0] enabled
[ 0.719894] msm_serial: driver initialized
[ 0.734809] loop: module loaded
[ 0.738539] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xa6
[ 0.738600] nand: Macronix MX35UF2GE4AD SPI NAND 2G 1.8V
[ 0.744087] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 128
[ 0.749314] QPIC controller hw version Major:2, Minor:1
[ 0.756687] Block protection check failed
[ 0.956769] 18 fixed-partitions partitions found on MTD device qcom_nand.0
[ 0.956838] Creating 18 MTD partitions on "qcom_nand.0":
[ 0.962643] 0x000000000000-0x000000080000 : "0:SBL1"
[ 0.971138] 0x000000080000-0x0000000a0000 : "0:MIBIB"
[ 0.974357] 0x000000100000-0x000000200000 : "0:QSEE"
[ 0.981108] 0x000000200000-0x000000240000 : "0:DEVCFG"
[ 0.984544] 0x000000240000-0x000000280000 : "0:CDT"
[ 0.989733] 0x000000280000-0x0000002a0000 : "0:APPSBLENV"
[ 0.994039] 0x000000300000-0x000000440000 : "0:APPSBL"
[ 1.001626] 0x000000440000-0x000000540000 : "0:ART"
[ 1.006195] 0x000000540000-0x0000005c0000 : "0:TRAINING"
[ 1.010248] 0x0000005c0000-0x000000640000 : "u_env"
[ 1.015636] 0x000000640000-0x000000680000 : "s_env"
[ 1.019980] 0x000000680000-0x0000006c0000 : "devinfo"
[ 1.024704] 0x0000006c0000-0x0000058c0000 : "kernel"
[ 1.163433] 0x000000ec0000-0x0000058c0000 : "rootfs"
[ 1.285798] mtd: setting mtd13 (rootfs) as root device
[ 1.286480] mtdsplit: no squashfs found in "rootfs"
[ 1.289932] 0x0000058c0000-0x00000aac0000 : "alt_kernel"
[ 1.428238] 0x0000060c0000-0x00000aac0000 : "alt_rootfs"
[ 1.549574] 0x00000aac0000-0x00000acc0000 : "sysdiag"
[ 1.554359] 0x00000acc0000-0x00000f0c0000 : "syscfg"
[ 2.163500] i2c_dev: i2c /dev entries driver
[ 2.167276] cpufreq: cpufreq_online: CPU0: Running at unlisted initial frequency: 799999 KHz, changing to: 1008000 KHz
[ 2.169135] sdhci: Secure Digital Host Controller Interface driver
[ 2.177359] sdhci: Copyright(c) Pierre Ossman
[ 2.183560] sdhci-pltfm: SDHCI platform and OF driver helper
[ 2.192560] NET: Registered PF_INET6 protocol family
[ 2.196518] Segment Routing with IPv6
[ 2.198675] In-situ OAM (IOAM) with IPv6
[ 2.202420] NET: Registered PF_PACKET protocol family
[ 2.206590] 8021q: 802.1Q VLAN Support v1.8
[ 2.241367] debugfs: Directory '4a9000.thermal-sensor' with parent 'tsens' already present!
[ 2.256695] Freeing unused kernel memory: 8832K
[ 2.289304] Run /init as init process
[ 2.958702] init: Console is alive
[ 2.959374] init: - watchdog -
[ 2.978235] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[ 3.011264] ssdk_dt_parse_mac_mode[293]:INFO:mac mode1 doesn't exit!
[ 3.011314] ssdk_dt_parse_mac_mode[301]:INFO:mac mode2 doesn't exit!
[ 3.016874] ssdk_dt_parse_port_bmp[1025]:INFO:port_bmp doesn't exist!
[ 3.023150] ssdk_dt_parse_interrupt[903]:INFO:intr-gpio does not exist
[ 3.029494] ssdk_dt_parse_led[1219]:INFO:current dts led_source_num is 0
[ 5.509012] ssdk_mp_reset_init[842]:INFO:MP reset successfully!
[ 5.510454] mpge_phy_api_ops_init[606]:INFO:qca probe mpge phy driver succeeded!
[ 5.883018] _adpt_mp_uniphy_clk_output_ctrl_set[255]:INFO:uniphy will output clock as 25000000Hz
[ 5.883260] regi_init[3631]:INFO:Initializing SCOMPHY Done!!
[ 5.891361] regi_init[3656]:INFO:qca-ssdk module init succeeded!
[ 5.916017] (unnamed net_device) (uninitialized): nss_dp_gmac: Registering netdev eth%d(qcom-id:2) with GMAC, mac_base: 0xffffffc009f10000
[ 5.919883] **********************************************************
[ 5.927384] * NSS Data Plane driver
[ 5.934012] **********************************************************
[ 5.954085] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 5.960987] init: - preinit -
[ 5.991160] qca8k 90000.mdio-1:0a: configuring for fixed/sgmii link mode
[ 5.994014] qca8k 90000.mdio-1:0a: Link is Up - 1Gbps/Full - flow control off
[ 6.080069] qca8k 90000.mdio-1:0a wan (uninitialized): PHY [90000.mdio-1:01] driver [Qualcomm Atheros 8337 internal PHY] (irq=POLL)
[ 6.163973] mtdblock: MTD device 'devinfo' is NAND, please consider using UBI block devices instead.
[ 6.169613] qca8k 90000.mdio-1:0a lan1 (uninitialized): PHY [90000.mdio-1:02] driver [Qualcomm Atheros 8337 internal PHY] (irq=POLL)
[ 6.249435] qca8k 90000.mdio-1:0a lan2 (uninitialized): PHY [90000.mdio-1:03] driver [Qualcomm Atheros 8337 internal PHY] (irq=POLL)
[ 6.329337] qca8k 90000.mdio-1:0a lan3 (uninitialized): PHY [90000.mdio-1:04] driver [Qualcomm Atheros 8337 internal PHY] (irq=POLL)
[ 6.332278] device eth0 entered promiscuous mode
[ 6.340514] DSA: tree 0 setup
[ 7.878973] random: crng init done
[ 7.957753] nss-dp 39d00000.dp2 eth0: PHY Link up speed: 1000
[ 7.960792] qca8k 90000.mdio-1:0a lan1: configuring for phy/gmii link mode
[ 7.963447] adpt_mp_port_netdev_change_notify[1179]:ERROR:netdev change notify with incorrect port 0
[ 7.969431] ssdk_dev_event[3332]:ERROR:netdev change notify failed
[ 7.978563] 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.093118] procd: - early -
[ 10.093385] procd: - watchdog -
[ 10.705838] procd: - watchdog -
[ 10.706273] procd: - ubus -
[ 10.861895] procd: - init -
Please press Enter to activate this console.
[ 11.176879] kmodloader: loading kernel modules from /etc/modules.d/*
[ 11.240190] Loading modules backported from Linux version v6.5-0-g2dde18cd1d8f
[ 11.240233] Backport generated by backports.git v5.15.92-1-56-g5fb2ccb6b9e8
[ 11.265559] NET: Registered PF_QIPCRTR protocol family
[ 11.342709] PPP generic driver version 2.4.2
[ 11.344976] NET: Registered PF_PPPOX protocol family
[ 11.368452] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 11.467985] urngd: v1.0.2 started.
[ 12.457391] mtdblock: MTD device 'devinfo' is NAND, please consider using UBI block devices instead.
[ 20.032337] nss-dp 39d00000.dp2 eth0: PHY Link is down
[ 20.046904] nss-dp 39d00000.dp2 eth0: PHY Link up speed: 1000
[ 20.061089] qca8k 90000.mdio-1:0a lan1: configuring for phy/gmii link mode
[ 20.141256] br-lan: port 1(lan1) entered blocking state
[ 20.141323] br-lan: port 1(lan1) entered disabled state
[ 20.154060] device lan1 entered promiscuous mode
[ 20.199402] qca8k 90000.mdio-1:0a lan2: configuring for phy/gmii link mode
[ 20.201491] br-lan: port 2(lan2) entered blocking state
[ 20.205203] br-lan: port 2(lan2) entered disabled state
[ 20.227777] device lan2 entered promiscuous mode
[ 20.248651] qca8k 90000.mdio-1:0a lan3: configuring for phy/gmii link mode
[ 20.251125] br-lan: port 3(lan3) entered blocking state
[ 20.254501] br-lan: port 3(lan3) entered disabled state
[ 20.261189] qca8k 90000.mdio-1:0a lan3: Link is Up - 1Gbps/Full - flow control rx/tx
[ 20.277138] device lan3 entered promiscuous mode
[ 20.297027] adpt_mp_port_netdev_change_notify[1179]:ERROR:netdev change notify with incorrect port 0
[ 20.297101] ssdk_dev_event[3332]:ERROR:netdev change notify failed
[ 20.305519] br-lan: port 3(lan3) entered blocking state
[ 20.311310] br-lan: port 3(lan3) entered forwarding state
[ 20.343882] qca8k 90000.mdio-1:0a wan: configuring for phy/gmii link mode
[ 20.352541] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[ 21.049544] adpt_mp_port_netdev_change_notify[1179]:ERROR:netdev change notify with incorrect port 0
[ 21.049619] ssdk_dev_event[3332]:ERROR:netdev change notify failed
BusyBox v1.36.1 (2023-11-16 11:38:18 UTC) built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt SNAPSHOT, r24414-255d5c9bf8
-----------------------------------------------------
=== 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:/# ifco[ 22.009398] Unable to handle kernel write to read-only memory at virtual address ffffff8002858000
[ 22.009478] Mem abort info:
[ 22.017279] ESR = 0x000000009600014f
[ 22.019958] EC = 0x25: DABT (current EL), IL = 32 bits
[ 22.023706] SET = 0, FnV = 0
[ 22.029211] EA = 0, S1PTW = 0
[ 22.032036] FSC = 0x0f: level 3 permission fault
[ 22.035076] Data abort info:
[ 22.039973] ISV = 0, ISS = 0x0000014f
[ 22.042975] CM = 1, WnR = 1
[ 22.046532] swapper pgtable: 4k pages, 39-bit VAs, pgdp=00000000419d0000
[ 22.049696] [ffffff8002858000] pgd=180000005fff9003, p4d=180000005fff9003, pud=180000005fff9003, pmd=180000005ffe7003, pte=0060000042858787
[ 22.056441] Internal error: Oops: 000000009600014f [#1] SMP
[ 22.068672] Modules linked in: pppoe ppp_async nft_fib_inet nf_flow_table_inet ath11k_ahb ath11k pppox ppp_generic nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject nft_redir nft_quota nft_objref nft_numgen nft_nat nft_masq nft_log nft_limit nft_hash nft_flow_offload nft_fib_ipv6 nft_fib_ipv4 nft_fib nft_ct nft_chain_nat nf_tables nf_nat nf_flow_table nf_conntrack mac80211 cfg80211 slhc qrtr_smd qrtr qmi_helpers nfnetlink nf_reject_ipv6 nf_reject_ipv4 nf_log_syslog nf_defrag_ipv6 nf_defrag_ipv4 mdio_netlink libcrc32c hwmon crc_ccitt compat sha512_generic seqiv jitterentropy_rng drbg michael_mic hmac cmac leds_gpio xhci_plat_hcd xhci_pci xhci_hcd dwc3 dwc3_qcom qca_nss_dp qca_ssdk gpio_button_hotplug ext4 mbcache jbd2 crc32c_generic
[ 22.117626] CPU: 0 PID: 1347 Comm: dnsmasq Not tainted 6.1.62 #0
[ 22.139853] Hardware name: Linksys MX2000 (Atlas 6) (DT)
[ 22.146016] pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 22.151311] pc : dcache_inval_poc+0x40/0x58
[ 22.157992] lr : arch_sync_dma_for_cpu+0x2c/0x40
[ 22.162159] sp : ffffffc008003db0
[ 22.167019] x29: ffffffc008003db0 x28: ffffffc008003f50 x27: ffffffc009286000
[ 22.170234] x26: ffffffc016cf9000 x25: 0000000000000040 x24: ffffffc008003f40
[ 22.177353] x23: ffffffc0092850c0 x22: 0000000000001040 x21: 0000000000000002
[ 22.184471] x20: ffffff80001c8810 x19: 0000000042857780 x18: 0000000000000000
[ 22.191589] x17: ffffffc016cf9000 x16: ffffffc008000000 x15: 0000000000000000
[ 22.198706] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
[ 22.205825] x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000
[ 22.212944] x8 : ffffff801feae028 x7 : 09c086c4d96ecb77 x6 : a2ccc568515cb59a
[ 22.220061] x5 : e9ef155b0c63d1bf x4 : 0000000000000000 x3 : 000000000000003f
[ 22.227179] x2 : 0000000000000040 x1 : ffffff80028587c0 x0 : ffffff8002858000
[ 22.234298] Call trace:
[ 22.241411] dcache_inval_poc+0x40/0x58
[ 22.243670] dma_sync_single_for_cpu+0xe8/0x100
[ 22.247488] syn_dp_rx+0x29c/0x88c [qca_nss_dp]
[ 22.252002] syn_dp_tx+0x4d0/0x135c [qca_nss_dp]
[ 22.256517] __napi_poll+0x38/0x190
[ 22.261376] net_rx_action+0x160/0x320
[ 22.264588] _stext+0x10c/0x290
[ 22.268406] ____do_softirq+0x10/0x20
[ 22.271446] call_on_irq_stack+0x24/0x50
[ 22.275266] do_softirq_own_stack+0x1c/0x30
[ 22.279259] __irq_exit_rcu+0xc4/0xf0
[ 22.283165] irq_exit_rcu+0x10/0x20
[ 22.286984] el0_interrupt+0x44/0xb0
[ 22.290284] __el0_irq_handler_common+0x18/0x24
[ 22.294104] el0t_64_irq_handler+0x10/0x20
[ 22.298356] el0t_64_irq+0x174/0x178
[ 22.302529] Code: 8a230000 54000060 d50b7e20 14000002 (d5087620)
[ 22.306261] ---[ end trace 0000000000000000 ]---
[ 22.312248] Kernel panic - not syncing: Oops: Fatal exception in interrupt
[ 22.316937] SMP: stopping secondary CPUs
[ 22.323623] Kernel Offset: disabled
[ 22.327696] CPU features: 0x00000,00010000,0000400b
[ 22.330909] Memory Limit: none
[ 22.335772] Rebooting in 3 seconds..
@hzyitc: I've used your patch to use the standard kernel DMA api and it seems to panic at dma_sync_single_for_cpu in below code block. It works in 5.15.137, not in 6.1.62. Any clue?
int syn_dp_rx(struct syn_dp_info_rx *rx_info, int budget)
{
struct dma_desc_rx *rx_desc = NULL;
//removed for brevity
/*
* Invalidate all the descriptors we can read in one go.
* This could mean we re invalidating more than what we could
* have got from hardware, but that should be ok.
*
* It is expected that speculative prefetches are disabled while
* this code is executing.
*/
netdev_info(rx_info->netdev, "before block");
end = syn_dp_rx_inc_index(rx_info->rx_idx, busy);
if (end > start) {
dma_size = sizeof(struct dma_desc_rx) * (end - start + 1);
dma_sync_single_for_cpu(rx_info->dev,
rx_info->rx_desc[start].buffer1,
dma_size, DMA_FROM_DEVICE);
} else {
dma_size = sizeof(struct dma_desc_rx) * (SYN_DP_RX_DESC_MAX_INDEX - start + 1);
dma_sync_single_for_cpu(rx_info->dev,
rx_info->rx_desc[start].buffer1,
dma_size, DMA_FROM_DEVICE);
dma_size = sizeof(struct dma_desc_rx) * (end + 1);
dma_sync_single_for_cpu(rx_info->dev,
rx_info->rx_desc[0].buffer1,
dma_size, DMA_FROM_DEVICE);
}
in hal/dp_ops/syn_gmac_dp/syn_dp_rx.c