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
10.86k stars 4.89k forks source link

Ethernet sometimes fails to start (no carrier) on Raspberry Pi 4 on kernel 4.19.66-v7l+ #3195

Open ralphrmartin opened 4 years ago

ralphrmartin commented 4 years ago

Is this the right place for my bug report? I believe so, unless I just have some kind of hardware issue...

Describe the bug Ethernet sometimes fails to start (no carrier) on Raspberry Pi 4 on kernel 4.19.66-v7l+

To reproduce Reboot. RPi 4 is connected via Ethernet to an EdgeRouter X

Expected behaviour Ethernet should start early in the boot.

Actual behaviour Sometimes ethernet starts OK. Other times it fails as follows: Aug 31 10:47:32 www kernel: bcmgenet fd580000.genet: failed to get enet clock Aug 31 10:47:32 www kernel: bcmgenet fd580000.genet: GENET 5.0 EPHY: 0x0000 Aug 31 10:47:32 www kernel: bcmgenet fd580000.genet: failed to get enet-wol clock Aug 31 10:47:32 www kernel: bcmgenet fd580000.genet: failed to get enet-eee clock Aug 31 10:47:32 www kernel: bcmgenet: Skipping UMAC reset

It may or may not then find the carrier later in the boot. (in example below, it did). If not, there is no network on reaching the CLI Even if it does, various services may not be working properly due to lack of networking when starting up.

System System Information

Raspberry Pi 4 Model B Rev 1.1 PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)"

Raspberry Pi reference 2014-06-20 (armhf) Generated using spindle, http://asbradbury.org/projects/spindle/, 8fe9fd4, stage4-lxde-edu.qed

Linux www 4.19.66-v7l+ #1253 SMP Thu Aug 15 12:02:08 BST 2019 armv7l GNU/Linux Hardware : BCM2835 Revision : a03111 Serial : 10000000ce7d1e34 Throttled flag : throttled=0x0 Camera : supported=1 detected=0

Videocore information

Aug 15 2019 12:05:53 Copyright (c) 2012 Broadcom version 9f8431fb7839c7f00f52b81f5822ddab2b31d0db (clean) (release) (start_x)

alloc failures: 0 compactions: 0 legacy block fails: 0

Filesystem information

Filesystem 1K-blocks Used Available Use% Mounted on /dev/root 960092932 158847672 752405496 18% / devtmpfs 439796 0 439796 0% /dev tmpfs 473588 0 473588 0% /dev/shm tmpfs 473588 15356 458232 4% /run tmpfs 5120 0 5120 0% /run/lock tmpfs 473588 0 473588 0% /sys/fs/cgroup /dev/mmcblk0p1 15637504 49184 15588320 1% /boot tmpfs 94716 0 94716 0% /run/user/1000

Filename Type Size Used Priority /var/swap file 1912828 0 -2

Package version information

raspberrypi-ui-mods: Installed: 1.20190717 raspberrypi-sys-mods: Installed: 20190730 openbox: Installed: 3.6.1-8+rpt2 lxpanel: Installed: 0.10.0-2+rpt6 pcmanfm: Installed: 1.3.1-1+rpt8 rpd-plym-splash: Installed: 0.19

Networking Information

/usr/bin/raspinfo: line 67: ifconfig: command not found Relevant output from ip addr is

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether dc:a6:32:03:f7:50 brd ff:ff:ff:ff:ff:ff

USB Information

/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M | Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M | Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M | Port 2: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M | Port 1: Dev 4, If 0, Class=Mass Storage, Driver=uas, 480M | Port 4: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M | Port 2: Dev 6, If 0, Class=Hub, Driver=hub/3p, 480M | Port 3: Dev 8, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M | Port 2: Dev 7, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M |__ Port 2: Dev 7, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M

config.txt

arm_freq=1500 audio_pwm_mode=514 config_hdmi_boost=5 core_freq=500 core_freq_min=250 disable_camera_led=1 disable_commandline_tags=2 disable_l2cache=1 display_hdmi_rotate=-1 display_lcd_rotate=-1 enable_gic=1 enable_uart=1 force_eeprom_read=1 force_pwm_open=1 framebuffer_ignore_alpha=1 framebuffer_swap=1 gpu_freq=500 gpu_freq_min=500 init_uart_clock=0x2dc6c00 lcd_framerate=60 pause_burst_frames=1 program_serial_random=1 hdmi_force_cec_address:0=65535 hdmi_force_cec_address:1=65535 hdmi_group:0=2 hdmi_mode:0=16 hdmi_pixel_freq_limit:0=0x11e1a300 hdmi_pixel_freq_limit:1=0x11e1a300 device_tree=- hdmi_cvt:0= hdmi_cvt:1= hdmi_edid_filename:0= hdmi_edid_filename:1= hdmi_timings:0= hdmi_timings:1=

cmdline.txt

coherent_pool=1M 8250.nr_uarts=1 cma=64M bcm2708_fb.fbwidth=1280 bcm2708_fb.fbheight=1024 bcm2708_fb.fbswap=1 smsc95xx.macaddr=DC:A6:32:03:F7:50 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/sda2 rootfstype=ext4 fsck.repair=yes elevator=deadline rootwait net.ifnames=0

raspi-gpio settings

BANK0 (GPIO 0 to 27): GPIO 0: level=1 fsel=0 func=INPUT pull=UP GPIO 1: level=1 fsel=0 func=INPUT pull=UP GPIO 2: level=1 fsel=4 alt=0 func=SDA1 pull=UP GPIO 3: level=1 fsel=4 alt=0 func=SCL1 pull=UP GPIO 4: level=1 fsel=0 func=INPUT pull=UP GPIO 5: level=1 fsel=0 func=INPUT pull=UP GPIO 6: level=1 fsel=0 func=INPUT pull=UP GPIO 7: level=1 fsel=0 func=INPUT pull=UP GPIO 8: level=1 fsel=0 func=INPUT pull=UP GPIO 9: level=0 fsel=0 func=INPUT pull=DOWN GPIO 10: level=0 fsel=0 func=INPUT pull=DOWN GPIO 11: level=0 fsel=0 func=INPUT pull=DOWN GPIO 12: level=0 fsel=0 func=INPUT pull=DOWN GPIO 13: level=0 fsel=0 func=INPUT pull=DOWN GPIO 14: level=1 fsel=4 alt=0 func=TXD0 pull=NONE GPIO 15: level=1 fsel=4 alt=0 func=RXD0 pull=UP GPIO 16: level=0 fsel=0 func=INPUT pull=DOWN GPIO 17: level=0 fsel=0 func=INPUT pull=DOWN GPIO 18: level=0 fsel=0 func=INPUT pull=DOWN GPIO 19: level=0 fsel=0 func=INPUT pull=DOWN GPIO 20: level=0 fsel=0 func=INPUT pull=DOWN GPIO 21: level=0 fsel=0 func=INPUT pull=DOWN GPIO 22: level=0 fsel=0 func=INPUT pull=DOWN GPIO 23: level=0 fsel=0 func=INPUT pull=DOWN GPIO 24: level=0 fsel=0 func=INPUT pull=DOWN GPIO 25: level=0 fsel=0 func=INPUT pull=DOWN GPIO 26: level=0 fsel=0 func=INPUT pull=DOWN GPIO 27: level=0 fsel=0 func=INPUT pull=DOWN BANK1 (GPIO 28 to 45): GPIO 28: level=1 fsel=2 alt=5 func=RGMII_MDIO pull=UP GPIO 29: level=0 fsel=2 alt=5 func=RGMII_MDC pull=DOWN GPIO 30: level=1 fsel=0 func=INPUT pull=DOWN GPIO 31: level=1 fsel=0 func=INPUT pull=DOWN GPIO 32: level=1 fsel=0 func=INPUT pull=DOWN GPIO 33: level=1 fsel=0 func=INPUT pull=DOWN GPIO 34: level=1 fsel=0 func=INPUT pull=UP GPIO 35: level=1 fsel=0 func=INPUT pull=UP GPIO 36: level=1 fsel=0 func=INPUT pull=UP GPIO 37: level=1 fsel=0 func=INPUT pull=UP GPIO 38: level=1 fsel=0 func=INPUT pull=UP GPIO 39: level=1 fsel=0 func=INPUT pull=UP GPIO 40: level=0 fsel=4 alt=0 func=PWM1_0 pull=NONE GPIO 41: level=0 fsel=4 alt=0 func=PWM1_1 pull=NONE GPIO 42: level=0 fsel=1 func=OUTPUT pull=UP GPIO 43: level=1 fsel=0 func=INPUT pull=UP GPIO 44: level=1 fsel=5 alt=1 func=SDA0 pull=UP GPIO 45: level=1 fsel=5 alt=1 func=SCL0 pull=UP BANK2 (GPIO 46 to 53): GPIO 46: level=0 fsel=0 func=INPUT pull=DOWN GPIO 47: level=0 fsel=0 func=INPUT pull=DOWN GPIO 48: level=0 fsel=0 func=INPUT pull=DOWN GPIO 49: level=0 fsel=0 func=INPUT pull=DOWN GPIO 50: level=0 fsel=0 func=INPUT pull=DOWN GPIO 51: level=0 fsel=0 func=INPUT pull=DOWN GPIO 52: level=0 fsel=0 func=INPUT pull=DOWN GPIO 53: level=0 fsel=0 func=INPUT pull=DOWN

vcdbg log messages

002255.713: arasan: arasan_emmc_open 002257.903: arasan: arasan_emmc_set_clock C0: 0x00000000 C1: 0x000ef447 emmc: 200000000 actual: 200000 div: 0x000001f4 target: 200000 min: 100000 max: 400000 delay: 10 002374.653: arasan: arasan_emmc_set_clock C0: 0x00000000 C1: 0x000ef447 emmc: 200000000 actual: 200000 div: 0x000001f4 target: 200000 min: 100000 max: 400000 delay: 10 002381.808: arasan: arasan_emmc_set_clock C0: 0x00000f00 C1: 0x000e01c7 emmc: 200000000 actual: 130039 div: 0x00000301 target: 130000 min: 100000 max: 400000 delay: 15 002422.833: arasan: arasan_emmc_set_clock C0: 0x00000f06 C1: 0x000e0307 emmc: 200000000 actual: 33333333 div: 0x00000003 target: 40000000 min: 0 max: 40000000 delay: 1 002701.053: brfs: File read: /mfs/sd/config.txt 002701.723: brfs: File read: 1473 bytes 002731.619: bootloader_eeprom_find_files unexpected length: 0xffffffffn 002741.657: brfs: File read: /mfs/sd/config.txt 002942.208: gpioman: gpioman_get_pin_num: pin DISPLAY_DSI_PORT not defined 002944.678: *** Restart logging 002944.716: brfs: File read: 1473 bytes 002948.532: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead 002965.759: HDMI0: hdmi_pixel_encoding: 300000000

002965.773: HDMI1: hdmi_pixel_encoding: 300000000

002966.750: brfs: File read: /mfs/sd/cmdline.txt 002966.819: Read command line from file 'cmdline.txt': 002966.858: 'dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/sda2 rootfstype=ext4 fsck.repair=yes elevator=deadline rootwait net.ifnames=0' 002967.141: brfs: File read: 144 bytes 003552.609: brfs: File read: /mfs/sd/kernel7l.img 003552.679: Loading 'kernel7l.img' to 0x8000 size 0x55d880 003557.087: No kernel trailer - assuming DT-capable 003557.174: brfs: File read: 5625984 bytes 003565.718: brfs: File read: /mfs/sd/bcm2711-rpi-4-b.dtb 003565.788: Loading 'bcm2711-rpi-4-b.dtb' to 0x565880 size 0x9e6f 003867.074: brfs: File read: 40559 bytes 003869.907: brfs: File read: /mfs/sd/config.txt 003870.466: dtparam: spi=off 003899.230: dtparam: i2c_arm=on 003930.393: brfs: File read: 1473 bytes 003941.072: brfs: File read: /mfs/sd/overlays/i2c-rtc.dtbo 003972.367: Loaded overlay 'i2c-rtc' 003972.425: dtparam: ds1307=true 004024.002: brfs: File read: 4520 bytes 004039.781: brfs: File read: /mfs/sd/overlays/pi3-disable-wifi.dtbo 004071.946: Loaded overlay 'pi3-disable-wifi' 004121.339: brfs: File read: 387 bytes 004137.741: brfs: File read: /mfs/sd/overlays/pi3-disable-bt.dtbo 004178.800: Loaded overlay 'pi3-disable-bt' 005528.972: Device tree loaded to 0x2eff5d00 (size 0xa2b6) 005531.592: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined 006993.823: vchiq_core: vchiq_init_state: slot_zero = 0xf7580000, is_master = 1 006999.143: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead 007005.459: TV service:host side not connected, dropping notification 0x00000002, 0x00000002, 0x00000023 011936.878: camsubs: Looking for camera 0: i2c_port = 0, led gpio = -1, power enable gpio = 133 012237.651: camsubs: Camera not found 012237.733: camsubs: Looking for camera 0: i2c_port = 0, led gpio = -1, power enable gpio = 133 012538.495: camsubs: Camera not found 012538.576: camsubs: Looking for camera 0: i2c_port = 0, led gpio = -1, power enable gpio = 133 012539.345: camsubs: Camera not found 012539.425: camsubs: Looking for camera 0: i2c_port = 0, led gpio = -1, power enable gpio = 133 012540.181: camsubs: Camera not found 012540.261: camsubs: Looking for camera 0: i2c_port = 0, led gpio = -1, power enable gpio = 133 012541.016: camsubs: Camera not found

dmesg log

[ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.19.66-v7l+ (dom@buildbot) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1253 SMP Thu Aug 15 12:02:08 BST 2019 [ 0.000000] CPU: ARMv7 Processor [410fd083] revision 3 (ARMv7), cr=30c5383d [ 0.000000] CPU: div instructions available: patching division code [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache [ 0.000000] OF: fdt: Machine model: Raspberry Pi 4 Model B Rev 1.1 [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] cma: Reserved 64 MiB at 0x0000000037400000 [ 0.000000] On node 0 totalpages: 242688 [ 0.000000] DMA zone: 1728 pages used for memmap [ 0.000000] DMA zone: 0 pages reserved [ 0.000000] DMA zone: 196608 pages, LIFO batch:63 [ 0.000000] HighMem zone: 46080 pages, LIFO batch:15 [ 0.000000] random: get_random_bytes called from start_kernel+0xc0/0x4e8 with crng_init=0 [ 0.000000] percpu: Embedded 17 pages/cpu s39488 r8192 d21952 u69632 [ 0.000000] pcpu-alloc: s39488 r8192 d21952 u69632 alloc=17*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 240960 [ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 cma=64M bcm2708_fb.fbwidth=1280 bcm2708_fb.fbheight=1024 bcm2708_fb.fbswap=1 smsc95xx.macaddr=m.m.m.m vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/sda2 rootfstype=ext4 fsck.repair=yes elevator=deadline rootwait net.ifnames=0 [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes) [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0.000000] Memory: 879592K/970752K available (8192K kernel code, 661K rwdata, 2348K rodata, 2048K init, 850K bss, 25624K reserved, 65536K cma-reserved, 118784K highmem) [ 0.000000] Virtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xffc00000 - 0xfff00000 (3072 kB) vmalloc : 0xf0800000 - 0xff800000 ( 240 MB) lowmem : 0xc0000000 - 0xf0000000 ( 768 MB) pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) modules : 0xbf000000 - 0xbfe00000 ( 14 MB) .text : 0x(ptrval) - 0x(ptrval) (10208 kB) .init : 0x(ptrval) - 0x(ptrval) (2048 kB) .data : 0x(ptrval) - 0x(ptrval) ( 662 kB) .bss : 0x(ptrval) - 0x(ptrval) ( 851 kB) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 [ 0.000000] ftrace: allocating 28118 entries in 83 pages [ 0.000000] rcu: Hierarchical RCU implementation. [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] GIC: Using split EOI/Deactivate mode [ 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.000005] sched_clock: 56 bits at 54MHz, resolution 18ns, wraps every 4398046511102ns [ 0.000021] Switching to timer-based delay loop, resolution 18ns [ 0.000246] Console: colour dummy device 80x30 [ 0.000713] console [tty1] enabled [ 0.000769] Calibrating delay loop (skipped), value calculated using timer frequency.. 108.00 BogoMIPS (lpj=540000) [ 0.000811] pid_max: default: 32768 minimum: 301 [ 0.001084] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.001117] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.001882] CPU: Testing write buffer coherency: ok [ 0.002297] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.002946] Setting up static identity map for 0x200000 - 0x20003c [ 0.003118] rcu: Hierarchical SRCU implementation. [ 0.003986] smp: Bringing up secondary CPUs ... [ 0.004788] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 [ 0.005708] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002 [ 0.006580] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003 [ 0.006714] smp: Brought up 1 node, 4 CPUs [ 0.006780] SMP: Total of 4 processors activated (432.00 BogoMIPS). [ 0.006803] CPU: All CPU(s) started in HYP mode. [ 0.006824] CPU: Virtualization extensions available. [ 0.007613] devtmpfs: initialized [ 0.017832] VFP support v0.3: implementor 41 architecture 3 part 40 variant 8 rev 0 [ 0.018061] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.018102] futex hash table entries: 1024 (order: 4, 65536 bytes) [ 0.020086] pinctrl core: initialized pinctrl subsystem [ 0.020901] NET: Registered protocol family 16 [ 0.023881] DMA: preallocated 1024 KiB pool for atomic coherent allocations [ 0.025301] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers. [ 0.025334] hw-breakpoint: maximum watchpoint size is 8 bytes. [ 0.025535] Serial: AMBA PL011 UART driver [ 0.028452] bcm2835-mbox fe00b880.mailbox: mailbox enabled [ 0.063544] bcm2835-dma fe007000.dma: DMA legacy API manager at (ptrval), dmachans=0x1 [ 0.065590] vgaarb: loaded [ 0.065968] SCSI subsystem initialized [ 0.066179] usbcore: registered new interface driver usbfs [ 0.066245] usbcore: registered new interface driver hub [ 0.066361] usbcore: registered new device driver usb [ 0.080332] raspberrypi-firmware soc:firmware: Attached to firmware from 2019-08-15 12:05, variant start_x [ 0.090086] raspberrypi-firmware soc:firmware: Firmware hash is 9f8431fb7839c7f00f52b81f5822ddab2b31d0db [ 0.101677] clocksource: Switched to clocksource arch_sys_counter [ 0.179231] VFS: Disk quotas dquot_6.6.0 [ 0.179328] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) [ 0.179502] FS-Cache: Loaded [ 0.179692] CacheFiles: Loaded [ 0.189038] NET: Registered protocol family 2 [ 0.189695] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes) [ 0.189741] TCP established hash table entries: 8192 (order: 3, 32768 bytes) [ 0.189826] TCP bind hash table entries: 8192 (order: 4, 65536 bytes) [ 0.189911] TCP: Hash tables configured (established 8192 bind 8192) [ 0.190046] UDP hash table entries: 512 (order: 2, 16384 bytes) [ 0.190091] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes) [ 0.190401] NET: Registered protocol family 1 [ 0.190950] RPC: Registered named UNIX socket transport module. [ 0.190976] RPC: Registered udp transport module. [ 0.190998] RPC: Registered tcp transport module. [ 0.191019] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.191046] PCI: CLS 0 bytes, default 64 [ 0.193965] Initialise system trusted keyrings [ 0.194143] workingset: timestamp_bits=14 max_order=18 bucket_order=4 [ 0.203092] FS-Cache: Netfs 'nfs' registered for caching [ 0.203594] NFS: Registering the id_resolver key type [ 0.203632] Key type id_resolver registered [ 0.203654] Key type id_legacy registered [ 0.203685] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 0.205940] Key type asymmetric registered [ 0.205966] Asymmetric key parser 'x509' registered [ 0.206087] bounce: pool size: 64 pages [ 0.206139] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250) [ 0.206318] io scheduler noop registered [ 0.206342] io scheduler deadline registered (default) [ 0.206505] io scheduler cfq registered [ 0.206528] io scheduler mq-deadline registered (default) [ 0.206551] io scheduler kyber registered [ 0.209452] brcm-pcie fd500000.pcie: could not get clock [ 0.209527] brcm-pcie fd500000.pcie: host bridge /scb/pcie@7d500000 ranges: [ 0.209578] brcm-pcie fd500000.pcie: MEM 0x600000000..0x603ffffff -> 0xf8000000 [ 0.261711] brcm-pcie fd500000.pcie: link up, 5.0 Gbps x1 (!SSC) [ 0.261973] brcm-pcie fd500000.pcie: PCI host bridge to bus 0000:00 [ 0.262005] pci_bus 0000:00: root bus resource [bus 00-01] [ 0.262035] pci_bus 0000:00: root bus resource [mem 0x600000000-0x603ffffff] (bus address [0xf8000000-0xfbffffff]) [ 0.262098] pci 0000:00:00.0: [14e4:2711] type 01 class 0x060400 [ 0.262234] pci 0000:00:00.0: PME# supported from D0 D3hot [ 0.264944] PCI: bus0: Fast back to back transfers disabled [ 0.264976] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring [ 0.265153] pci 0000:01:00.0: [1106:3483] type 00 class 0x0c0330 [ 0.265212] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00000fff 64bit] [ 0.265380] pci 0000:01:00.0: PME# supported from D0 D3cold [ 0.267992] PCI: bus1: Fast back to back transfers disabled [ 0.268022] pci_bus 0000:01: busn_res: [bus 01] end is updated to 01 [ 0.268067] pci 0000:00:00.0: BAR 8: assigned [mem 0x600000000-0x6000fffff] [ 0.268102] pci 0000:01:00.0: BAR 0: assigned [mem 0x600000000-0x600000fff 64bit] [ 0.268151] pci 0000:00:00.0: PCI bridge to [bus 01] [ 0.268181] pci 0000:00:00.0: bridge window [mem 0x600000000-0x6000fffff] [ 0.268391] pcieport 0000:00:00.0: enabling device (0140 -> 0142) [ 0.268577] pcieport 0000:00:00.0: Signaling PME with IRQ 54 [ 0.268746] pcieport 0000:00:00.0: AER enabled with IRQ 54 [ 0.268897] pci 0000:01:00.0: enabling device (0140 -> 0142) [ 0.269264] bcm2708_fb soc:fb: FB found 1 display(s) [ 0.293857] Console: switching to colour frame buffer device 160x64 [ 0.300520] bcm2708_fb soc:fb: Registered framebuffer for display 0, size 1280x1024 [ 0.302054] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled [ 0.303859] iproc-rng200 fe104000.rng: hwrng registered [ 0.304121] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB) [ 0.304696] vc-sm: Videocore shared memory driver [ 0.305127] gpiomem-bcm2835 fe200000.gpiomem: Initialised: Registers at 0xfe200000 [ 0.315215] brd: module loaded [ 0.324957] loop: module loaded [ 0.325730] Loading iSCSI transport class v2.0-870. [ 0.327423] libphy: Fixed MDIO Bus: probed [ 0.327873] bcmgenet fd580000.genet: failed to get enet clock [ 0.327948] bcmgenet fd580000.genet: GENET 5.0 EPHY: 0x0000 [ 0.328019] bcmgenet fd580000.genet: failed to get enet-wol clock [ 0.328094] bcmgenet fd580000.genet: failed to get enet-eee clock [ 0.328176] bcmgenet: Skipping UMAC reset [ 0.328452] unimac-mdio unimac-mdio.-19: DMA mask not set [ 0.341709] libphy: bcmgenet MII bus: probed [ 0.382214] unimac-mdio unimac-mdio.-19: Broadcom UniMAC MDIO bus at 0x(ptrval) [ 0.383177] usbcore: registered new interface driver r8152 [ 0.383297] usbcore: registered new interface driver lan78xx [ 0.383407] usbcore: registered new interface driver smsc95xx [ 0.383663] xhci_hcd 0000:01:00.0: xHCI Host Controller [ 0.383748] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 1 [ 0.385694] xhci_hcd 0000:01:00.0: hcc params 0x002841eb hci version 0x100 quirks 0x0000001000000890 [ 0.385947] genirq: irq_chip Brcm_MSI did not update eff. affinity mask of irq 55 [ 0.386634] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19 [ 0.386728] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 0.386808] usb usb1: Product: xHCI Host Controller [ 0.386868] usb usb1: Manufacturer: Linux 4.19.66-v7l+ xhci-hcd [ 0.389197] usb usb1: SerialNumber: 0000:01:00.0 [ 0.392033] hub 1-0:1.0: USB hub found [ 0.394385] hub 1-0:1.0: 1 port detected [ 0.397064] xhci_hcd 0000:01:00.0: xHCI Host Controller [ 0.399373] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2 [ 0.401787] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed [ 0.404423] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 4.19 [ 0.406785] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 0.409141] usb usb2: Product: xHCI Host Controller [ 0.411468] usb usb2: Manufacturer: Linux 4.19.66-v7l+ xhci-hcd [ 0.413805] usb usb2: SerialNumber: 0000:01:00.0 [ 0.416622] hub 2-0:1.0: USB hub found [ 0.418974] hub 2-0:1.0: 4 ports detected [ 0.422359] dwc_otg: version 3.00a 10-AUG-2012 (platform bus) [ 0.450224] dwc_otg fe980000.usb: base=(ptrval) [ 0.652810] Core Release: 2.80a [ 0.655087] Setting default values for core params [ 0.657375] Finished setting default values for core params [ 0.859951] Using Buffer DMA mode [ 0.862192] Periodic Transfer Interrupt Enhancement - disabled [ 0.864448] Multiprocessor Interrupt Enhancement - disabled [ 0.866691] OTG VER PARAM: 0, OTG VER FLAG: 0 [ 0.868952] Dedicated Tx FIFOs mode [ 0.871405] WARN::dwc_otg_hcd_init:1045: FIQ DMA bounce buffers: virt = f146d000 dma = 0x00000000f7548000 len=9024 [ 0.873748] FIQ FSM acceleration enabled for : Non-periodic Split Transactions Periodic Split Transactions High-Speed Isochronous Endpoints Interrupt/Control Split Transaction hack enabled [ 0.885105] dwc_otg: Microframe scheduler enabled [ 0.885170] WARN::hcd_init_fiq:457: FIQ on core 1 [ 0.887476] WARN::hcd_init_fiq:458: FIQ ASM at c07b5a8c length 36 [ 0.889734] WARN::hcd_init_fiq:497: MPHI regs_base at f0810200 [ 0.891987] dwc_otg fe980000.usb: DWC OTG Controller [ 0.894214] dwc_otg fe980000.usb: new USB bus registered, assigned bus number 3 [ 0.896432] dwc_otg fe980000.usb: irq 38, io mem 0x00000000 [ 0.898650] Init: Port Power? op_state=1 [ 0.900794] Init: Power Port (0) [ 0.903213] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19 [ 0.905425] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 0.907639] usb usb3: Product: DWC OTG Controller [ 0.909836] usb usb3: Manufacturer: Linux 4.19.66-v7l+ dwc_otg_hcd [ 0.911719] usb 1-1: new high-speed USB device number 2 using xhci_hcd [ 0.912091] usb usb3: SerialNumber: fe980000.usb [ 0.917059] hub 3-0:1.0: USB hub found [ 0.919348] hub 3-0:1.0: 1 port detected [ 0.922251] dwc_otg: FIQ enabled [ 0.922260] dwc_otg: NAK holdoff enabled [ 0.922269] dwc_otg: FIQ split-transaction FSM enabled [ 0.922282] Module dwc_common_port init [ 0.922488] usbcore: registered new interface driver uas [ 0.924842] usbcore: registered new interface driver usb-storage [ 0.927211] mousedev: PS/2 mouse device common for all mice [ 0.930515] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer [ 0.932982] bcm2835-cpufreq: min=600000 max=1500000 [ 0.935804] sdhci: Secure Digital Host Controller Interface driver [ 0.938063] sdhci: Copyright(c) Pierre Ossman [ 0.940637] sdhci-pltfm: SDHCI platform and OF driver helper [ 0.945495] ledtrig-cpu: registered to indicate activity on CPUs [ 0.947881] hidraw: raw HID events driver (C) Jiri Kosina [ 0.950269] usbcore: registered new interface driver usbhid [ 0.952519] usbhid: USB HID core driver [ 0.955559] vchiq: vchiq_init_state: slot_zero = (ptrval), is_master = 0

[ 0.970185] [vc_sm_connected_init]: end - returning 0 [ 0.973532] Initializing XFRM netlink socket [ 0.975778] NET: Registered protocol family 17 [ 0.978085] Key type dns_resolver registered [ 0.980609] Registering SWP/SWPB emulation handler [ 0.983482] registered taskstats version 1 [ 0.985667] Loading compiled-in X.509 certificates [ 0.995509] uart-pl011 fe201000.serial: cts_event_workaround enabled [ 0.997798] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 34, base_baud = 0) is a PL011 rev2 [ 1.093064] usb 1-1: New USB device found, idVendor=2109, idProduct=3431, bcdDevice= 4.20 [ 1.109367] console [ttyAMA0] enabled [ 1.116428] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0 [ 1.207591] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver [ 1.211762] usb 1-1: Product: USB2.0 Hub [ 1.213326] hub 1-1:1.0: USB hub found [ 1.216995] brcmstb_thermal fd5d2200.thermal: registered AVS TMON of-sensor driver [ 1.222297] hub 1-1:1.0: 4 ports detected [ 1.227222] sdhci-iproc fe340000.emmc2: Linked as a consumer to regulator.1 [ 1.493465] usb 2-2: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd [ 1.527467] mmc0: SDHCI controller on fe340000.emmc2 [fe340000.emmc2] using ADMA [ 1.564449] usb 2-2: New USB device found, idVendor=2109, idProduct=0811, bcdDevice=2a.97 [ 1.569589] of_cfs_init [ 1.571550] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 1.578090] of_cfs_init: OK [ 1.583360] usb 2-2: Product: 4-Port USB 3.0 Hub [ 1.998090] mmc0: new ultra high speed DDR50 SDHC card at address 59b4 [ 2.003986] usb 2-2: Manufacturer: VIA Labs, Inc. [ 2.006728] hub 2-2:1.0: USB hub found [ 2.009786] mmcblk0: mmc0:59b4 00000 14.9 GiB [ 2.012595] hub 2-2:1.0: 4 ports detected [ 2.420976] mmcblk0: p1 [ 2.427032] Waiting for root device /dev/sda2... [ 2.481726] usb 1-1.2: new high-speed USB device number 3 using xhci_hcd [ 2.612865] usb 1-1.2: New USB device found, idVendor=2109, idProduct=0811, bcdDevice=29.97 [ 2.623536] usb 1-1.2: New USB device strings: Mfr=0, Product=1, SerialNumber=0 [ 2.633172] usb 1-1.2: Product: USB2.0 Hub [ 2.640903] hub 1-1.2:1.0: USB hub found [ 2.647308] hub 1-1.2:1.0: 4 ports detected [ 2.971712] usb 1-1.2.1: new high-speed USB device number 4 using xhci_hcd [ 3.103457] usb 1-1.2.1: New USB device found, idVendor=174c, idProduct=55aa, bcdDevice= 1.00 [ 3.114339] usb 1-1.2.1: New USB device strings: Mfr=2, Product=3, SerialNumber=1 [ 3.124140] usb 1-1.2.1: Product: S7 [ 3.129995] usb 1-1.2.1: Manufacturer: aigo [ 3.136463] usb 1-1.2.1: SerialNumber: 000000000001 [ 3.144536] random: fast init done [ 3.154851] scsi host0: uas [ 3.161633] scsi 0:0:0:0: Direct-Access aigo S7 0 PQ: 0 ANSI: 6 [ 3.175497] sd 0:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB) [ 3.185865] sd 0:0:0:0: [sda] Write Protect is off [ 3.192924] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00 [ 3.193510] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 3.205366] sd 0:0:0:0: [sda] Optimal transfer size 33553920 bytes [ 3.217891] sda: sda1 sda2 [ 3.227121] sd 0:0:0:0: [sda] Attached SCSI disk [ 3.271717] usb 1-1.2.4: new high-speed USB device number 5 using xhci_hcd [ 3.402301] usb 1-1.2.4: New USB device found, idVendor=1a40, idProduct=0101, bcdDevice= 1.00 [ 3.413249] usb 1-1.2.4: New USB device strings: Mfr=0, Product=1, SerialNumber=0 [ 3.423079] usb 1-1.2.4: Product: USB 2.0 Hub [MTT] [ 3.431695] hub 1-1.2.4:1.0: USB hub found [ 3.438234] hub 1-1.2.4:1.0: 4 ports detected [ 3.449418] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null) [ 3.459485] VFS: Mounted root (ext4 filesystem) readonly on device 8:2. [ 3.469832] devtmpfs: mounted [ 3.481375] Freeing unused kernel memory: 2048K [ 3.488439] Run /sbin/init as init process [ 3.871760] usb 1-1.2.4.2: new high-speed USB device number 6 using xhci_hcd [ 3.950784] systemd[1]: System time before build time, advancing clock. [ 4.068468] NET: Registered protocol family 10 [ 4.076578] Segment Routing with IPv6 [ 4.124129] systemd[1]: systemd 241 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid) [ 4.130544] usb 1-1.2.4.2: New USB device found, idVendor=05ac, idProduct=1006, bcdDevice=96.15 [ 4.151525] systemd[1]: Detected architecture arm. [ 4.161709] usb 1-1.2.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 4.161720] usb 1-1.2.4.2: Product: Keyboard Hub [ 4.186730] usb 1-1.2.4.2: Manufacturer: Apple, Inc. [ 4.194235] usb 1-1.2.4.2: SerialNumber: 000000000000 [ 4.204471] hub 1-1.2.4.2:1.0: USB hub found [ 4.211438] hub 1-1.2.4.2:1.0: 3 ports detected [ 4.237342] systemd[1]: Set hostname to . [ 4.252923] systemd[1]: Failed to bump fs.file-max, ignoring: Invalid argument [ 4.434562] uart-pl011 fe201000.serial: no DMA platform data [ 4.541792] usb 1-1.2.4.2.2: new low-speed USB device number 7 using xhci_hcd [ 4.690713] usb 1-1.2.4.2.2: New USB device found, idVendor=05ac, idProduct=0250, bcdDevice= 0.74 [ 4.702377] usb 1-1.2.4.2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 4.712983] usb 1-1.2.4.2.2: Product: Apple Keyboard [ 4.720537] usb 1-1.2.4.2.2: Manufacturer: Apple Inc. [ 4.781857] systemd[1]: File /lib/systemd/system/systemd-journald.service:12 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling. [ 4.804229] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.) [ 4.841759] usb 1-1.2.4.2.3: new low-speed USB device number 8 using xhci_hcd [ 4.991505] usb 1-1.2.4.2.3: New USB device found, idVendor=045e, idProduct=0039, bcdDevice= 3.00 [ 5.003505] usb 1-1.2.4.2.3: New USB device strings: Mfr=1, Product=3, SerialNumber=0 [ 5.014184] usb 1-1.2.4.2.3: Product: Microsoft 5-Button Mouse with IntelliEye(TM) [ 5.024621] usb 1-1.2.4.2.3: Manufacturer: Microsoft [ 5.043822] input: Microsoft Microsoft 5-Button Mouse with IntelliEye(TM) as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2.4/1-1.2.4.2/1-1.2.4.2.3/1-1.2.4.2.3:1.0/0003:045E:0039.0003/input/input0 [ 5.071545] hid-generic 0003:045E:0039.0003: input,hidraw0: USB HID v1.10 Mouse [Microsoft Microsoft 5-Button Mouse with IntelliEye(TM)] on usb-0000:01:00.0-1.2.4.2.3/input0 [ 5.147170] systemd[1]: /lib/systemd/system/smbd.service:9: PIDFile= references path below legacy directory /var/run/, updating /var/run/samba/smbd.pid → /run/samba/smbd.pid; please update the unit file accordingly. [ 5.212799] systemd[1]: /lib/systemd/system/nmbd.service:9: PIDFile= references path below legacy directory /var/run/, updating /var/run/samba/nmbd.pid → /run/samba/nmbd.pid; please update the unit file accordingly. [ 5.276111] systemd[1]: /lib/systemd/system/fail2ban.service:12: PIDFile= references path below legacy directory /var/run/, updating /var/run/fail2ban/fail2ban.pid → /run/fail2ban/fail2ban.pid; please update the unit file accordingly. [ 5.378356] random: systemd: uninitialized urandom read (16 bytes read) [ 5.398009] systemd[1]: sockets.target: Found ordering cycle on greenhouse.socket/start [ 5.418874] random: systemd: uninitialized urandom read (16 bytes read) [ 5.433737] random: systemd: uninitialized urandom read (16 bytes read) [ 5.633670] i2c /dev entries driver [ 5.675039] media: Linux media interface: v0.10 [ 5.697837] videodev: Linux video capture interface: v2.00 [ 5.746712] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned. [ 5.763423] bcm2835_vc_sm_cma_probe: Videocore shared memory driver

[ 5.788968] [vc_sm_connected_init]: installed successfully [ 5.809802] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned. [ 5.845213] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned. [ 7.686353] EXT4-fs (sda2): re-mounted. Opts: (null) [ 7.774212] systemd-journald[111]: Received request to flush runtime journal from PID 1 [ 8.411437] rpivid-mem feb00000.hevc-decoder: rpivid-hevcmem initialised: Registers at 0xfeb00000 length 0x0000ffff [ 8.412365] rpivid-mem feb10000.rpivid-local-intc: rpivid-intcmem initialised: Registers at 0xfeb10000 length 0x00000fff [ 8.412877] rpivid-mem feb20000.h264-decoder: rpivid-h264mem initialised: Registers at 0xfeb20000 length 0x0000ffff [ 8.413351] rpivid-mem feb30000.vp9-decoder: rpivid-vp9mem initialised: Registers at 0xfeb30000 length 0x0000ffff [ 8.460548] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned. [ 8.469587] bcm2835-codec bcm2835-codec: Device registered as /dev/video10 [ 8.469602] bcm2835-codec bcm2835-codec:% Loaded V4L2 decode
[ 8.474797] bcm2835-codec bcm2835-codec: Device registered as /dev/video11 [ 8.474812] bcm2835-codec bcm2835-codec: Loaded V4L2 encode [ 8.485308] bcm2835-codec bcm2835-codec: Device registered as /dev/video12 [ 8.485322] bcm2835-codec bcm2835-codec: Loaded V4L2 isp [ 8.525586] rtc-ds1307: probe of 1-0068 failed with error -121 [ 8.950405] input: Apple Inc. Apple Keyboard as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2.4/1-1.2.4.2/1-1.2.4.2.2/1-1.2.4.2.2:1.0/0003:05AC:0250.0001/input/input1 [ 8.952233] sd 0:0:0:0: Attached scsi generic sg0 type 0 [ 9.012667] apple 0003:05AC:0250.0001: input,hidraw1: USB HID v1.11 Keyboard [Apple Inc. Apple Keyboard] on usb-0000:01:00.0-1.2.4.2.2/input0 [ 9.014105] input: Apple Inc. Apple Keyboard as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2.4/1-1.2.4.2/1-1.2.4.2.2/1-1.2.4.2.2:1.1/0003:05AC:0250.0002/input/input2 [ 9.099565] apple 0003:05AC:0250.0002: input,hidraw2: USB HID v1.11 Device [Apple Inc. Apple Keyboard] on usb-0000:01:00.0-1.2.4.2.2/input1 [ 11.006365] random: crng init done [ 11.006382] random: 7 urandom warning(s) missed due to ratelimiting [ 11.014065] 8021q: 802.1Q VLAN Support v1.8 [ 11.130120] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 11.218712] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 11.288887] bcmgenet: Skipping UMAC reset [ 11.382154] bcmgenet fd580000.genet: configuring instance for external RGMII (no delay) [ 11.382738] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [ 11.560317] Adding 1912828k swap on /var/swap. Priority:-2 extents:20 across:98168828k SSFS [ 12.391776] bcmgenet fd580000.genet eth0: Link is Down [ 16.551948] bcmgenet fd580000.genet eth0: Link is Up - 1Gbps/Full - flow control rx/tx [ 16.551984] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

Logs If applicable, add the relevant output from dmesg or similar.

Additional context Maybe related to #3122 etc. But the EdgeRouter has a 1000Mb port, not 100Mb. Applying the workaround genet.force_reneg=y seems to help avoid the issue.

ralphrmartin commented 4 years ago

This has only started happening recently. My Pi4 was working fine as a server for quite a time until recently (I got it more or less at the time they were announced). It was connected to a BT Smart Hub for some time, and then has been connected to the EdgeRouter for at least a month. It has been restarted quite a few times since then (we get frequent power outages here), but its only in the last few days I have started seeing the problem.

Possible causes:

heziegl commented 4 years ago

Having the same problem (same bcmgenet kernel log messages) with latest kernel 4.19.69-v7l+

pelwell commented 4 years ago

These messages are expected and not a sign of an error:

Aug 31 10:47:32 www kernel: bcmgenet fd580000.genet: failed to get enet clock
Aug 31 10:47:32 www kernel: bcmgenet fd580000.genet: GENET 5.0 EPHY: 0x0000
Aug 31 10:47:32 www kernel: bcmgenet fd580000.genet: failed to get enet-wol clock
Aug 31 10:47:32 www kernel: bcmgenet fd580000.genet: failed to get enet-eee clock
Aug 31 10:47:32 www kernel: bcmgenet: Skipping UMAC reset

There is a known (but not yet understood) problem, seemingly triggered by resetting the Ethernet interface during the boot process, that leaves the interface in a state where packets can be received but nothing is transmitted (although the stats make it look as though the transmissions occur). The "Skipping UMAC reset" message is an indication that a workaround is active. You can disable the workaround by adding the following to cmdline.txt (as part of the single line - don't start another line):

genet.skip_umac_reset=n
hansj10 commented 4 years ago

I'm hitting the same issue, HPE ProCurve Switch and H3C. somehow I'm still struggling to get one of the workarounds to work.

Booted from buster-lite install media (7/10) and some some updates later, eth0 fails as described. Kernel 4.19.66-v7l+

hansj10 commented 4 years ago

my cmdline.txt: dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait plymouth.enable=0 genet.force_reneg=y genet.skip_umac_reset=n

still the same issue..

kraj commented 4 years ago

seeing same issue with 4.19.108-v8 and suggested workaround does not fix it

[    0.445211] bcmgenet fd580000.genet: failed to get enet clock
[    0.445233] bcmgenet fd580000.genet: GENET 5.0 EPHY: 0x0000
[    0.445254] bcmgenet fd580000.genet: failed to get enet-wol clock
[    0.445274] bcmgenet fd580000.genet: failed to get enet-eee clock
[    0.456334] libphy: bcmgenet MII bus: probed
[    7.212833] bcmgenet fd580000.genet: configuring instance for external RGMII (no delay)
[    8.224466] bcmgenet fd580000.genet eth0: Link is Down
[   12.320500] bcmgenet fd580000.genet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
pelwell commented 4 years ago
[   12.320500] bcmgenet fd580000.genet eth0: Link is Up - 1Gbps/Full - flow control rx/tx

I don't understand - the log shows that there is a link. You might get one quicker without the genet.skip_umac_reset=n.

kraj commented 4 years ago

@pelwell I am looking at those failed messages are they harmless ?

pelwell commented 4 years ago

Yes, they're harmless - the driver can manage perfectly happily without those clocks.

marchom commented 3 years ago

I'm experiencing this on latest 5.4.51-v7l+ kernel.

marchom commented 3 years ago

I wonder if it's the same issue I'm having. I get the same messages in the kernel log. When the device restarts I am able to ping it, and it responds fine, but no other traffic goes in or out. I'm using a static IP. I figure ICMP must be working ok, but no TCP/UDP.

Everything starts working again if I unplug and plug back in the Ethernet. Link goes down and up and it works again.

marchom commented 3 years ago

Found out my issue was actually #3034 , #3108

djlambert commented 3 years ago

Fairly certain I'm having the same issue. No NIC after boot on both Raspberry Pi OS and Fedora 32. If I reboot it comes up the second time. I'm going to be running it headless with PoE though, and the NIC never comes up after power cycling. More than happy to collect any debug information.

marchom commented 3 years ago

As a workaround I've added: @reboot (sleep 5; /sbin/mii-tool -r eth0)& to sudo crontab -e

djlambert commented 3 years ago

After installing the latest Fedora 32 updates yesterday (including kernel 5.8.6-201) mine now reboots after:

bcmgenet fd580000.ethernet: configuring instance for external RGMII (RX delay)
bcmgenet fd580000.ethernet eth0: Link is down

Never gets past that point, just keeps rebooting.

SkyeFire commented 3 years ago

I'm encountering an almost identical issue, albeit with a different root cause. And so far, this is the only thread I've found anywhere in all my Googling that even approaches the issue I have. Hence, I'm risking a bit of threadcromancy.

I'm running a RasPi 4 with the current version of RasPiOS:

pi@raspberrypi:/ $ uname -a
Linux raspberrypi 5.4.79-v7l+ #1373 SMP Mon Nov 23 13:27:40 GMT 2020 armv7l GNU/Linux

And I've set eth0 to a static IP address using /etc/dhcpcd.conf:

pi@raspberrypi:/ $ sudo cat /etc/dhcpcd.conf
# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel

# Inform the DHCP server of our hostname for DDNS.
hostname

# Use the hardware address of the interface for the Client ID.
clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
# Some non-RFC compliant DHCP servers do not reply with this set.
# In this case, comment out duid and enable clientid above.
#duid

# Persist interface configuration when dhcpcd exits.
persistent

# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit

# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu

# Most distributions have NTP support.
#option ntp_servers

# A ServerID is required by RFC2131.
require dhcp_server_identifier

# Generate SLAAC address using the Hardware Address of the interface
#slaac hwaddr
# OR generate Stable Private IPv6 Addresses based from the DUID
slaac private

# Example static IP configuration:
interface eth0
static ip_address=192.168.1.10/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
#static routers=192.168.0.1
#static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1

# It is possible to fall back to a static IP if DHCP fails:
# define static profile
#profile static_eth0
#static ip_address=192.168.1.23/24
#static routers=192.168.1.1
#static domain_name_servers=192.168.1.1

# fallback to static profile on eth0
#interface eth0
#fallback static_eth0

This works perfectly, with no issues, across multiple reboots. Until I start running my CodeSys project. For those who don't know it, CodeSys is a software-based industrial PLC control system that can run on a regular PC, and has an "educational use only" version for the Pi.

When I start my CodeSys executable, within about 60sec eth0 will "die" -- dmesg shows an "eth0 down" message, and running ifconfig shows eth0 with no IP address. Status check shows eth0 "waiting for carrier." This happens even when I have an active connection running ssh over eth0.

If I reboot the Pi after this, eth0 never comes up -- dmesg simply reports "eth0 down." It also shows the same string of bcmgenet messages that appear in the OP. My dhcpcd.conf is unchanged -- it still has my static IP set. Using ifconfig up/down commands on eth0 do nothing -- no messages, no feedback, just... nothing.

So far, the only way I've found to recover from this is to re-burn RaspiOS from the original download image, and re-do my dhcpcd.conf changes. This works, right up until I install CodeSys and start running it (only running it seems to kill eth0 -- just installing the binary and downloading the executable project seems to be harmless).

I've eliminated hardware issues (except perhaps on the Pi itself) by swapping ethernet cables and switches. I've also tried re-burning the OS and deliberately not performing any updates. I also tried rebuilding my Codesys project from scratch without any drivers that access Eth0, on the theory that the Ethernet/IP or ModBus drivers might be causing this issue -- no dice there, either.

I tried adding the "skipreset=no" to my cmdline.txt as suggested upthread. No change, dmesg just shows 'eth0 down' as the only eth0-related message: [ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 smsc95xx.macaddr=DC:A6:32:8D:A1:92 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=ttyS0,115200 console=tty1 root=PARTUUID=249298d6-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles genet.skip_umac_reset=n

pi@raspberrypi:~ $ dmesg | grep bcmg
[    1.033665] bcmgenet fd580000.ethernet: failed to get enet clock
[    1.033685] bcmgenet fd580000.ethernet: GENET 5.0 EPHY: 0x0000
[    1.033709] bcmgenet fd580000.ethernet: failed to get enet-wol clock
[    1.033730] bcmgenet fd580000.ethernet: failed to get enet-eee clock
[    1.044648] libphy: bcmgenet MII bus: probed
[    9.528502] bcmgenet fd580000.ethernet: configuring instance for external RGMII
[    9.535175] bcmgenet fd580000.ethernet eth0: Link is Down
jonas-schievink commented 3 years ago

I'm also seeing this issue on kernel version 20201201 (5.4.79) with an 8 GB Raspberry Pi 4, while my older Pi 4 with 1 GB RAM works flawlessly (unfortunately I really need more memory than that).

good:

Hardware        : BCM2835
Revision        : a03111
Serial          : 10000000d7aa48f5
Model           : Raspberry Pi 4 Model B Rev 1.1

bad:

Hardware        : BCM2835
Revision        : d03114
Serial          : 100000001b3b9f2d
Model           : Raspberry Pi 4 Model B Rev 1.4

No combination of workaround flags fixes the issue for me, the most usable configuration I found was with genet.skip_umac_reset=n genet.force_reneg=y, which sometimes allows network to stay up for a few minutes at best, until it results in the kernel warning below:

bcmgenet

Is there anything else I could try here or should I just RMA the device?

SkyeFire commented 3 years ago

Well, to follow up on my own issue two posts up, I was in contact with CodeSys tech support, who said that they were able to re-create the problem. Their recommendation was to update to the latest version of CodeSys, and that does appear to have resolved whatever the problem was. I took the same Pi4, built a "clean" RasPi OS SD card, did a complete "clean" install of the latest patch of CodeSys, and tried the same actions that killed eth0 previously. Got several hours of run time today without any eth0 hiccups.

So it would appear that my specific issue was rooted in CodeSys.

However: in the intervening weeks, I picked up another Pi4 (same 8GB model), and installed the "older" version of CodeSys on it without any eth0 issues. So, two supposedly-identical Pis, running identical builds, one with the eth0 issue, and one without. I have to wonder if the "bad" Pi had some earlier hardware revision that something in the unpatched CodeSys was tripping over.

SkyeFire commented 3 years ago

Well, I need to backtrack -- it turns out, it wasn't the CodeSys version -- it was the GPIO.

There are two "versions" of the GPIO package available in CodeSys, one for older Pis, and one for newer. The default is for older Pis. Not knowing this, I was using the outdated version for my Pi4. And it worked, mostly. But one thing it also did was give me configuration control (Input vs Output vs Not Used) for GPIOs 28 and 29.

I'm not entirely sure what CodeSys does for controlling GPIO pins at the driver level, but after some very painstaking trial-and-error testing, I found that setting GPIO 28 or 29 to Output would kill eth0, as described upthread, even without ever setting either of those pins. Just setting the configuration was enough. I failed to catch this for some time because I was also trying to use Ethernet/IP, ProfiNet, and ModBus on the Pi, and thought that those were the problem, since they use eth0 heavily. I was only using the GPIOs (at that point) for some blinking LEDs, and (rather foolishly) just set all the GPIOs to Output, even the ones not broken out on the header.

After looking at the Broadcom docs for the SoC, I noticed that 28 and 29 are the only pins within the range CodeSys had access to that had "primary" I/O mode, only the "alt" modes. I'm assuming this has something to do with the behavior I encountered.

jonas-schievink commented 3 years ago

My issue reproduces with a freshly downloaded version of the official Raspberry Pi OS too, so it is probably the original issue reported here.

@pelwell is there anything else I can try to help you debug this issue or should I return my hardware?

pelwell commented 3 years ago

@SkyeFire On Pi4B, GPIOs 28 and 29 are used for the MDIO link to the Ethernet PHY - Alt function 5. I'm not surprised that interfering with them kills your Ethernet.

@jonas-schievink Looking at your screenshot above I see that your WiFi interface is also complaining. Multiple, independent problems like this is usually caused by undervoltage - how are you powering your 4B, and what other equipment do you have attached? If the power supply (including any cabling) is a bit marginal then some Pis will suffer more than others - there are small variations between instances of the same chip that affect the maximum clock speed and power consumption.

jonas-schievink commented 3 years ago

I was powering it with the official power supply, with nothing plugged in except a microSD, TV, Ethernet, and a USB keyboard

pelwell commented 3 years ago

I think you have reasonable grounds to RMA it.

tacuna commented 3 years ago

(did no yet try any of the workarounds, yet)

In case it helps, Raspberry Pi 4 v1.2 4GB (eeprom 000138a1). Official power supply.

I'm suffering from the same issue (although it is not related at starting the Pi), journal/dmesg is full of:

systemd-networkd[230]: eth0: Lost carrier
kernel: bcmgenet fd580000.ethernet eth0: Link is Down
systemd-networkd[230]: eth0: DHCPv6 lease lost
kernel: bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
systemd-networkd[230]: eth0: Gained carrier

happens every few minutes (inconsistent interval), the LAN port of the switch (D-link) you can see the lights go off (and back on after 2-3 sec). It happens for as long as the Pi is powered on/running.

(tried resetting router, switch, changed cable; no dice)

Started 6 Feb 2021 in the middle of the night (Pi was running since the 3th Feb) (before there were no eth0 issues what so ever, device is from mid 2020), at that time running: Linux version 5.10.13-3-ARCH (builduser@leming) (aarch64-unknown-linux-gnu-gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.35) #1 SMP PREEMPT Fri Feb 5 14:00:49 MST 2021 and Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 smsc95xx.macaddr=DC:A6:32:74:8C:0F vc_mem.mem_base=0x3eb00000 vc_mem.mem_size=0x3ff00000 root=PARTUUID=45a68f79-02 rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 fsck.repair=yes mitigations=off. From then onwards it happens every few minutes; very annoying.

Using a static IP (/etc/systemd/network/eth0.network).

Not using any GPIO connected devices at the moment (i tried some I2C sensors but disabled I2C again. No effect).

Current: 5.10.22-3-ARCH #1 SMP PREEMPT Fri Mar 12 16:15:46 MST 2021 aarch64 GNU/Linux (Arch Linux (linux-raspberrpy4 kernel))