raspberrypi / linux

Kernel source tree for Raspberry Pi-provided kernel builds. Issues unrelated to the linux kernel should be posted on the community forum at https://forums.raspberrypi.com/
Other
11k stars 4.95k forks source link

CM4 after reboot NIC (eth0) disappears / no ethernet connection #5497

Open JN19aban opened 1 year ago

JN19aban commented 1 year ago

Describe the bug

Hi,

I have a CM4 with EMMC and without wireless with official CM4 board and sometimes after reboot the NIC connection disappears. To get it work again either re-plug the power or doing sudo reboot.

Also I am noticing that before starting this problem when I reboot the ethernet connection leds does not power off and then power on. The same does the power led. It feels like completely ignore the the network drivers.

Steps to reproduce the behaviour

Just reboot some times.

Device (s)

Raspberry Pi CM4

System

25e2319effa91eb95edd9d9209eb9f8a584d67be

version d7f9c2b4ef7e4a8c0b04374a879ce89d7a948453 (clean) (release) (start)

6.1.31-v8+

Logs

No response

Additional context

Untitled

pelwell commented 1 year ago

Please provide the output of the dmesg command, ideally two separate runs - once after a clean boot when it works, and once after it has failed to enable the Ethernet. Not photos, please - you can attach text files in a comment.

cleverca22 commented 1 year ago

also run ifconfig -a, or ip addr

by default, ifconfig only shows devices that are up

JN19aban commented 1 year ago

Hi,

sorry for the screenshot, I was on remote location.

The dmesg with the problem:

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd083]
[    0.000000] Linux version 6.1.32-v8+ (dom@buildbot) (aarch64-linux-gnu-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1656 SMP PREEMPT Wed Jun  7 11:37:17 BST 2023
[    0.000000] random: crng init done
[    0.000000] Machine model: Raspberry Pi Compute Module 4 Rev 1.0
[    0.000000] efi: UEFI not found.
[    0.000000] Reserved memory: created CMA memory pool at 0x000000002ac00000, size 64 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x000000003b3fffff]
[    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 0x0000000000000000-0x000000003b3fffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000003b3fffff]
[    0.000000] On node 0, zone DMA: 19456 pages in unavailable ranges
[    0.000000] percpu: Embedded 29 pages/cpu s78504 r8192 d32088 u118784
[    0.000000] pcpu-alloc: s78504 r8192 d32088 u118784 alloc=29*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Detected PIPT I-cache on CPU0
[    0.000000] CPU features: detected: Spectre-v2
[    0.000000] CPU features: detected: Spectre-v3a
[    0.000000] CPU features: detected: Spectre-v4
[    0.000000] CPU features: detected: Spectre-BHB
[    0.000000] CPU features: kernel page table isolation forced ON by KASLR
[    0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[    0.000000] CPU features: detected: ARM erratum 1742098
[    0.000000] CPU features: detected: ARM errata 1165522, 1319367, or 1530923
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 238896
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_headphones=0 bcm2708_fb.fbwidth=1824 bcm2708_fb.fbheight=984 bcm2708_fb.fbswap=1 smsc95xx.macaddr=DC:A6:32:FF:E3:D3 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=tty1 root=PARTUUID=ac690725-02 rootfstype=ext4 fsck.repair=yes rootwait
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 861592K/970752K available (11776K kernel code, 2106K rwdata, 3692K rodata, 4160K init, 1077K bss, 43624K reserved, 65536K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 39776 entries in 156 pages
[    0.000000] ftrace: allocated 156 pages with 4 groups
[    0.000000] trace event string verifier disabled
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    0.000000]  Rude variant of Tasks RCU enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 timer(s) running at 54.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xc743ce346, max_idle_ns: 440795203123 ns
[    0.000001] sched_clock: 56 bits at 54MHz, resolution 18ns, wraps every 4398046511102ns
[    0.000324] Console: colour dummy device 80x25
[    0.000878] printk: console [tty1] enabled
[    0.000942] Calibrating delay loop (skipped), value calculated using timer frequency.. 108.00 BogoMIPS (lpj=216000)
[    0.000984] pid_max: default: 32768 minimum: 301
[    0.001130] LSM: Security Framework initializing
[    0.001327] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.001374] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.002670] cgroup: Disabling memory control group subsystem
[    0.004991] cblist_init_generic: Setting adjustable number of callback queues.
[    0.005028] cblist_init_generic: Setting shift to 2 and lim to 1.
[    0.005225] cblist_init_generic: Setting shift to 2 and lim to 1.
[    0.005420] cblist_init_generic: Setting shift to 2 and lim to 1.
[    0.005886] rcu: Hierarchical SRCU implementation.
[    0.005910] rcu:     Max phase no-delay instances is 1000.
[    0.007266] EFI services will not be available.
[    0.007820] smp: Bringing up secondary CPUs ...
[    0.008994] Detected PIPT I-cache on CPU1
[    0.009152] CPU1: Booted secondary processor 0x0000000001 [0x410fd083]
[    0.010324] Detected PIPT I-cache on CPU2
[    0.010442] CPU2: Booted secondary processor 0x0000000002 [0x410fd083]
[    0.011569] Detected PIPT I-cache on CPU3
[    0.011691] CPU3: Booted secondary processor 0x0000000003 [0x410fd083]
[    0.011839] smp: Brought up 1 node, 4 CPUs
[    0.011972] SMP: Total of 4 processors activated.
[    0.011994] CPU features: detected: 32-bit EL0 Support
[    0.012012] CPU features: detected: 32-bit EL1 Support
[    0.012034] CPU features: detected: CRC32 instructions
[    0.012179] CPU: All CPU(s) started at EL2
[    0.012214] alternatives: applying system-wide alternatives
[    0.013971] devtmpfs: initialized
[    0.026184] Enabled cp15_barrier support
[    0.026254] Enabled setend support
[    0.026483] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.026537] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.028544] pinctrl core: initialized pinctrl subsystem
[    0.029488] DMI not present or invalid.
[    0.030199] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.033885] DMA: preallocated 1024 KiB GFP_KERNEL pool for atomic allocations
[    0.034232] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.035229] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.035343] audit: initializing netlink subsys (disabled)
[    0.035631] audit: type=2000 audit(0.032:1): state=initialized audit_enabled=0 res=1
[    0.036299] thermal_sys: Registered thermal governor 'step_wise'
[    0.036389] cpuidle: using governor menu
[    0.036743] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.036956] ASID allocator initialised with 32768 entries
[    0.037141] Serial: AMBA PL011 UART driver
[    0.048881] bcm2835-mbox fe00b880.mailbox: mailbox enabled
[    0.064195] raspberrypi-firmware soc:firmware: Attached to firmware from 2023-04-25T18:26:03, variant start
[    0.068210] raspberrypi-firmware soc:firmware: Firmware hash is d7f9c2b4ef7e4a8c0b04374a879ce89d7a948453
[    0.083606] KASLR enabled
[    0.116025] bcm2835-dma fe007000.dma: DMA legacy API manager, dmachans=0x1
[    0.121845] SCSI subsystem initialized
[    0.122120] usbcore: registered new interface driver usbfs
[    0.122194] usbcore: registered new interface driver hub
[    0.122276] usbcore: registered new device driver usb
[    0.122634] usb_phy_generic phy: supply vcc not found, using dummy regulator
[    0.122879] usb_phy_generic phy: dummy supplies not allowed for exclusive requests
[    0.123246] pps_core: LinuxPPS API ver. 1 registered
[    0.123271] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.123313] PTP clock support registered
[    0.124458] vgaarb: loaded
[    0.125130] clocksource: Switched to clocksource arch_sys_counter
[    1.267405] VFS: Disk quotas dquot_6.6.0
[    1.267533] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    1.267740] FS-Cache: Loaded
[    1.268022] CacheFiles: Loaded
[    1.277456] NET: Registered PF_INET protocol family
[    1.277775] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    1.279781] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
[    1.279834] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    1.279878] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    1.279963] TCP bind hash table entries: 8192 (order: 6, 262144 bytes, linear)
[    1.280265] TCP: Hash tables configured (established 8192 bind 8192)
[    1.280468] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    1.280522] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    1.280742] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    1.281527] RPC: Registered named UNIX socket transport module.
[    1.281558] RPC: Registered udp transport module.
[    1.281577] RPC: Registered tcp transport module.
[    1.281596] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.281631] PCI: CLS 0 bytes, default 64
[    1.283996] hw perfevents: enabled with armv8_cortex_a72 PMU driver, 7 counters available
[    1.284415] kvm [1]: IPA Size Limit: 44 bits
[    1.285788] kvm [1]: vgic interrupt IRQ9
[    1.286035] kvm [1]: Hyp mode initialized successfully
[    1.288225] Initialise system trusted keyrings
[    1.288629] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[    1.296318] zbud: loaded
[    1.299345] NFS: Registering the id_resolver key type
[    1.299399] Key type id_resolver registered
[    1.299421] Key type id_legacy registered
[    1.299549] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.299579] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    1.300986] Key type asymmetric registered
[    1.301017] Asymmetric key parser 'x509' registered
[    1.301165] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    1.301469] io scheduler mq-deadline registered
[    1.301499] io scheduler kyber registered
[    1.311619] gpio-507 (ant1): hogged as output/high
[    1.313081] gpio-511 (ant2): hogged as output/low
[    1.314694] brcm-pcie fd500000.pcie: host bridge /scb/pcie@7d500000 ranges:
[    1.314745] brcm-pcie fd500000.pcie:   No bus range found for /scb/pcie@7d500000, using [bus 00-ff]
[    1.314851] brcm-pcie fd500000.pcie:      MEM 0x0600000000..0x063fffffff -> 0x00c0000000
[    1.314953] brcm-pcie fd500000.pcie:   IB MEM 0x0000000000..0x003fffffff -> 0x0400000000
[    1.315978] brcm-pcie fd500000.pcie: PCI host bridge to bus 0000:00
[    1.316011] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.316040] pci_bus 0000:00: root bus resource [mem 0x600000000-0x63fffffff] (bus address [0xc0000000-0xffffffff])
[    1.316133] pci 0000:00:00.0: [14e4:2711] type 01 class 0x060400
[    1.316410] pci 0000:00:00.0: PME# supported from D0 D3hot
[    1.320378] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.320685] pci_bus 0000:01: supply vpcie3v3 not found, using dummy regulator
[    1.320903] pci_bus 0000:01: supply vpcie3v3aux not found, using dummy regulator
[    1.321013] pci_bus 0000:01: supply vpcie12v not found, using dummy regulator
[    1.645155] brcm-pcie fd500000.pcie: link down
[    1.645326] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.645375] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.645485] pci_bus 0000:01: busn_res: [bus 01] is released
[    1.646355] pci_bus 0000:00: busn_res: [bus 00-ff] is released
[    1.647347] bcm2708_fb soc:fb: FB found 1 display(s)
[    1.674310] Console: switching to colour frame buffer device 228x61
[    1.681910] bcm2708_fb soc:fb: Registered framebuffer for display 0, size 1824x984
[    1.692086] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    1.695216] iproc-rng200 fe104000.rng: hwrng registered
[    1.695774] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[    1.697472] gpiomem-bcm2835 fe200000.gpiomem: Initialised: Registers at 0xfe200000
[    1.711238] brd: module loaded
[    1.720295] loop: module loaded
[    1.721213] Loading iSCSI transport class v2.0-870.
[    1.726882] bcmgenet fd580000.ethernet: GENET 5.0 EPHY: 0x0000
[    1.749167] mdio_bus unimac-mdio--19: MDIO device at address 0 is missing.
[    1.749253] unimac-mdio unimac-mdio.-19: Broadcom UniMAC MDIO bus
[    1.750603] usbcore: registered new interface driver r8152
[    1.750736] usbcore: registered new interface driver lan78xx
[    1.750852] usbcore: registered new interface driver smsc95xx
[    1.777104] xhci-hcd fe9c0000.xhci: xHCI Host Controller
[    1.777227] xhci-hcd fe9c0000.xhci: new USB bus registered, assigned bus number 1
[    1.777598] xhci-hcd fe9c0000.xhci: USB3 root hub has no ports
[    1.777665] xhci-hcd fe9c0000.xhci: hcc params 0x0220fe65 hci version 0x110 quirks 0x0000000000010010
[    1.777844] xhci-hcd fe9c0000.xhci: irq 33, io mem 0xfe9c0000
[    1.778483] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.01
[    1.778571] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.778644] usb usb1: Product: xHCI Host Controller
[    1.778699] usb usb1: Manufacturer: Linux 6.1.32-v8+ xhci-hcd
[    1.778760] usb usb1: SerialNumber: fe9c0000.xhci
[    1.779519] hub 1-0:1.0: USB hub found
[    1.779628] hub 1-0:1.0: 1 port detected
[    1.780443] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    1.780835] dwc_otg: FIQ enabled
[    1.780847] dwc_otg: NAK holdoff enabled
[    1.780857] dwc_otg: FIQ split-transaction FSM enabled
[    1.780877] Module dwc_common_port init
[    1.781547] usbcore: registered new interface driver uas
[    1.781702] usbcore: registered new interface driver usb-storage
[    1.782045] mousedev: PS/2 mouse device common for all mice
[    1.788306] sdhci: Secure Digital Host Controller Interface driver
[    1.790541] sdhci: Copyright(c) Pierre Ossman
[    1.793262] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.798833] ledtrig-cpu: registered to indicate activity on CPUs
[    1.801383] hid: raw HID events driver (C) Jiri Kosina
[    1.803607] usbcore: registered new interface driver usbhid
[    1.805683] usbhid: USB HID core driver
[    1.807930] bcm2835_vchiq fe00b840.mailbox: there is not valid maps for state default
[    1.817385] NET: Registered PF_PACKET protocol family
[    1.819727] Key type dns_resolver registered
[    1.823412] registered taskstats version 1
[    1.825597] Loading compiled-in X.509 certificates
[    1.828483] Key type .fscrypt registered
[    1.830496] Key type fscrypt-provisioning registered
[    1.848560] uart-pl011 fe201000.serial: there is not valid maps for state default
[    1.851492] uart-pl011 fe201000.serial: cts_event_workaround enabled
[    1.853700] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 35, base_baud = 0) is a PL011 rev2
[    1.865811] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[    1.868377] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver
[    1.872043] mmc-bcm2835 fe300000.mmcnr: mmc_debug:0 mmc_debug2:0
[    1.874144] mmc-bcm2835 fe300000.mmcnr: DMA channel allocated
[    1.907202] of_cfs_init
[    1.909526] of_cfs_init: OK
[    1.945217] mmc0: SDHCI controller on fe340000.mmc [fe340000.mmc] using ADMA
[    1.947548] Waiting for root device PARTUUID=ac690725-02...
[    2.018399] mmc0: new DDR MMC card at address 0001
[    2.021763] mmcblk0: mmc0:0001 AJTD4R 14.6 GiB 
[    2.033181] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[    2.037233]  mmcblk0: p1 p2
[    2.044078] mmcblk0: mmc0:0001 AJTD4R 14.6 GiB
[    2.050848] mmcblk0boot0: mmc0:0001 AJTD4R 4.00 MiB 
[    2.058198] mmcblk0boot1: mmc0:0001 AJTD4R 4.00 MiB 
[    2.062399] mmcblk0rpmb: mmc0:0001 AJTD4R 4.00 MiB, chardev (242:0)
[    2.085783] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Quota mode: none.
[    2.087908] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    2.095333] devtmpfs: mounted
[    2.106527] Freeing unused kernel memory: 4160K
[    2.108732] Run /sbin/init as init process
[    2.110698]   with arguments:
[    2.110708]     /sbin/init
[    2.110719]   with environment:
[    2.110728]     HOME=/
[    2.110738]     TERM=linux
[    2.181469] usb 1-1: New USB device found, idVendor=0424, idProduct=2514, bcdDevice= b.b3
[    2.183603] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.226547] hub 1-1:1.0: USB hub found
[    2.228719] hub 1-1:1.0: 4 ports detected
[    2.335392] systemd[1]: System time before build time, advancing clock.
[    2.499709] NET: Registered PF_INET6 protocol family
[    2.503810] Segment Routing with IPv6
[    2.505908] In-situ OAM (IOAM) with IPv6
[    2.564239] systemd[1]: systemd 247.3-7+deb11u2 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +ZSTD +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=unified)
[    2.569822] systemd[1]: Detected architecture arm64.
[    2.585290] systemd[1]: Set hostname to <PTP>.
[    3.246832] systemd[1]: Queued start job for default target Multi-User System.
[    3.266958] systemd[1]: Created slice system-getty.slice.
[    3.273457] systemd[1]: Created slice system-modprobe.slice.
[    3.279194] systemd[1]: Created slice system-systemd\x2dfsck.slice.
[    3.284937] systemd[1]: Created slice User and Session Slice.
[    3.290388] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[    3.295576] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    3.301722] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[    3.307106] systemd[1]: Reached target Local Encrypted Volumes.
[    3.312272] systemd[1]: Reached target Paths.
[    3.317504] systemd[1]: Reached target Slices.
[    3.322598] systemd[1]: Reached target Swap.
[    3.327638] systemd[1]: Reached target System Time Set.
[    3.335362] systemd[1]: Listening on Syslog Socket.
[    3.341446] systemd[1]: Listening on fsck to fsckd communication Socket.
[    3.346828] systemd[1]: Listening on initctl Compatibility Named Pipe.
[    3.353407] systemd[1]: Listening on Journal Audit Socket.
[    3.359498] systemd[1]: Listening on Journal Socket (/dev/log).
[    3.365713] systemd[1]: Listening on Journal Socket.
[    3.372789] systemd[1]: Listening on udev Control Socket.
[    3.378904] systemd[1]: Listening on udev Kernel Socket.
[    3.385240] systemd[1]: Condition check resulted in Huge Pages File System being skipped.
[    3.409674] systemd[1]: Mounting POSIX Message Queue File System...
[    3.420214] systemd[1]: Mounting RPC Pipe File System...
[    3.431709] systemd[1]: Mounting Kernel Debug File System...
[    3.443512] systemd[1]: Mounting Kernel Trace File System...
[    3.449346] systemd[1]: Condition check resulted in Kernel Module supporting RPCSEC_GSS being skipped.
[    3.458066] systemd[1]: Starting Restore / save the current clock...
[    3.469203] systemd[1]: Starting Set the console keyboard layout...
[    3.481085] systemd[1]: Starting Create list of static device nodes for the current kernel...
[    3.494227] systemd[1]: Starting Load Kernel Module configfs...
[    3.508555] systemd[1]: Starting Load Kernel Module drm...
[    3.522971] systemd[1]: Starting Load Kernel Module fuse...
[    3.533693] systemd[1]: Condition check resulted in Set Up Additional Binary Formats being skipped.
[    3.539886] systemd[1]: Starting File System Check on Root Device...
[    3.556601] systemd[1]: Starting Journal Service...
[    3.587618] systemd[1]: Starting Load Kernel Modules...
[    3.614348] systemd[1]: Starting Coldplug All udev Devices...
[    3.615455] fuse: init (API version 7.37)
[    3.659417] systemd[1]: Mounted POSIX Message Queue File System.
[    3.666470] systemd[1]: Mounted RPC Pipe File System.
[    3.673231] systemd[1]: Mounted Kernel Debug File System.
[    3.679577] systemd[1]: Mounted Kernel Trace File System.
[    3.680315] i2c_dev: i2c /dev entries driver
[    3.690781] systemd[1]: Finished Restore / save the current clock.
[    3.699567] systemd[1]: Finished Create list of static device nodes for the current kernel.
[    3.708158] systemd[1]: modprobe@configfs.service: Succeeded.
[    3.712594] systemd[1]: Finished Load Kernel Module configfs.
[    3.721065] systemd[1]: modprobe@drm.service: Succeeded.
[    3.725833] systemd[1]: Finished Load Kernel Module drm.
[    3.733903] systemd[1]: modprobe@fuse.service: Succeeded.
[    3.738505] systemd[1]: Finished Load Kernel Module fuse.
[    3.746782] systemd[1]: Finished Load Kernel Modules.
[    3.781974] systemd[1]: Mounting FUSE Control File System...
[    3.806120] systemd[1]: Mounting Kernel Configuration File System...
[    3.824190] systemd[1]: Started File System Check Daemon to report status.
[    3.836043] systemd[1]: Starting Apply Kernel Variables...
[    3.849670] systemd[1]: Finished File System Check on Root Device.
[    3.861272] systemd[1]: Mounted FUSE Control File System.
[    3.867959] systemd[1]: Mounted Kernel Configuration File System.
[    3.878911] systemd[1]: Starting Remount Root and Kernel File Systems...
[    3.915635] systemd[1]: Finished Apply Kernel Variables.
[    3.964058] systemd[1]: Started Journal Service.
[    4.060617] EXT4-fs (mmcblk0p2): re-mounted. Quota mode: none.
[    4.146612] systemd-journald[149]: Received client request to flush runtime journal.
[    4.958908] mc: Linux media interface: v0.10
[    5.065491] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[    5.067564] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[    5.067604] [vc_sm_connected_init]: start
[    5.102119] [vc_sm_connected_init]: installed successfully
[    5.196024] videodev: Linux video capture interface: v2.00
[    5.243448] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[    5.272530] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[    5.276605] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[    5.278929] i2c i2c-22: Added multiplexed i2c bus 0
[    5.284244] i2c i2c-22: Added multiplexed i2c bus 10
[    5.305033] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[    5.317960] rpivid_hevc: module is from the staging directory, the quality is unknown, you have been warned.
[    5.327582] rpivid feb10000.codec: Device registered as /dev/video19
[    5.327776] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
[    5.336007] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[    5.354865] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video13
[    5.366993] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14
[    5.367747] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video15
[    5.368484] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video16
[    5.368540] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[    5.368563] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[    5.368595] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[    5.368613] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[    5.368801] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[    5.368862] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[    5.377821] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video20
[    5.379202] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video21
[    5.379835] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video22
[    5.383775] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video23
[    5.383837] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[    5.383876] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[    5.383895] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[    5.383915] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[    5.384441] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp
[    5.384903] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[    5.384960] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[    5.396909] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[    5.397016] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[    5.420650] bcm2835-codec bcm2835-codec: Device registered as /dev/video18
[    5.420747] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx
[    5.432310] bcm2835-codec bcm2835-codec: Device registered as /dev/video31
[    5.432400] bcm2835-codec bcm2835-codec: Loaded V4L2 encode_image
[    6.126535] 8021q: 802.1Q VLAN Support v1.8
[    6.367317] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    6.402242] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    6.410753] cfg80211: loaded regulatory.db is malformed or signature is missing/invalid
[    6.468279] Adding 102396k swap on /var/swap.  Priority:-2 extents:1 across:102396k SSFS
[    6.612751] rtc-pcf85063 10-0051: registered as rtc0
[    6.614195] rtc-pcf85063 10-0051: setting system clock to 2023-06-12T01:27:19 UTC (1686533239)
[    6.729601] could not attach to PHY
[    6.729622] bcmgenet fd580000.ethernet eth0: failed to connect to PHY

The ifconfig -a with the problem:

eth0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether dc:a6:32:ff:e3:d3  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 10  bytes 1552 (1.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 10  bytes 1552 (1.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

The ip addr with the problem:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether dc:a6:32:ff:e3:d3 brd ff:ff:ff:ff:ff:ff

To add something on above logs ^^ . The RJ45 leds on CM4 board are powered on and the ethernet cable connected.

The dmesg when not having this issue:

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd083]
[    0.000000] Linux version 6.1.32-v8+ (dom@buildbot) (aarch64-linux-gnu-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1656 SMP PREEMPT Wed Jun  7 11:37:17 BST 2023
[    0.000000] random: crng init done
[    0.000000] Machine model: Raspberry Pi Compute Module 4 Rev 1.0
[    0.000000] efi: UEFI not found.
[    0.000000] Reserved memory: created CMA memory pool at 0x000000002ac00000, size 64 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x000000003b3fffff]
[    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 0x0000000000000000-0x000000003b3fffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000003b3fffff]
[    0.000000] On node 0, zone DMA: 19456 pages in unavailable ranges
[    0.000000] percpu: Embedded 29 pages/cpu s78504 r8192 d32088 u118784
[    0.000000] pcpu-alloc: s78504 r8192 d32088 u118784 alloc=29*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Detected PIPT I-cache on CPU0
[    0.000000] CPU features: detected: Spectre-v2
[    0.000000] CPU features: detected: Spectre-v3a
[    0.000000] CPU features: detected: Spectre-v4
[    0.000000] CPU features: detected: Spectre-BHB
[    0.000000] CPU features: kernel page table isolation forced ON by KASLR
[    0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[    0.000000] CPU features: detected: ARM erratum 1742098
[    0.000000] CPU features: detected: ARM errata 1165522, 1319367, or 1530923
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 238896
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_headphones=0 bcm2708_fb.fbwidth=0 bcm2708_fb.fbheight=0 bcm2708_fb.fbswap=1 smsc95xx.macaddr=DC:A6:32:FF:E3:D3 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=tty1 root=PARTUUID=ac690725-02 rootfstype=ext4 fsck.repair=yes rootwait
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 861592K/970752K available (11776K kernel code, 2106K rwdata, 3692K rodata, 4160K init, 1077K bss, 43624K reserved, 65536K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 39776 entries in 156 pages
[    0.000000] ftrace: allocated 156 pages with 4 groups
[    0.000000] trace event string verifier disabled
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    0.000000]  Rude variant of Tasks RCU enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 timer(s) running at 54.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xc743ce346, max_idle_ns: 440795203123 ns
[    0.000001] sched_clock: 56 bits at 54MHz, resolution 18ns, wraps every 4398046511102ns
[    0.000319] Console: colour dummy device 80x25
[    0.000875] printk: console [tty1] enabled
[    0.000939] Calibrating delay loop (skipped), value calculated using timer frequency.. 108.00 BogoMIPS (lpj=216000)
[    0.000981] pid_max: default: 32768 minimum: 301
[    0.001128] LSM: Security Framework initializing
[    0.001326] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.001374] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.002680] cgroup: Disabling memory control group subsystem
[    0.005024] cblist_init_generic: Setting adjustable number of callback queues.
[    0.005062] cblist_init_generic: Setting shift to 2 and lim to 1.
[    0.005259] cblist_init_generic: Setting shift to 2 and lim to 1.
[    0.005455] cblist_init_generic: Setting shift to 2 and lim to 1.
[    0.005927] rcu: Hierarchical SRCU implementation.
[    0.005951] rcu:     Max phase no-delay instances is 1000.
[    0.007312] EFI services will not be available.
[    0.007921] smp: Bringing up secondary CPUs ...
[    0.009061] Detected PIPT I-cache on CPU1
[    0.009218] CPU1: Booted secondary processor 0x0000000001 [0x410fd083]
[    0.010397] Detected PIPT I-cache on CPU2
[    0.010517] CPU2: Booted secondary processor 0x0000000002 [0x410fd083]
[    0.011659] Detected PIPT I-cache on CPU3
[    0.011784] CPU3: Booted secondary processor 0x0000000003 [0x410fd083]
[    0.011955] smp: Brought up 1 node, 4 CPUs
[    0.012044] SMP: Total of 4 processors activated.
[    0.012065] CPU features: detected: 32-bit EL0 Support
[    0.012084] CPU features: detected: 32-bit EL1 Support
[    0.012106] CPU features: detected: CRC32 instructions
[    0.012251] CPU: All CPU(s) started at EL2
[    0.012286] alternatives: applying system-wide alternatives
[    0.014040] devtmpfs: initialized
[    0.026325] Enabled cp15_barrier support
[    0.026394] Enabled setend support
[    0.026627] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.026681] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.028683] pinctrl core: initialized pinctrl subsystem
[    0.029630] DMI not present or invalid.
[    0.030342] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.034096] DMA: preallocated 1024 KiB GFP_KERNEL pool for atomic allocations
[    0.034442] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.035456] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.035569] audit: initializing netlink subsys (disabled)
[    0.035860] audit: type=2000 audit(0.032:1): state=initialized audit_enabled=0 res=1
[    0.036525] thermal_sys: Registered thermal governor 'step_wise'
[    0.036617] cpuidle: using governor menu
[    0.036987] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.037203] ASID allocator initialised with 32768 entries
[    0.037390] Serial: AMBA PL011 UART driver
[    0.049322] bcm2835-mbox fe00b880.mailbox: mailbox enabled
[    0.064197] raspberrypi-firmware soc:firmware: Attached to firmware from 2023-04-25T18:26:03, variant start
[    0.068213] raspberrypi-firmware soc:firmware: Firmware hash is d7f9c2b4ef7e4a8c0b04374a879ce89d7a948453
[    0.083988] KASLR enabled
[    0.116154] bcm2835-dma fe007000.dma: DMA legacy API manager, dmachans=0x1
[    0.122045] SCSI subsystem initialized
[    0.122320] usbcore: registered new interface driver usbfs
[    0.122394] usbcore: registered new interface driver hub
[    0.122477] usbcore: registered new device driver usb
[    0.122842] usb_phy_generic phy: supply vcc not found, using dummy regulator
[    0.123085] usb_phy_generic phy: dummy supplies not allowed for exclusive requests
[    0.123452] pps_core: LinuxPPS API ver. 1 registered
[    0.123477] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.123520] PTP clock support registered
[    0.124679] vgaarb: loaded
[    0.125372] clocksource: Switched to clocksource arch_sys_counter
[    0.126455] VFS: Disk quotas dquot_6.6.0
[    0.126556] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.126764] FS-Cache: Loaded
[    0.126958] CacheFiles: Loaded
[    0.136404] NET: Registered PF_INET protocol family
[    0.136724] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.138807] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
[    0.138858] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.138902] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.138993] TCP bind hash table entries: 8192 (order: 6, 262144 bytes, linear)
[    0.139278] TCP: Hash tables configured (established 8192 bind 8192)
[    0.139492] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.139548] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.139774] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.140560] RPC: Registered named UNIX socket transport module.
[    0.140592] RPC: Registered udp transport module.
[    0.140612] RPC: Registered tcp transport module.
[    0.140632] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.140668] PCI: CLS 0 bytes, default 64
[    0.143317] hw perfevents: enabled with armv8_cortex_a72 PMU driver, 7 counters available
[    0.143740] kvm [1]: IPA Size Limit: 44 bits
[    0.145060] kvm [1]: vgic interrupt IRQ9
[    0.145314] kvm [1]: Hyp mode initialized successfully
[    1.277444] Initialise system trusted keyrings
[    1.277928] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[    1.285748] zbud: loaded
[    1.288688] NFS: Registering the id_resolver key type
[    1.288750] Key type id_resolver registered
[    1.288773] Key type id_legacy registered
[    1.288914] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.288944] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    1.290444] Key type asymmetric registered
[    1.290476] Asymmetric key parser 'x509' registered
[    1.290570] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    1.290850] io scheduler mq-deadline registered
[    1.290879] io scheduler kyber registered
[    1.300161] gpio-507 (ant1): hogged as output/high
[    1.301627] gpio-511 (ant2): hogged as output/low
[    1.303242] brcm-pcie fd500000.pcie: host bridge /scb/pcie@7d500000 ranges:
[    1.303294] brcm-pcie fd500000.pcie:   No bus range found for /scb/pcie@7d500000, using [bus 00-ff]
[    1.303402] brcm-pcie fd500000.pcie:      MEM 0x0600000000..0x063fffffff -> 0x00c0000000
[    1.303505] brcm-pcie fd500000.pcie:   IB MEM 0x0000000000..0x003fffffff -> 0x0400000000
[    1.304531] brcm-pcie fd500000.pcie: PCI host bridge to bus 0000:00
[    1.304565] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.304594] pci_bus 0000:00: root bus resource [mem 0x600000000-0x63fffffff] (bus address [0xc0000000-0xffffffff])
[    1.304688] pci 0000:00:00.0: [14e4:2711] type 01 class 0x060400
[    1.304967] pci 0000:00:00.0: PME# supported from D0 D3hot
[    1.308886] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.309164] pci_bus 0000:01: supply vpcie3v3 not found, using dummy regulator
[    1.309413] pci_bus 0000:01: supply vpcie3v3aux not found, using dummy regulator
[    1.309547] pci_bus 0000:01: supply vpcie12v not found, using dummy regulator
[    1.629395] brcm-pcie fd500000.pcie: link down
[    1.629559] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.629609] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.629721] pci_bus 0000:01: busn_res: [bus 01] is released
[    1.630587] pci_bus 0000:00: busn_res: [bus 00-ff] is released
[    1.631577] bcm2708_fb soc:fb: Unable to determine number of FBs. Disabling driver.
[    1.631610] bcm2708_fb: probe of soc:fb failed with error -2
[    1.641342] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    1.644486] iproc-rng200 fe104000.rng: hwrng registered
[    1.645004] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[    1.646769] gpiomem-bcm2835 fe200000.gpiomem: Initialised: Registers at 0xfe200000
[    1.660276] brd: module loaded
[    1.669222] loop: module loaded
[    1.670086] Loading iSCSI transport class v2.0-870.
[    1.675572] bcmgenet fd580000.ethernet: GENET 5.0 EPHY: 0x0000
[    1.737526] unimac-mdio unimac-mdio.-19: Broadcom UniMAC MDIO bus
[    1.738756] usbcore: registered new interface driver r8152
[    1.738858] usbcore: registered new interface driver lan78xx
[    1.738941] usbcore: registered new interface driver smsc95xx
[    1.765152] xhci-hcd fe9c0000.xhci: xHCI Host Controller
[    1.765200] xhci-hcd fe9c0000.xhci: new USB bus registered, assigned bus number 1
[    1.765574] xhci-hcd fe9c0000.xhci: USB3 root hub has no ports
[    1.765605] xhci-hcd fe9c0000.xhci: hcc params 0x0220fe65 hci version 0x110 quirks 0x0000000000010010
[    1.765713] xhci-hcd fe9c0000.xhci: irq 32, io mem 0xfe9c0000
[    1.766310] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.01
[    1.766347] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.766376] usb usb1: Product: xHCI Host Controller
[    1.766399] usb usb1: Manufacturer: Linux 6.1.32-v8+ xhci-hcd
[    1.766423] usb usb1: SerialNumber: fe9c0000.xhci
[    1.767134] hub 1-0:1.0: USB hub found
[    1.767215] hub 1-0:1.0: 1 port detected
[    1.767981] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    1.768322] dwc_otg: FIQ enabled
[    1.768334] dwc_otg: NAK holdoff enabled
[    1.768344] dwc_otg: FIQ split-transaction FSM enabled
[    1.768363] Module dwc_common_port init
[    1.768928] usbcore: registered new interface driver uas
[    1.769030] usbcore: registered new interface driver usb-storage
[    1.769282] mousedev: PS/2 mouse device common for all mice
[    1.775377] sdhci: Secure Digital Host Controller Interface driver
[    1.775413] sdhci: Copyright(c) Pierre Ossman
[    1.776035] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.779652] ledtrig-cpu: registered to indicate activity on CPUs
[    1.780037] hid: raw HID events driver (C) Jiri Kosina
[    1.780268] usbcore: registered new interface driver usbhid
[    1.780294] usbhid: USB HID core driver
[    1.780537] bcm2835_vchiq fe00b840.mailbox: there is not valid maps for state default
[    1.790306] NET: Registered PF_PACKET protocol family
[    1.790450] Key type dns_resolver registered
[    1.791773] registered taskstats version 1
[    1.791870] Loading compiled-in X.509 certificates
[    1.792789] Key type .fscrypt registered
[    1.792816] Key type fscrypt-provisioning registered
[    1.808521] uart-pl011 fe201000.serial: there is not valid maps for state default
[    1.809413] uart-pl011 fe201000.serial: cts_event_workaround enabled
[    1.809591] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 34, base_baud = 0) is a PL011 rev2
[    1.819444] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[    1.819931] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver
[    1.821494] mmc-bcm2835 fe300000.mmcnr: mmc_debug:0 mmc_debug2:0
[    1.821527] mmc-bcm2835 fe300000.mmcnr: DMA channel allocated
[    1.848555] of_cfs_init
[    1.848715] of_cfs_init: OK
[    1.888116] mmc0: SDHCI controller on fe340000.mmc [fe340000.mmc] using ADMA
[    1.888464] Waiting for root device PARTUUID=ac690725-02...
[    1.967461] mmc0: new DDR MMC card at address 0001
[    1.972519] mmcblk0: mmc0:0001 AJTD4R 14.6 GiB 
[    1.983427]  mmcblk0: p1 p2
[    1.986100] mmcblk0: mmc0:0001 AJTD4R 14.6 GiB
[    1.986722] mmcblk0boot0: mmc0:0001 AJTD4R 4.00 MiB 
[    1.989233] mmcblk0boot1: mmc0:0001 AJTD4R 4.00 MiB 
[    1.991411] mmcblk0rpmb: mmc0:0001 AJTD4R 4.00 MiB, chardev (242:0)
[    2.004199] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Quota mode: none.
[    2.004326] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    2.007805] devtmpfs: mounted
[    2.016842] Freeing unused kernel memory: 4160K
[    2.017062] Run /sbin/init as init process
[    2.017084]   with arguments:
[    2.017094]     /sbin/init
[    2.017104]   with environment:
[    2.017113]     HOME=/
[    2.017123]     TERM=linux
[    2.021418] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[    2.169684] usb 1-1: New USB device found, idVendor=0424, idProduct=2514, bcdDevice= b.b3
[    2.169747] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.214352] hub 1-1:1.0: USB hub found
[    2.214479] hub 1-1:1.0: 4 ports detected
[    2.248774] systemd[1]: System time before build time, advancing clock.
[    2.412155] NET: Registered PF_INET6 protocol family
[    2.414090] Segment Routing with IPv6
[    2.414162] In-situ OAM (IOAM) with IPv6
[    2.469901] systemd[1]: systemd 247.3-7+deb11u2 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +ZSTD +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=unified)
[    2.470977] systemd[1]: Detected architecture arm64.
[    2.477948] systemd[1]: Set hostname to <PTP>.
[    3.147088] systemd[1]: Queued start job for default target Multi-User System.
[    3.167062] systemd[1]: Created slice system-getty.slice.
[    3.168807] systemd[1]: Created slice system-modprobe.slice.
[    3.170229] systemd[1]: Created slice system-systemd\x2dfsck.slice.
[    3.171391] systemd[1]: Created slice User and Session Slice.
[    3.172207] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[    3.173011] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    3.174511] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[    3.175059] systemd[1]: Reached target Local Encrypted Volumes.
[    3.175555] systemd[1]: Reached target Paths.
[    3.175976] systemd[1]: Reached target Slices.
[    3.176375] systemd[1]: Reached target Swap.
[    3.176762] systemd[1]: Reached target System Time Set.
[    3.179738] systemd[1]: Listening on Syslog Socket.
[    3.181006] systemd[1]: Listening on fsck to fsckd communication Socket.
[    3.181813] systemd[1]: Listening on initctl Compatibility Named Pipe.
[    3.183407] systemd[1]: Listening on Journal Audit Socket.
[    3.184512] systemd[1]: Listening on Journal Socket (/dev/log).
[    3.185847] systemd[1]: Listening on Journal Socket.
[    3.187830] systemd[1]: Listening on udev Control Socket.
[    3.188977] systemd[1]: Listening on udev Kernel Socket.
[    3.190367] systemd[1]: Condition check resulted in Huge Pages File System being skipped.
[    3.213884] systemd[1]: Mounting POSIX Message Queue File System...
[    3.219311] systemd[1]: Mounting RPC Pipe File System...
[    3.225722] systemd[1]: Mounting Kernel Debug File System...
[    3.232339] systemd[1]: Mounting Kernel Trace File System...
[    3.233611] systemd[1]: Condition check resulted in Kernel Module supporting RPCSEC_GSS being skipped.
[    3.242198] systemd[1]: Starting Restore / save the current clock...
[    3.248541] systemd[1]: Starting Set the console keyboard layout...
[    3.254631] systemd[1]: Starting Create list of static device nodes for the current kernel...
[    3.261017] systemd[1]: Starting Load Kernel Module configfs...
[    3.267405] systemd[1]: Starting Load Kernel Module drm...
[    3.273882] systemd[1]: Starting Load Kernel Module fuse...
[    3.281267] systemd[1]: Condition check resulted in Set Up Additional Binary Formats being skipped.
[    3.287074] systemd[1]: Starting File System Check on Root Device...
[    3.297989] systemd[1]: Starting Journal Service...
[    3.310274] systemd[1]: Starting Load Kernel Modules...
[    3.337193] fuse: init (API version 7.37)
[    3.348418] systemd[1]: Starting Coldplug All udev Devices...
[    3.362948] systemd[1]: Mounted POSIX Message Queue File System.
[    3.364168] systemd[1]: Mounted RPC Pipe File System.
[    3.365279] systemd[1]: Mounted Kernel Debug File System.
[    3.366589] systemd[1]: Mounted Kernel Trace File System.
[    3.369254] systemd[1]: Finished Restore / save the current clock.
[    3.372441] systemd[1]: Finished Create list of static device nodes for the current kernel.
[    3.376145] systemd[1]: modprobe@configfs.service: Succeeded.
[    3.382931] systemd[1]: Finished Load Kernel Module configfs.
[    3.385677] systemd[1]: modprobe@fuse.service: Succeeded.
[    3.387239] systemd[1]: Finished Load Kernel Module fuse.
[    3.402389] i2c_dev: i2c /dev entries driver
[    3.430334] systemd[1]: Mounting FUSE Control File System...
[    3.454792] systemd[1]: Mounting Kernel Configuration File System...
[    3.479506] systemd[1]: Started File System Check Daemon to report status.
[    3.496497] systemd[1]: modprobe@drm.service: Succeeded.
[    3.498086] systemd[1]: Finished Load Kernel Module drm.
[    3.500993] systemd[1]: Finished File System Check on Root Device.
[    3.503594] systemd[1]: Finished Load Kernel Modules.
[    3.504909] systemd[1]: Mounted FUSE Control File System.
[    3.518142] systemd[1]: Mounted Kernel Configuration File System.
[    3.538244] systemd[1]: Starting Remount Root and Kernel File Systems...
[    3.543441] systemd[1]: Starting Apply Kernel Variables...
[    3.647737] systemd[1]: Started Journal Service.
[    3.711198] EXT4-fs (mmcblk0p2): re-mounted. Quota mode: none.
[    3.818846] systemd-journald[146]: Received client request to flush runtime journal.
[    4.685965] mc: Linux media interface: v0.10
[    4.801197] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[    4.803329] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[    4.803364] [vc_sm_connected_init]: start
[    4.804363] [vc_sm_connected_init]: installed successfully
[    4.808666] videodev: Linux video capture interface: v2.00
[    4.877130] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[    4.879997] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[    4.904268] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
[    4.906371] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[    4.911894] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[    4.916089] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[    4.916162] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[    4.916550] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video13
[    4.921490] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14
[    4.922574] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video15
[    4.927652] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video16
[    4.927703] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[    4.927727] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[    4.927870] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[    4.927895] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[    4.936941] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[    4.937008] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[    4.955374] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video20
[    4.956854] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video21
[    4.959963] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video22
[    4.960639] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video23
[    4.960680] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[    4.960702] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[    4.960733] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[    4.960751] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[    4.961153] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp
[    4.963907] rpivid_hevc: module is from the staging directory, the quality is unknown, you have been warned.
[    4.978470] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[    4.978550] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[    4.984066] bcm2835-codec bcm2835-codec: Device registered as /dev/video18
[    4.984127] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx
[    4.988437] bcm2835-codec bcm2835-codec: Device registered as /dev/video31
[    4.988490] bcm2835-codec bcm2835-codec: Loaded V4L2 encode_image
[    4.999772] i2c i2c-22: Added multiplexed i2c bus 0
[    5.010657] i2c i2c-22: Added multiplexed i2c bus 10
[    5.035946] rpivid feb10000.codec: Device registered as /dev/video19
[    5.724641] 8021q: 802.1Q VLAN Support v1.8
[    6.003702] Adding 102396k swap on /var/swap.  Priority:-2 extents:1 across:102396k SSFS
[    6.087798] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    6.108584] rtc-pcf85063 10-0051: registered as rtc0
[    6.109622] rtc-pcf85063 10-0051: setting system clock to 2023-06-12T01:46:45 UTC (1686534405)
[    6.128862] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    6.134049] cfg80211: loaded regulatory.db is malformed or signature is missing/invalid
[    6.259839] bcmgenet fd580000.ethernet: configuring instance for external RGMII (RX delay)
[    6.261174] bcmgenet fd580000.ethernet eth0: Link is Down
[   14.429644] bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   14.429714] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   14.545940] uart-pl011 fe201000.serial: no DMA platform data

The ifconfig -a without this issue:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.88.185  netmask 255.255.255.0  broadcast 192.168.88.255
        inet6 fe80::a6fe:c21d:f2e9:afd5  prefixlen 64  scopeid 0x20<link>
        ether dc:a6:32:ff:e3:d3  txqueuelen 1000  (Ethernet)
        RX packets 1242  bytes 112451 (109.8 KiB)
        RX errors 0  dropped 1  overruns 0  frame 0
        TX packets 9783  bytes 1107638 (1.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 10  bytes 1552 (1.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 10  bytes 1552 (1.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

The ip addr without having this issue:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether dc:a6:32:ff:e3:d3 brd ff:ff:ff:ff:ff:ff
    inet 192.168.88.185/24 brd 192.168.88.255 scope global dynamic noprefixroute eth0
       valid_lft 310sec preferred_lft 235sec
    inet6 fe80::a6fe:c21d:f2e9:afd5/64 scope link 
       valid_lft forever preferred_lft forever

To say something more. I have done an rpi-update for the latest kernel and also I have upload the latest eeprom (pieeprom-2023-05-11.bin) for testing with the same results.

Regards

pelwell commented 1 year ago
  1. What kind of display is attached?

  2. Apart from the first log being from a system with no Ethernet connectivity and the second being from when it works, were there any other expected differences? I ask because the first log shows it detecting a display, while the second one does not detect a display.

  3. How is the CM4/CM4IO combination being powered? One could imagine that with a marginal power supply sometimes it affects one subsystem (Ethernet PHY) and sometimes another (display)?

JN19aban commented 1 year ago

Hi,

I attach an Eizo HDMI monitor for the purpose of the test,it has its own PSU. The system run headless on normal operation. Correct on the first log file I have connect the monitor so I can take the log files because of no SSH possible. On the second log I have disconnected the monitor.

Nothing more attached to the system except the monitor and one keyboard for the test.

It is powered on by a PSU 12v 5amp. Also I have tried other with the same result.

This system is only running headless on normal operation. Connected to it power and Ethernet only, nothing more.

I have tried different switches (Cisco SG350, SG300,3750x) Extreme networks (48 SI) and different cables, even I have put everything on online type of UPS for clean power and the same it does on all occasions.

Also to say something more. Because this CM4 I have for a long time only worked correct with 5.10.xx kernel. After the upgrade to 5.15.xx and 6.1.xx this symptom is going more and more worse.

With this one I have total 13 CM4 all identical bought on the same day and all running headless. All 12 are still running 5.10.xxx kernel with no issues, nothing, and I am afraid to upgrade due to the current problem. The last CM4 is for testing and have this issue. It is not the power supply on this. Something else maybe.

The only strange I am seeing as I said on previous comment is that when is going to happen this the led on RJ45 is not going to the sequence turn off and on. Also the power led not going on this sequence turn off and on on reboot.

Almost the same thing I had with an RPI 4 model b v1.2 which when doing reboot not turn off the power led and stuck on booting process. This was doing with 5.15.3x kernel but after 5.15.5x it was fixed probably and never done that before. On every reboot the power led follows the sequence correct turn off and then on.

Regards.

pelwell commented 1 year ago
  1. What is the approximate frequency of the network failure? I have a CM4 rebooting happily with no problems bringing up eth0.

  2. What does vcgencmd bootloader_version report?

JN19aban commented 1 year ago

HI,

vcgencmd bootloader_version

2023/05/11 07:26:03 version 4fd8f1f3f7a05f7756edb1d3f15ffd7e428981f5 (release) timestamp 1683786363 update-time 1686483721 capabilities 0x0000007f

The approximate frequency of the network failure is not standard. Sometimes you have to reboot 2 times to have the issue, other you have to do 10 and more. Also become more rare the eth0 loss if you the CM4 has very big runtime, example months. This happens only on reboot and never on cold boot (power on from off state). The only thing that I am noticing is when is about to loss the network on reboot the power led not turn off and the led on RJ45 not following the procedure turn off and then on is always turn on. I have upload the latest eeprom for testing purposes and in case it fix this.

Also I have new spare official boards which I have test it with them and do the same thing.

To mention something I do not know if it is will help. For some time I was be using Dietpi ARM64 version which very rare had this issue (5.15.xx kernel and always on stable eeprom). When I come back to official Raspbian 64bit it becomes more and more worse. I forced to go there to this distro because of the very rare eth0 loss.

Regards.

pelwell commented 1 year ago

@dp111 Do you have any ideas what could prevent the PWR LED from switching off during a reboot? Is it purely under programmatic control of the GPIO expander?

pelwell commented 1 year ago

I've not been able to reproduce the issue after more than 24 hours of reboot loops on CM4s with both flavours of PMIC.

JN19aban commented 1 year ago

Then if you have test it for 24 hours of reboots, then I might have a defective CM4 probably. From the rest 12 CM4's (which all are on the same branch) I will take one and clone as the "defective" one and I hope that the issue stay on the "defective" one. I will respond back.

Regards.

JN19aban commented 1 year ago

Hi,

Sorry for the late response, my CM4 are on remote locations.

So from the 13 in total I own, the three I have tested with 6.1.32 -.34 -.36 kernel have the same issue. On reboot sometimes the eth0 is not working.

All are with default installation method via Raspberry pi imager. The only thing I have enabled is the serial. And without enabling the serial it does the same thing.

Is there anything else I can check for log files?

Best regards.

JN19aban commented 1 year ago

Hi,

I have yesterday install the 5.10.y kernel on the three CM4 that have the ethernet issue and works completely fine.

So there must be an issue with old revisions of CM4 with the PHY and new kernels. I hope that somehow can be resolved this.

Regards.

efriel94 commented 11 months ago

Hi @JN19aban, how did you build the 5.10 kernel as I have the same issue? Did you clone it and build it directly on the board or cross compile it? Could you provide build instructions as there isn't on the 5.10 branch? thanks

ddrinka commented 8 months ago

My experience with this issue is that when an ethernet cable is attached I can reboot the CM4 indefinitely and continuously experience the issue as described. Unplugging the ethernet cable seems to result in a working boot.

The early indication about whether the PHY will function or not is the following message:

mdio_bus unimac-mdio--19: MDIO device at address 0 is missing.
ddivins commented 4 months ago

I think I had the same problem. Everything was working fine and then I started to lose eth0 on reboot. In my case this device is using the Official IO Board with a POE Hat. While powered from POE, I added an external Power supply. Thats when things started to have issues. I disabled POE at the switch and reset the CM4, and everything returned and seems to be ok. I will keep an eye on it, but wanted to see if maybe POE was involved in this case,