Ubuntu 20.04.02 / Linux 5.12 ethernet driver crash

I’m now running the latest Ubuntu 20.04.02 / Linux 5.12 / Fenix 1.0.7 OS image, downloaded from here on a VIM3 Pro.

Every few days, I’m seeing this error in syslog from the meson8b-dwmac ethernet driver, which causes the wired networking to fail:

Aug 16 22:04:03 localhost kernel: [436768.621355] ------------[ cut here ]------------
Aug 16 22:04:03 localhost kernel: [436768.621610] NETDEV WATCHDOG: eth0 (meson8b-dwmac): transmit queue 0 timed out
Aug 16 22:04:03 localhost kernel: [436768.622045] WARNING: CPU: 0 PID: 0 at dev_watchdog+0x31c/0x328
Aug 16 22:04:03 localhost kernel: [436768.622209] Modules linked in: rpcsec_gss_krb5 zram zsmalloc hci_uart btqca meson_vdec(C) btsdio btbcm bluetooth videobuf2_dma_contig v4l2_mem2mem governor_simpleondemand ir_nec_decoder videobuf2_memops videobuf2_v4l2 panfrost ecdh_generic rc_khadas videobuf2_common ecc gpu_sched khadas_mcu_fan meson_ir galcore(C) brcmfmac brcmutil cfg80211 rfkill ip_tables x_tables btrfs blake2b_generic xor xor_neon zstd_compress zlib_deflate raid6_pq libcrc32c gpio_pca953x rtc_hym8563 rtc_meson_vrtc gpio_keys_polled
Aug 16 22:04:03 localhost kernel: [436768.623793] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G         C        5.12.0 #1.0.7
Aug 16 22:04:03 localhost kernel: [436768.623885] Hardware name: Khadas VIM3 (DT)
Aug 16 22:04:03 localhost kernel: [436768.623934] pstate: 20000005 (nzCv daif -PAN -UAO -TCO BTYPE=--)
Aug 16 22:04:03 localhost kernel: [436768.624023] pc : dev_watchdog+0x31c/0x328
Aug 16 22:04:03 localhost kernel: [436768.624106] lr : dev_watchdog+0x31c/0x328
Aug 16 22:04:03 localhost kernel: [436768.624181] sp : ffff800010003d80
Aug 16 22:04:03 localhost kernel: [436768.624222] x29: ffff800010003d80 x28: 0000000000000004
Aug 16 22:04:03 localhost kernel: [436768.624423] x27: 0000000000000140 x26: 00000000ffffffff
Aug 16 22:04:03 localhost kernel: [436768.624536] x25: 0000000000000000 x24: 0000000000000000
Aug 16 22:04:03 localhost kernel: [436768.624643] x23: 0000000000000001 x22: ffff00007f798000
Aug 16 22:04:03 localhost kernel: [436768.624754] x21: ffff00007f798438 x20: ffff800012417000
Aug 16 22:04:03 localhost kernel: [436768.624868] x19: 0000000000000000 x18: 0000000000000000
Aug 16 22:04:03 localhost kernel: [436768.625003] x17: 0000000000000000 x16: 0000000000000000
Aug 16 22:04:03 localhost kernel: [436768.625111] x15: ffff800012425970 x14: 00000000000001de
Aug 16 22:04:03 localhost kernel: [436768.625224] x13: ffff800012425970 x12: 00000000ffffffea
Aug 16 22:04:03 localhost kernel: [436768.625336] x11: ffff8000125162b0 x10: ffff8000124e6270
Aug 16 22:04:03 localhost kernel: [436768.625448] x9 : ffff8000124e62c8 x8 : 000000000002ffe8
Aug 16 22:04:03 localhost kernel: [436768.625558] x7 : c0000000ffffdfff x6 : 0000000000000001
Aug 16 22:04:03 localhost kernel: [436768.625665] x5 : 0000000000000000 x4 : 0000000000000000
Aug 16 22:04:03 localhost kernel: [436768.625804] x3 : ffff80001241f0b8 x2 : 0000000000000006
Aug 16 22:04:03 localhost kernel: [436768.625912] x1 : 0b2fe147f9888200 x0 : 0000000000000000
Aug 16 22:04:03 localhost kernel: [436768.626025] Call trace:
Aug 16 22:04:03 localhost kernel: [436768.626068]  dev_watchdog+0x31c/0x328
Aug 16 22:04:03 localhost kernel: [436768.626150]  call_timer_fn.isra.0+0x24/0x80
Aug 16 22:04:03 localhost kernel: [436768.626245]  run_timer_softirq+0x3f4/0x580
Aug 16 22:04:03 localhost kernel: [436768.626327]  _stext+0x128/0x294
Aug 16 22:04:03 localhost kernel: [436768.626404]  irq_exit+0xd8/0xf8
Aug 16 22:04:03 localhost kernel: [436768.626501]  __handle_domain_irq+0x68/0xc0
Aug 16 22:04:03 localhost kernel: [436768.626600]  gic_handle_irq+0x6c/0x98
Aug 16 22:04:03 localhost kernel: [436768.626686]  el1_irq+0xbc/0x140
Aug 16 22:04:03 localhost kernel: [436768.626760]  arch_cpu_idle+0x18/0x40
Aug 16 22:04:03 localhost kernel: [436768.626857]  default_idle_call+0x20/0x88
Aug 16 22:04:03 localhost kernel: [436768.626934]  do_idle+0x218/0x270
Aug 16 22:04:03 localhost kernel: [436768.627033]  cpu_startup_entry+0x28/0x90
Aug 16 22:04:03 localhost kernel: [436768.627132]  rest_init+0xbc/0xcc
Aug 16 22:04:03 localhost kernel: [436768.627221]  arch_call_rest_init+0x10/0x1c
Aug 16 22:04:03 localhost kernel: [436768.627311]  start_kernel+0x788/0x7c4
Aug 16 22:04:03 localhost kernel: [436768.627397]  0x0
Aug 16 22:04:03 localhost kernel: [436768.627490] ---[ end trace a93a7c3464d9bdaa ]---
Aug 16 22:04:03 localhost kernel: [436768.628092] meson8b-dwmac ff3f0000.ethernet eth0: Reset adapter.
Aug 16 22:04:03 localhost kernel: [436768.640328] meson8b-dwmac ff3f0000.ethernet eth0: PHY [0.0:00] driver [RTL8211F Gigabit Ethernet] (irq=52)
Aug 16 22:04:03 localhost kernel: [436768.855671] meson8b-dwmac ff3f0000.ethernet: Failed to reset the dma
Aug 16 22:04:03 localhost kernel: [436768.856793] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed
Aug 16 22:04:03 localhost kernel: [436768.865947] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_open: Hw setup failed
Aug 16 22:04:09 localhost NetworkManager[1954]: <info>  [1629151449.3610] device (eth0): state change: activated -> unavailable (reason 'carrier-changed', sys-iface-state: 'managed')
Aug 16 22:04:09 localhost NetworkManager[1954]: <info>  [1629151449.3614] dhcp4 (eth0): canceled DHCP transaction
Aug 16 22:04:09 localhost NetworkManager[1954]: <info>  [1629151449.3614] dhcp4 (eth0): state changed extended -> done
Aug 16 22:04:09 localhost NetworkManager[1954]: <info>  [1629151449.3785] manager: NetworkManager state is now DISCONNECTED

See VIM3 running totally unstable / keeps freezing / crashing - #41 by Motacilla

I currently think this was caused by overclocking, and has been resolved by using the default frequencies in /etc/default/cpufrequtils.