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: Kernel panic with PI7C9X2G404EV PCIe switch #5352

Open iluminat23 opened 1 year ago

iluminat23 commented 1 year ago

Is this the right place for my bug report? I guess

Describe the bug We use a PI7C9X2G404EV PCIe switch with the CM4 IO Board. When we boot, most times the kernel panics when accessing the ID register of the PCIe switch.

To reproduce Use a PI7C9X2G404EV PCIe switch card with the CM4 IO Board. No additional H/W needs to be attached to the switch to already trigger this behavior.

Expected behaviour System should boot up and the PCIe switch should be working (e.g. show up with lspci)

Actual behaviour The kernel stops with a kernel panic often/most times (depends on time of day, phase of the moon and other unknown conditions). The kernel log shows a Gen1 link 2.5 GT/s

If the system boots the switch works and a Gen2 link 5.0 GT/s is shown in the log. In this case if additional H/W is connected to the switch the H/W works as expected. Tested with a LAN7430 GBit ether adapter and a Renesas USB3 controller.

System raspinfo from the running system: http://paste.debian.net/1271060/

Logs panic

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd083]
[    0.000000] Linux version 5.15.84-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) raspberrypi/firmware#1613 SMP PREEMPT Thu Jan 5 12:03:08 GMT 2023
[    0.000000] random: crng init done
[    0.000000] Machine model: Raspberry Pi Compute Module 4 Rev 1.0
[    0.000000] earlycon: uart8250 at MMIO32 0x00000000fe215040 (options '')
[    0.000000] printk: bootconsole [uart8250] enabled
[    0.000000] efi: UEFI not found.
[    0.000000] Reserved memory: created CMA memory pool at 0x000000001ac00000, size 320 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x000000003fffffff]
[    0.000000]   DMA32    [mem 0x0000000040000000-0x00000000ffffffff]
[    0.000000]   Normal   [mem 0x0000000100000000-0x00000001ffffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000003b3fffff]
[    0.000000]   node   0: [mem 0x0000000040000000-0x00000000fbffffff]
[    0.000000]   node   0: [mem 0x0000000100000000-0x00000001ffffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x00000001ffffffff]
[    0.000000] On node 0, zone DMA32: 19456 pages in unavailable ranges
[    0.000000] On node 0, zone Normal: 16384 pages in unavailable ranges
[    0.000000] percpu: Embedded 28 pages/cpu s77336 r8192 d29160 u114688
[    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] Built 1 zonelists, mobility grouping on.  Total pages: 2028848
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=HDMI-A-1:1920x1080M@60 smsc95xx.macaddr=E4:5F:01:31:23:4D vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=ttyS0,115200 root=PARTUUID=1cd0abfd-02 rootfstype=ext4 fsck.repair=yes rootwait earlycon=uart8250,mmio32,0xfe215040 earlycon=pl011,mmio32,0xfe201000
[    0.000000] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear)
[    0.000000] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: mapped [mem 0x0000000037400000-0x000000003b400000] (64MB)
[    0.000000] Memory: 7668384K/8245248K available (11520K kernel code, 1956K rwdata, 4136K rodata, 3776K init, 975K bss, 249184K reserved, 327680K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 38065 entries in 149 pages
[    0.000000] ftrace: allocated 149 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] irq_brcmstb_l2: registered L2 intc (/soc/interrupt-controller@7ef00100, parent irq: 10)
[    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.000000] sched_clock: 56 bits at 54MHz, resolution 18ns, wraps every 4398046511102ns
[    0.008438] Console: colour dummy device 80x25
[    0.013017] Calibrating delay loop (skipped), value calculated using timer frequency.. 108.00 BogoMIPS (lpj=216000)
[    0.023596] pid_max: default: 32768 minimum: 301
[    0.028409] LSM: Security Framework initializing
[    0.033332] Mount-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.041085] Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.050410] cgroup: Disabling memory control group subsystem
[    0.058915] rcu: Hierarchical SRCU implementation.
[    0.064943] EFI services will not be available.
[    0.070104] smp: Bringing up secondary CPUs ...
[    0.075800] Detected PIPT I-cache on CPU1
[    0.075878] CPU1: Booted secondary processor 0x0000000001 [0x410fd083]
[    0.077047] Detected PIPT I-cache on CPU2
[    0.077098] CPU2: Booted secondary processor 0x0000000002 [0x410fd083]
[    0.078244] Detected PIPT I-cache on CPU3
[    0.078295] CPU3: Booted secondary processor 0x0000000003 [0x410fd083]
[    0.078446] smp: Brought up 1 node, 4 CPUs
[    0.114573] SMP: Total of 4 processors activated.
[    0.119342] CPU features: detected: 32-bit EL0 Support
[    0.124548] CPU features: detected: 32-bit EL1 Support
[    0.129755] CPU features: detected: CRC32 instructions
[    0.167118] CPU: All CPU(s) started at EL2
[    0.171340] alternatives: patching kernel code
[    0.177539] devtmpfs: initialized
[    0.192102] Enabled cp15_barrier support
[    0.196136] Enabled setend support
[    0.199596] KASLR enabled
[    0.202446] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.212332] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.227810] pinctrl core: initialized pinctrl subsystem
[    0.233943] DMI not present or invalid.
[    0.238501] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.248174] DMA: preallocated 1024 KiB GFP_KERNEL pool for atomic allocations
[    0.255711] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.264553] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.272768] audit: initializing netlink subsys (disabled)
[    0.278529] audit: type=2000 audit(0.192:1): state=initialized audit_enabled=0 res=1
[    0.279087] thermal_sys: Registered thermal governor 'step_wise'
[    0.286608] cpuidle: using governor menu
[    0.296983] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.304044] ASID allocator initialised with 32768 entries
[    0.309674] Serial: AMBA PL011 UART driver
[    0.327201] bcm2835-mbox fe00b880.mailbox: mailbox enabled
[    0.360908] raspberrypi-firmware soc:firmware: Attached to firmware from 2023-01-05T10:46:54, variant start
[    0.374830] raspberrypi-firmware soc:firmware: Firmware hash is 8ba17717fbcedd4c3b6d4bce7e50c7af4155cba9
[    0.436862] bcm2835-dma fe007000.dma: DMA legacy API manager, dmachans=0x1
[    0.448131] vgaarb: loaded
[    0.451286] SCSI subsystem initialized
[    0.455311] usbcore: registered new interface driver usbfs
[    0.460989] usbcore: registered new interface driver hub
[    0.466443] usbcore: registered new device driver usb
[    0.472008] usb_phy_generic phy: supply vcc not found, using dummy regulator
[    0.479362] usb_phy_generic phy: dummy supplies not allowed for exclusive requests
[    0.487390] pps_core: LinuxPPS API ver. 1 registered
[    0.492436] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.501752] PTP clock support registered
[    0.507163] clocksource: Switched to clocksource arch_sys_counter
[    0.599704] VFS: Disk quotas dquot_6.6.0
[    0.603792] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.610945] FS-Cache: Loaded
[    0.614093] CacheFiles: Loaded
[    0.618498] simple-framebuffer 3e3cf000.framebuffer: framebuffer at 0x3e3cf000, 0x7f8000 bytes
[    0.627236] simple-framebuffer 3e3cf000.framebuffer: format=a8r8g8b8, mode=1920x1080x32, linelength=7680
[    0.648314] Console: switching to colour frame buffer device 240x67
[    0.665025] simple-framebuffer 3e3cf000.framebuffer: fb0: simplefb registered!
[    0.682857] NET: Registered PF_INET protocol family
[    0.688594] IP idents hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.702226] tcp_listen_portaddr_hash hash table entries: 4096 (order: 4, 65536 bytes, linear)
[    0.710982] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.718860] TCP established hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.727281] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes, linear)
[    0.735789] TCP: Hash tables configured (established 65536 bind 65536)
[    0.742735] UDP hash table entries: 4096 (order: 5, 131072 bytes, linear)
[    0.749733] UDP-Lite hash table entries: 4096 (order: 5, 131072 bytes, linear)
[    0.757453] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.764619] RPC: Registered named UNIX socket transport module.
[    0.770657] RPC: Registered udp transport module.
[    0.775427] RPC: Registered tcp transport module.
[    0.780195] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.786727] PCI: CLS 0 bytes, default 64
[    0.793153] hw perfevents: enabled with armv8_cortex_a72 PMU driver, 7 counters available
[    0.801770] kvm [1]: IPA Size Limit: 44 bits
[    0.807269] kvm [1]: vgic interrupt IRQ9
[    0.811516] kvm [1]: Hyp mode initialized successfully
[    1.499031] Initialise system trusted keyrings
[    1.503939] workingset: timestamp_bits=46 max_order=21 bucket_order=0
[    1.517255] zbud: loaded
[    1.521640] FS-Cache: Netfs 'nfs' registered for caching
[    1.527722] NFS: Registering the id_resolver key type
[    1.532888] Key type id_resolver registered
[    1.537134] Key type id_legacy registered
[    1.541298] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.548095] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    1.556776] Key type asymmetric registered
[    1.560953] Asymmetric key parser 'x509' registered
[    1.565974] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    1.573722] io scheduler mq-deadline registered
[    1.578332] io scheduler kyber registered
[    1.590666] gpio-507 (ant1): hogged as output/high
[    1.596898] gpio-511 (ant2): hogged as output/low
[    1.602947] brcm-pcie fd500000.pcie: host bridge /scb/pcie@7d500000 ranges:
[    1.610039] brcm-pcie fd500000.pcie:   No bus range found for /scb/pcie@7d500000, using [bus 00-ff]
[    1.619280] brcm-pcie fd500000.pcie:      MEM 0x0600000000..0x063fffffff -> 0x00c0000000
[    1.627564] brcm-pcie fd500000.pcie:   IB MEM 0x0000000000..0x01ffffffff -> 0x0400000000
[    1.669267] brcm-pcie fd500000.pcie: link up, 5.0 GT/s PCIe x1 (SSC)
[    1.676070] brcm-pcie fd500000.pcie: PCI host bridge to bus 0000:00
[    1.682435] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.688004] pci_bus 0000:00: root bus resource [mem 0x600000000-0x63fffffff] (bus address [0xc0000000-0xffffffff])
[    1.698558] pci 0000:00:00.0: [14e4:2711] type 01 class 0x060400
[    1.704882] pci 0000:00:00.0: PME# supported from D0 D3hot
[    1.714126] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.760219] SError Interrupt on CPU2, code 0xbf000002 -- SError
[    1.760231] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 5.15.84-v8+ raspberrypi/firmware#1613
[    1.760243] Hardware name: Raspberry Pi Compute Module 4 Rev 1.0 (DT)
[    1.760249] pstate: 200000c5 (nzCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    1.760259] pc : pci_generic_config_read+0x44/0xe8
[    1.760283] lr : pci_generic_config_read+0x2c/0xe8
[    1.760294] sp : ffffffc00802b870
[    1.760298] x29: ffffffc00802b870 x28: ffffff81012b3000 x27: 0000000000000000
[    1.760316] x26: 0000000000000000 x25: 0000000000000000 x24: ffffffc00802b9a4
[    1.760330] x23: ffffff81012b3000 x22: 0000000000000000 x21: 0000000000000087
[    1.760343] x20: ffffffc00802b8e4 x19: 0000000000000004 x18: 0000000000000000
[    1.760356] x17: 6572202c295d3030 x16: 2d3030207375625b x15: ffffffffffffffff
[    1.760370] x14: ffffffe8d68989a8 x13: ffffff81012dca1c x12: ffffff81012dc2d9
[    1.760383] x11: 0000000000000004 x10: 0101010101010101 x9 : ffffffe8d609e764
[    1.760396] x8 : 000000000000ea60 x7 : ffffffc00802b9a4 x6 : ffffffc00802b830
[    1.760409] x5 : ffffffc008700000 x4 : ffffff81012b2b40 x3 : ffffffc008709000
[    1.760422] x2 : 0000000000008000 x1 : 00000000deaddead x0 : ffffffc008708000
[    1.760438] Kernel panic - not syncing: Asynchronous SError Interrupt
[    1.760444] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 5.15.84-v8+ raspberrypi/firmware#1613
[    1.760454] Hardware name: Raspberry Pi Compute Module 4 Rev 1.0 (DT)
[    1.760459] Call trace:
[    1.760461]  dump_backtrace+0x0/0x1b8
[    1.760478]  show_stack+0x20/0x30
[    1.760491]  dump_stack_lvl+0x8c/0xb8
[    1.760505]  dump_stack+0x18/0x34
[    1.760514]  panic+0x17c/0x374
[    1.760522]  nmi_panic+0x6c/0xa0
[    1.760532]  arm64_serror_panic+0x6c/0x80
[    1.760539]  do_serror+0x3c/0x88
[    1.760547]  el1h_64_error_handler+0x38/0x50
[    1.760557]  el1h_64_error+0x78/0x7c
[    1.760564]  pci_generic_config_read+0x44/0xe8
[    1.760575]  pci_bus_read_config_dword+0x8c/0xe0
[    1.760586]  pci_bus_generic_read_dev_vendor_id+0x3c/0x1b8
[    1.760599]  pci_bus_read_dev_vendor_id+0x54/0x78
[    1.760611]  pci_scan_single_device+0x8c/0xe0
[    1.760623]  pci_scan_slot+0x40/0x128
[    1.760634]  pci_scan_child_bus_extend+0x5c/0x2c0
[    1.760647]  pci_scan_bridge_extend+0x30c/0x588
[    1.760659]  pci_scan_child_bus_extend+0x1f4/0x2c0
[    1.760671]  pci_scan_root_bus_bridge+0xdc/0xf8
[    1.760679]  pci_host_probe+0x20/0xb8
[    1.760686]  brcm_pcie_probe+0x390/0x568
[    1.760698]  platform_probe+0x70/0xe0
[    1.760708]  really_probe+0xc0/0x318
[    1.760719]  __driver_probe_device+0x80/0xe8
[    1.760730]  driver_probe_device+0x88/0x118
[    1.760740]  __driver_attach+0x78/0x128
[    1.760751]  bus_for_each_dev+0x7c/0xd0
[    1.760761]  driver_attach+0x2c/0x38
[    1.760771]  bus_add_driver+0x194/0x208
[    1.760781]  driver_register+0x6c/0x128
[    1.760792]  __platform_driver_register+0x30/0x40
[    1.760800]  brcm_pcie_driver_init+0x24/0x30
[    1.760813]  do_one_initcall+0x54/0x2a0
[    1.760821]  kernel_init_freeable+0x250/0x2d8
[    1.760830]  kernel_init+0x2c/0x130
[    1.760840]  ret_from_fork+0x10/0x20
[    1.760852] SMP: stopping secondary CPUs
[    1.760865] Kernel Offset: 0x28cda00000 from 0xffffffc008000000
[    1.760871] PHYS_OFFSET: 0x0
[    1.760874] CPU features: 0x800804f1,00000846
[    1.760881] Memory Limit: none
[    2.063250] ---[ end Kernel panic - not syncing: Asynchronous SError Interrupt ]---

good case

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd083]
[    0.000000] Linux version 5.15.84-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) raspberrypi/firmware#1613 SMP PREEMPT Thu Jan 5 12:03:08 GMT 2023
[    0.000000] random: crng init done
[    0.000000] Machine model: Raspberry Pi Compute Module 4 Rev 1.0
[    0.000000] earlycon: uart8250 at MMIO32 0x00000000fe215040 (options '')
[    0.000000] printk: bootconsole [uart8250] enabled
[    0.000000] efi: UEFI not found.
[    0.000000] Reserved memory: created CMA memory pool at 0x000000001ac00000, size 320 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x000000003fffffff]
[    0.000000]   DMA32    [mem 0x0000000040000000-0x00000000ffffffff]
[    0.000000]   Normal   [mem 0x0000000100000000-0x00000001ffffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000003b3fffff]
[    0.000000]   node   0: [mem 0x0000000040000000-0x00000000fbffffff]
[    0.000000]   node   0: [mem 0x0000000100000000-0x00000001ffffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x00000001ffffffff]
[    0.000000] On node 0, zone DMA32: 19456 pages in unavailable ranges
[    0.000000] On node 0, zone Normal: 16384 pages in unavailable ranges
[    0.000000] percpu: Embedded 28 pages/cpu s77336 r8192 d29160 u114688
[    0.000000] pcpu-alloc: s77336 r8192 d29160 u114688 alloc=28*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] Built 1 zonelists, mobility grouping on.  Total pages: 2028848
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=HDMI-A-1:1920x1080M@60 smsc95xx.macaddr=E4:5F:01:31:23:4D vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=ttyS0,115200 root=PARTUUID=1cd0abfd-02 rootfstype=ext4 fsck.repair=yes rootwait earlycon=uart8250,mmio32,0xfe215040 earlycon=pl011,mmio32,0xfe201000
[    0.000000] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear)
[    0.000000] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: mapped [mem 0x0000000037400000-0x000000003b400000] (64MB)
[    0.000000] Memory: 7668384K/8245248K available (11520K kernel code, 1956K rwdata, 4136K rodata, 3776K init, 975K bss, 249184K reserved, 327680K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 38065 entries in 149 pages
[    0.000000] ftrace: allocated 149 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] irq_brcmstb_l2: registered L2 intc (/soc/interrupt-controller@7ef00100, parent irq: 10)
[    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.008435] Console: colour dummy device 80x25
[    0.013015] Calibrating delay loop (skipped), value calculated using timer frequency.. 108.00 BogoMIPS (lpj=216000)
[    0.023594] pid_max: default: 32768 minimum: 301
[    0.028405] LSM: Security Framework initializing
[    0.033324] Mount-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.041077] Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.050399] cgroup: Disabling memory control group subsystem
[    0.058905] rcu: Hierarchical SRCU implementation.
[    0.064922] EFI services will not be available.
[    0.070071] smp: Bringing up secondary CPUs ...
[    0.075766] Detected PIPT I-cache on CPU1
[    0.075841] CPU1: Booted secondary processor 0x0000000001 [0x410fd083]
[    0.077005] Detected PIPT I-cache on CPU2
[    0.077055] CPU2: Booted secondary processor 0x0000000002 [0x410fd083]
[    0.078196] Detected PIPT I-cache on CPU3
[    0.078245] CPU3: Booted secondary processor 0x0000000003 [0x410fd083]
[    0.078396] smp: Brought up 1 node, 4 CPUs
[    0.114520] SMP: Total of 4 processors activated.
[    0.119289] CPU features: detected: 32-bit EL0 Support
[    0.124495] CPU features: detected: 32-bit EL1 Support
[    0.129702] CPU features: detected: CRC32 instructions
[    0.167020] CPU: All CPU(s) started at EL2
[    0.171240] alternatives: patching kernel code
[    0.177420] devtmpfs: initialized
[    0.191942] Enabled cp15_barrier support
[    0.195975] Enabled setend support
[    0.199434] KASLR enabled
[    0.202284] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.212171] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.227655] pinctrl core: initialized pinctrl subsystem
[    0.233780] DMI not present or invalid.
[    0.238344] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.247991] DMA: preallocated 1024 KiB GFP_KERNEL pool for atomic allocations
[    0.255525] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.264374] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.272586] audit: initializing netlink subsys (disabled)
[    0.278341] audit: type=2000 audit(0.192:1): state=initialized audit_enabled=0 res=1
[    0.278898] thermal_sys: Registered thermal governor 'step_wise'
[    0.286417] cpuidle: using governor menu
[    0.296769] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.303831] ASID allocator initialised with 32768 entries
[    0.309462] Serial: AMBA PL011 UART driver
[    0.326972] bcm2835-mbox fe00b880.mailbox: mailbox enabled
[    0.360678] raspberrypi-firmware soc:firmware: Attached to firmware from 2023-01-05T10:46:54, variant start
[    0.374603] raspberrypi-firmware soc:firmware: Firmware hash is 8ba17717fbcedd4c3b6d4bce7e50c7af4155cba9
[    0.436563] bcm2835-dma fe007000.dma: DMA legacy API manager, dmachans=0x1
[    0.447851] vgaarb: loaded
[    0.451006] SCSI subsystem initialized
[    0.455094] usbcore: registered new interface driver usbfs
[    0.460714] usbcore: registered new interface driver hub
[    0.466221] usbcore: registered new device driver usb
[    0.471735] usb_phy_generic phy: supply vcc not found, using dummy regulator
[    0.479141] usb_phy_generic phy: dummy supplies not allowed for exclusive requests
[    0.487115] pps_core: LinuxPPS API ver. 1 registered
[    0.492205] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.501472] PTP clock support registered
[    0.506878] clocksource: Switched to clocksource arch_sys_counter
[    0.599424] VFS: Disk quotas dquot_6.6.0
[    0.603509] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.610656] FS-Cache: Loaded
[    0.613804] CacheFiles: Loaded
[    0.618194] simple-framebuffer 3e3cf000.framebuffer: framebuffer at 0x3e3cf000, 0x7f8000 bytes
[    0.626932] simple-framebuffer 3e3cf000.framebuffer: format=a8r8g8b8, mode=1920x1080x32, linelength=7680
[    0.647998] Console: switching to colour frame buffer device 240x67
[    0.664711] simple-framebuffer 3e3cf000.framebuffer: fb0: simplefb registered!
[    0.682551] NET: Registered PF_INET protocol family
[    0.688323] IP idents hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.701974] tcp_listen_portaddr_hash hash table entries: 4096 (order: 4, 65536 bytes, linear)
[    0.710731] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.718609] TCP established hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.727031] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes, linear)
[    0.735542] TCP: Hash tables configured (established 65536 bind 65536)
[    0.742490] UDP hash table entries: 4096 (order: 5, 131072 bytes, linear)
[    0.749489] UDP-Lite hash table entries: 4096 (order: 5, 131072 bytes, linear)
[    0.757211] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.764379] RPC: Registered named UNIX socket transport module.
[    0.770415] RPC: Registered udp transport module.
[    0.775185] RPC: Registered tcp transport module.
[    0.779953] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.786486] PCI: CLS 0 bytes, default 64
[    0.793076] hw perfevents: enabled with armv8_cortex_a72 PMU driver, 7 counters available
[    0.801701] kvm [1]: IPA Size Limit: 44 bits
[    0.807206] kvm [1]: vgic interrupt IRQ9
[    0.811459] kvm [1]: Hyp mode initialized successfully
[    1.497740] Initialise system trusted keyrings
[    1.502661] workingset: timestamp_bits=46 max_order=21 bucket_order=0
[    1.515981] zbud: loaded
[    1.520371] FS-Cache: Netfs 'nfs' registered for caching
[    1.526415] NFS: Registering the id_resolver key type
[    1.531584] Key type id_resolver registered
[    1.535831] Key type id_legacy registered
[    1.539999] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.546796] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    1.555501] Key type asymmetric registered
[    1.559672] Asymmetric key parser 'x509' registered
[    1.564691] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    1.572440] io scheduler mq-deadline registered
[    1.577050] io scheduler kyber registered
[    1.589388] gpio-507 (ant1): hogged as output/high
[    1.595616] gpio-511 (ant2): hogged as output/low
[    1.601658] brcm-pcie fd500000.pcie: host bridge /scb/pcie@7d500000 ranges:
[    1.608753] brcm-pcie fd500000.pcie:   No bus range found for /scb/pcie@7d500000, using [bus 00-ff]
[    1.617993] brcm-pcie fd500000.pcie:      MEM 0x0600000000..0x063fffffff -> 0x00c0000000
[    1.626284] brcm-pcie fd500000.pcie:   IB MEM 0x0000000000..0x01ffffffff -> 0x0400000000
[    1.668982] brcm-pcie fd500000.pcie: link up, 5.0 GT/s PCIe x1 (SSC)
[    1.675784] brcm-pcie fd500000.pcie: PCI host bridge to bus 0000:00
[    1.682150] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.687719] pci_bus 0000:00: root bus resource [mem 0x600000000-0x63fffffff] (bus address [0xc0000000-0xffffffff])
[    1.698274] pci 0000:00:00.0: [14e4:2711] type 01 class 0x060400
[    1.704599] pci 0000:00:00.0: PME# supported from D0 D3hot
[    1.713855] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.722256] pci 0000:01:00.0: [12d8:b404] type 01 class 0x060400
[    1.728716] pci 0000:01:00.0: supports D1 D2
[    1.733055] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.743425] pci 0000:01:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.751930] pci 0000:02:01.0: [12d8:b404] type 01 class 0x060400
[    1.758394] pci 0000:02:01.0: supports D1 D2
[    1.762731] pci 0000:02:01.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.769850] pci 0000:02:02.0: [12d8:b404] type 01 class 0x060400
[    1.776313] pci 0000:02:02.0: supports D1 D2
[    1.780649] pci 0000:02:02.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.787756] pci 0000:02:03.0: [12d8:b404] type 01 class 0x060400
[    1.794235] pci 0000:02:03.0: supports D1 D2
[    1.798572] pci 0000:02:03.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.808593] pci 0000:02:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.816726] pci 0000:02:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.824856] pci 0000:02:03.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.836458] pci_bus 0000:03: busn_res: [bus 03-ff] end is updated to 03
[    1.846626] pci_bus 0000:04: busn_res: [bus 04-ff] end is updated to 04
[    1.856821] pci_bus 0000:05: busn_res: [bus 05-ff] end is updated to 05
[    1.863542] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 05
[    1.870257] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 05
[    1.876989] pci 0000:02:01.0: PCI bridge to [bus 03]
[    1.882059] pci 0000:02:02.0: PCI bridge to [bus 04]
[    1.887125] pci 0000:02:03.0: PCI bridge to [bus 05]
[    1.892188] pci 0000:01:00.0: PCI bridge to [bus 02-05]
[    1.897516] pci 0000:00:00.0: PCI bridge to [bus 01-05]
[    1.910499] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    1.919863] iproc-rng200 fe104000.rng: hwrng registered
[    1.925681] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[    1.935622] gpiomem-bcm2835 fe200000.gpiomem: Initialised: Registers at 0xfe200000
...

Additional context The issues seems simmilar to https://github.com/raspberrypi/firmware/issues/1766 Adding dtparm=pcie=off to boot/config.txt had no effect.

We also Tested the latest 6.2 from from https://github.com/raspberrypi/linux/tree/rpi-6.2.y.

Other things we tested:

Is there anything we could try to do? Did we miss somthing?

timg236 commented 1 year ago

Transferred to Linux since the firmware is not involved with PCIe

nbuchwitz commented 1 year ago

Afaik @6by9 has successfully used the pericom / diodes switch with the CM4. Do you remember if there were any hoops you had to jump? Does your card had the eeprom attached to the switch?

6by9 commented 1 year ago

I've a PI7C9X2G304 1:2 PCIe switch built in to a Hauppauge WinTV QuadHD DVB-T2/C tuner card. That needed dtoverlay=pcie-32bit-dma, but down to CX23888 chips on the other side.

I've also used a ASMedia ASM1184e 1:4 PCIe switch, which had no issues. I've not tested it recently though.

My NAS is a CM4IO running with a Pericom PCIe switch (12d8:2404), VL805 USB3 controller and Marvell 9215 SATA controller. It's still running a self-built 5.10.74-v8 kernel on Buster as I haven't rebuilt it for a while.

pi@cm4nas:~ $ dmesg | grep GT/s
[    1.254526] brcm-pcie fd500000.pcie: link up, 2.5 GT/s PCIe x1 (SSC)
[    1.259976] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:00.0 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)
[    1.274156] pci 0000:04:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:00.0 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)
[    1.278425] pci 0000:05:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:00.0 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)

No issues there.

nbuchwitz commented 1 year ago

Any chance you could share the kernel (config or files) and your firmware / eeprom version, so we can check with the diodes/pericom eval board?

The asm1184e is working in the same setup without a problem, so we're wondering what's the problem with the pericom. We have tested several boards with the pericom (custom board design) as well as the cm4io with the official pericom eval board. All fail with the same weird behavior as explained above.

6by9 commented 1 year ago
pi@cm4nas:~ $ vcgencmd version
Dec  1 2021 15:02:25 
Copyright (c) 2012 Broadcom
version 71bd3109023a0c8575585ba87cbb374d2eeb038f (clean) (release) (start_db)

pi@cm4nas:~ $ vcgencmd bootloader_version
Sep  3 2020 13:11:43
version c305221a6d7e532693cc7ff57fddfc8649def167 (release)
timestamp 1599135103
update-time 0
capabilities 0x00000000

pi@cm4nas:~ $ vcgencmd bootloader_config
[all]
WAKE_ON_GPIO=0
POWER_OFF_ON_HALT=1
DISABLE_HDMI=0
BOOT_ORDER=0xf41

# Example debug configuration
# USB MSD -> Network -> eMMC boot -> Repeat
#[gpio7=0]
#BOOT_ORDER=0xf124
#BOOT_UART=1

pi@cm4nas:~ $ uname -a
Linux cm4nas 5.10.74-v8+ #1 SMP PREEMPT Sun Nov 7 16:34:20 GMT 2021 aarch64 GNU/Linux

Kernel config was the base bcm2711_defconfig + CONFIG_SATA_AHCI=m.

Looking at the board, the chip is labelled P17C9X2G 404SLBFDE 1712GT. Board is labelled Name: PCIe1To3 PN:90.PCIE3.V10 Date: 20170503. Bought off ebay in Sept 2020, but the link is now dead. It looks very similar to https://www.ebay.co.uk/itm/304669598600

It is on a CM4Lite, so I'll see if I get time to make up a fresh SD card and try booting with it.

6by9 commented 1 year ago

Tested on Bullseye 64bit Lite with kernel/firmware as per the Sept image, apt dist-upgrade'd, and rpi-update. Rebooted half a dozen times with each and had no issues.

About the only thing I didn't update was my bootloader, which is still on

Sep  3 2020 13:11:43
version c305221a6d7e532693cc7ff57fddfc8649def167 (release)
timestamp 1599135103

Not much more I can add - for me it has been just plug and play.

nbuchwitz commented 1 year ago

Thanks a lot! We will test with with firmware version you're using and also check if we can get our hands on one of the above mentioned cards.

6by9 commented 1 year ago

The Ebay link above is nearly identical to my board, although I can't guarantee it.

iluminat23 commented 1 year ago

Hmm your dmesg output shows, that your card is only running Gen1 (2,5 GT/s). Have you pinned this to Gen1 in the devicetree or anything like that?

6by9 commented 1 year ago

Have you pinned this to Gen1 in the devicetree or anything like that?

No, this was literally a vanilla Bullseye Lite 64bit image which I updated. No changes to config.txt or device tree at all.

iluminat23 commented 1 year ago

OK, so there is something fishy here, as it should get a Gen2 link. But it seems to falls to Gen1 while doing link training.

6by9 commented 1 year ago

Seeing as there is nothing sensitive in this kernel log, attaching the whole thingdmesg.txt It does appear that the link from CM4IO to P17C9X2G is only coming up as Gen1.

6by9 commented 1 year ago

Checking on my Buster 5.10.74 kernel, the more complete lspci output for the host and Pericom upstream port:

pi@cm4nas:~ $ sudo lspci -vvv
00:00.0 PCI bridge: Broadcom Limited Device 2711 (rev 20) (prog-if 00 [Normal decode])
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Interrupt: pin A routed to IRQ 0
    Bus: primary=00, secondary=01, subordinate=05, sec-latency=0
    I/O behind bridge: 00000000-00000fff
    Memory behind bridge: c0000000-c01fffff
    Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff
    Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ <SERR- <PERR-
    BridgeCtl: Parity- SERR+ NoISA- VGA- MAbort- >Reset- FastB2B-
        PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
    Capabilities: [48] Power Management version 3
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold-)
        Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=1 PME-
    Capabilities: [ac] Express (v2) Root Port (Slot-), MSI 00
        DevCap: MaxPayload 512 bytes, PhantFunc 0
            ExtTag- RBE+
        DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
            RlxdOrd+ ExtTag- PhantFunc- AuxPwr+ NoSnoop+
            MaxPayload 128 bytes, MaxReadReq 512 bytes
        DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
        LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <2us, L1 <4us
            ClockPM+ Surprise- LLActRep- BwNot+ ASPMOptComp+
        LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk-
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt+
        RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible+
        RootCap: CRSVisible+
        RootSta: PME ReqID 0000, PMEStatus- PMEPending-
        DevCap2: Completion Timeout: Range ABCD, TimeoutDis+, LTR+, OBFF Via WAKE# ARIFwd-
        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR+, OBFF Disabled ARIFwd-
        LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
             Compliance De-emphasis: -6dB
        LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
             EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
    Capabilities: [100 v1] Advanced Error Reporting
        UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
        CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
        CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
        AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
    Capabilities: [180 v1] Vendor Specific Information: ID=0000 Rev=0 Len=028 <?>
    Capabilities: [240 v1] L1 PM Substates
        L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_PM_Substates+
              PortCommonModeRestoreTime=8us PortTPowerOnTime=10us
        L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
               T_CommonMode=1us LTR1.2_Threshold=0ns
        L1SubCtl2: T_PwrOn=10us

01:00.0 PCI bridge: Pericom Semiconductor Device 2404 (rev 05) (prog-if 00 [Normal decode])
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Bus: primary=01, secondary=02, subordinate=05, sec-latency=0
    I/O behind bridge: 0000f000-00000fff
    Memory behind bridge: c0000000-c01fffff
    Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff
    Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
    BridgeCtl: Parity- SERR+ NoISA- VGA- MAbort- >Reset- FastB2B-
        PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
    Capabilities: [40] Power Management version 3
        Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
        Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [5c] Vital Product Data
pcilib: sysfs_read_vpd: read failed: Input/output error
        Not readable
    Capabilities: [64] Vendor Specific Information: Len=34 <?>
    Capabilities: [b0] Subsystem: Device 0000:0000
    Capabilities: [c0] Express (v2) Upstream Port, MSI 00
        DevCap: MaxPayload 256 bytes, PhantFunc 0
            ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ SlotPowerLimit 0.000W
        DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
            RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
            MaxPayload 128 bytes, MaxReadReq 128 bytes
        DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr+ TransPend-
        LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM not supported, Exit Latency L0s <512ns, L1 <1us
            ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
        LnkCtl: ASPM Disabled; Disabled- CommClk-
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        DevCap2: Completion Timeout: Not Supported, TimeoutDis-, LTR+, OBFF Via message
        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR+, OBFF Disabled
        LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
             Compliance De-emphasis: -6dB
        LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-
             EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
    Capabilities: [100 v1] Advanced Error Reporting
        UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
        CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
        CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
        AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
    Capabilities: [140 v1] Virtual Channel
        Caps:   LPEVC=0 RefClk=100ns PATEntryBits=4
        Arb:    Fixed- WRR32- WRR64- WRR128-
        Ctrl:   ArbSelect=Fixed
        Status: InProgress-
        VC0:    Caps:   PATOffset=04 MaxTimeSlots=64 RejSnoopTrans-
            Arb:    Fixed+ WRR32- WRR64- WRR128+ TWRR128- WRR256-
            Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
            Status: NegoPending- InProgress-
            Port Arbitration Table <?>
    Capabilities: [20c v1] Power Budgeting <?>
    Capabilities: [230 v1] Latency Tolerance Reporting
        Max snoop latency: 0ns
        Max no snoop latency: 0ns

Checking /proc/device-tree/scb/pcie@7d500000/max-link-speed, it is set to 1. I'll check again on the 6.1 kernel.....

6by9 commented 1 year ago

6.1.12 is running as Gen2 on all active links, and no kernel panics seen. dmesg.txt

pi@raspberrypi:~ $ sudo lspci -vvv
00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2711 PCIe Bridge (rev 20) (prog-if 00 [Normal decode])
    Device tree node: /sys/firmware/devicetree/base/scb/pcie@7d500000/pci@0,0
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Interrupt: pin A routed to IRQ 0
    Bus: primary=00, secondary=01, subordinate=05, sec-latency=0
    I/O behind bridge: 00000000-00000fff [size=4K]
    Memory behind bridge: c0000000-c01fffff [size=2M]
    Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff [disabled]
    Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ <SERR- <PERR-
    BridgeCtl: Parity- SERR- NoISA- VGA- VGA16- MAbort- >Reset- FastB2B-
        PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
    Capabilities: [48] Power Management version 3
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold-)
        Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=1 PME-
    Capabilities: [ac] Express (v2) Root Port (Slot-), MSI 00
        DevCap: MaxPayload 512 bytes, PhantFunc 0
            ExtTag- RBE+
        DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
            RlxdOrd+ ExtTag- PhantFunc- AuxPwr+ NoSnoop+
            MaxPayload 128 bytes, MaxReadReq 512 bytes
        DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
        LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <2us, L1 <4us
            ClockPM+ Surprise- LLActRep- BwNot+ ASPMOptComp+
        LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk-
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 5GT/s (ok), Width x1 (ok)
            TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt+
        RootCap: CRSVisible+
        RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
        RootSta: PME ReqID 0000, PMEStatus- PMEPending-
        DevCap2: Completion Timeout: Range ABCD, TimeoutDis+ NROPrPrP- LTR+
             10BitTagComp- 10BitTagReq- OBFF Via WAKE#, ExtFmt- EETLPPrefix-
             EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
             FRS- LN System CLS Not Supported, TPHComp- ExtTPHComp- ARIFwd-
             AtomicOpsCap: Routing- 32bit- 64bit- 128bitCAS-
        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR+ OBFF Disabled, ARIFwd-
             AtomicOpsCtl: ReqEn- EgressBlck-
        LnkCap2: Supported Link Speeds: 2.5-5GT/s, Crosslink- Retimer- 2Retimers- DRS+
        LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
             Compliance De-emphasis: -6dB
        LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
             EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
             Retimer- 2Retimers- CrosslinkRes: unsupported, DRS-
             DownstreamComp: Link Down - Not Determined
    Capabilities: [100 v1] Advanced Error Reporting
        UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
        CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
        CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
        AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn-
            MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
        HeaderLog: 00000000 00000000 00000000 00000000
        RootCmd: CERptEn- NFERptEn- FERptEn-
        RootSta: CERcvd- MultCERcvd- UERcvd- MultUERcvd-
             FirstFatal- NonFatalMsg- FatalMsg- IntMsg 0
        ErrorSrc: ERR_COR: 0000 ERR_FATAL/NONFATAL: 0000
    Capabilities: [180 v1] Vendor Specific Information: ID=0000 Rev=0 Len=028 <?>
    Capabilities: [240 v1] L1 PM Substates
        L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_PM_Substates+
              PortCommonModeRestoreTime=8us PortTPowerOnTime=10us
        L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
               T_CommonMode=1us LTR1.2_Threshold=0ns
        L1SubCtl2: T_PwrOn=10us

01:00.0 PCI bridge: Pericom Semiconductor PI7C9X2G404 EL/SL PCIe2 4-Port/4-Lane Packet Switch (rev 05) (prog-if 00 [Normal decode])
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Bus: primary=01, secondary=02, subordinate=05, sec-latency=0
    I/O behind bridge: 0000f000-00000fff [disabled]
    Memory behind bridge: c0000000-c01fffff [size=2M]
    Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff [disabled]
    Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
    BridgeCtl: Parity- SERR+ NoISA- VGA- VGA16- MAbort- >Reset- FastB2B-
        PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
    Capabilities: [40] Power Management version 3
        Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
        Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [5c] Vital Product Data
pcilib: sysfs_read_vpd: read failed: No such device
        Not readable
    Capabilities: [64] Vendor Specific Information: Len=34 <?>
    Capabilities: [b0] Subsystem: Device 0000:0000
    Capabilities: [c0] Express (v2) Upstream Port, MSI 00
        DevCap: MaxPayload 256 bytes, PhantFunc 0
            ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ SlotPowerLimit 0.000W
        DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
            RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
            MaxPayload 128 bytes, MaxReadReq 128 bytes
        DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+ AuxPwr+ TransPend-
        LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM not supported
            ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
        LnkCtl: ASPM Disabled; Disabled- CommClk-
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 5GT/s (ok), Width x1 (ok)
            TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        DevCap2: Completion Timeout: Not Supported, TimeoutDis- NROPrPrP- LTR+
             10BitTagComp- 10BitTagReq- OBFF Via message, ExtFmt- EETLPPrefix-
             EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
             FRS-
             AtomicOpsCap: Routing-
        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR+ OBFF Disabled,
             AtomicOpsCtl: EgressBlck-
        LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
             Compliance De-emphasis: -6dB
        LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
             EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
             Retimer- 2Retimers- CrosslinkRes: unsupported
    Capabilities: [100 v1] Advanced Error Reporting
        UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
        CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
        CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
        AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
            MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
        HeaderLog: 00000000 00000000 00000000 00000000
    Capabilities: [140 v1] Virtual Channel
        Caps:   LPEVC=0 RefClk=100ns PATEntryBits=4
        Arb:    Fixed- WRR32- WRR64- WRR128-
        Ctrl:   ArbSelect=Fixed
        Status: InProgress-
        VC0:    Caps:   PATOffset=04 MaxTimeSlots=64 RejSnoopTrans-
            Arb:    Fixed+ WRR32- WRR64- WRR128+ TWRR128- WRR256-
            Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
            Status: NegoPending- InProgress-
            Port Arbitration Table <?>
    Capabilities: [20c v1] Power Budgeting <?>
    Capabilities: [230 v1] Latency Tolerance Reporting
        Max snoop latency: 0ns
        Max no snoop latency: 0ns
02:01.0 PCI bridge: Pericom Semiconductor PI7C9X2G404 EL/SL PCIe2 4-Port/4-Lane Packet Switch (rev 05) (prog-if 00 [Normal decode])
    Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx+
    Bus: primary=02, secondary=03, subordinate=03, sec-latency=0
    I/O behind bridge: 0000f000-00000fff [disabled]
    Memory behind bridge: fff00000-000fffff [disabled]
    Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff [disabled]
    Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
    BridgeCtl: Parity- SERR+ NoISA- VGA- VGA16- MAbort- >Reset- FastB2B-
        PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
    Capabilities: [40] Power Management version 3
        Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
        Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [4c] MSI: Enable- Count=1/1 Maskable- 64bit+
        Address: 0000000000000000  Data: 0000
    Capabilities: [64] Vendor Specific Information: Len=34 <?>
    Capabilities: [b0] Subsystem: Device 0000:0000
    Capabilities: [c0] Express (v2) Downstream Port (Slot+), MSI 00
        DevCap: MaxPayload 256 bytes, PhantFunc 0
            ExtTag- RBE+
        DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
            RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
            MaxPayload 128 bytes, MaxReadReq 128 bytes
        DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-
        LnkCap: Port #1, Speed 5GT/s, Width x1, ASPM not supported
            ClockPM- Surprise- LLActRep- BwNot+ ASPMOptComp-
        LnkCtl: ASPM Disabled; Disabled- CommClk-
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 2.5GT/s (downgraded), Width x1 (ok)
            TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
            Slot #0, PowerLimit 0.000W; Interlock- NoCompl-
        SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
            Control: AttnInd Off, PwrInd Off, Power- Interlock-
        SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
            Changed: MRL- PresDet+ LinkState-
        DevCap2: Completion Timeout: Not Supported, TimeoutDis- NROPrPrP- LTR+
             10BitTagComp- 10BitTagReq- OBFF Via message, ExtFmt- EETLPPrefix-
             EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
             FRS- ARIFwd-
             AtomicOpsCap: Routing-
        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR+ OBFF Disabled, ARIFwd-
             AtomicOpsCtl: EgressBlck-
        LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -3.5dB
             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
             Compliance De-emphasis: -6dB
        LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete- EqualizationPhase1-
             EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
             Retimer- 2Retimers- CrosslinkRes: unsupported
    Capabilities: [100 v1] Advanced Error Reporting
        UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
        CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
        CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
        AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
            MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
        HeaderLog: 00000000 00000000 00000000 00000000
    Capabilities: [140 v1] Virtual Channel
        Caps:   LPEVC=0 RefClk=100ns PATEntryBits=4
        Arb:    Fixed- WRR32- WRR64- WRR128-
        Ctrl:   ArbSelect=Fixed
        Status: InProgress-
        VC0:    Caps:   PATOffset=04 MaxTimeSlots=64 RejSnoopTrans-
            Arb:    Fixed+ WRR32- WRR64- WRR128+ TWRR128- WRR256-
            Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
            Status: NegoPending+ InProgress-
            Port Arbitration Table <?>
    Capabilities: [20c v1] Power Budgeting <?>
    Capabilities: [220 v1] Access Control Services
        ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir+ UpstreamFwd+ EgressCtrl+ DirectTrans+
        ACSCtl: SrcValid- TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans-

02:02.0 PCI bridge: Pericom Semiconductor PI7C9X2G404 EL/SL PCIe2 4-Port/4-Lane Packet Switch (rev 05) (prog-if 00 [Normal decode])
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Bus: primary=02, secondary=04, subordinate=04, sec-latency=0
    I/O behind bridge: 0000f000-00000fff [disabled]
    Memory behind bridge: c0000000-c00fffff [size=1M]
    Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff [disabled]
    Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
    BridgeCtl: Parity- SERR+ NoISA- VGA- VGA16- MAbort- >Reset- FastB2B-
        PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
    Capabilities: [40] Power Management version 3
        Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
        Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [4c] MSI: Enable- Count=1/1 Maskable- 64bit+
        Address: 0000000000000000  Data: 0000
    Capabilities: [64] Vendor Specific Information: Len=34 <?>
    Capabilities: [b0] Subsystem: Device 0000:0000
    Capabilities: [c0] Express (v2) Downstream Port (Slot+), MSI 00
        DevCap: MaxPayload 256 bytes, PhantFunc 0
            ExtTag- RBE+
        DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
            RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
            MaxPayload 128 bytes, MaxReadReq 128 bytes
        DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-
        LnkCap: Port #2, Speed 5GT/s, Width x1, ASPM not supported
            ClockPM- Surprise- LLActRep- BwNot+ ASPMOptComp-
        LnkCtl: ASPM Disabled; Disabled- CommClk-
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 5GT/s (ok), Width x1 (ok)
            TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
            Slot #0, PowerLimit 0.000W; Interlock- NoCompl-
        SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
            Control: AttnInd Off, PwrInd Off, Power- Interlock-
        SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
            Changed: MRL- PresDet- LinkState+
        DevCap2: Completion Timeout: Not Supported, TimeoutDis- NROPrPrP- LTR+
             10BitTagComp- 10BitTagReq- OBFF Via message, ExtFmt- EETLPPrefix-
             EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
             FRS- ARIFwd-
             AtomicOpsCap: Routing-
        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR+ OBFF Disabled, ARIFwd-
             AtomicOpsCtl: EgressBlck-
        LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -3.5dB
             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
             Compliance De-emphasis: -6dB
        LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete- EqualizationPhase1-
             EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
             Retimer- 2Retimers- CrosslinkRes: unsupported
    Capabilities: [100 v1] Advanced Error Reporting
        UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
        CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
        CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
        AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
            MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
        HeaderLog: 00000000 00000000 00000000 00000000
    Capabilities: [140 v1] Virtual Channel
        Caps:   LPEVC=0 RefClk=100ns PATEntryBits=4
        Arb:    Fixed- WRR32- WRR64- WRR128-
        Ctrl:   ArbSelect=Fixed
        Status: InProgress-
        VC0:    Caps:   PATOffset=04 MaxTimeSlots=64 RejSnoopTrans-
            Arb:    Fixed+ WRR32- WRR64- WRR128+ TWRR128- WRR256-
            Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
            Status: NegoPending- InProgress-
            Port Arbitration Table <?>
    Capabilities: [20c v1] Power Budgeting <?>
    Capabilities: [220 v1] Access Control Services
        ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir+ UpstreamFwd+ EgressCtrl+ DirectTrans+
        ACSCtl: SrcValid- TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans-

02:03.0 PCI bridge: Pericom Semiconductor PI7C9X2G404 EL/SL PCIe2 4-Port/4-Lane Packet Switch (rev 05) (prog-if 00 [Normal decode])
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Bus: primary=02, secondary=05, subordinate=05, sec-latency=0
    I/O behind bridge: 0000f000-00000fff [disabled]
    Memory behind bridge: c0100000-c01fffff [size=1M]
    Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff [disabled]
    Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
    BridgeCtl: Parity- SERR+ NoISA- VGA- VGA16- MAbort- >Reset- FastB2B-
        PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
    Capabilities: [40] Power Management version 3
        Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
        Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [4c] MSI: Enable- Count=1/1 Maskable- 64bit+
        Address: 0000000000000000  Data: 0000
    Capabilities: [64] Vendor Specific Information: Len=34 <?>
    Capabilities: [b0] Subsystem: Device 0000:0000
    Capabilities: [c0] Express (v2) Downstream Port (Slot+), MSI 00
        DevCap: MaxPayload 256 bytes, PhantFunc 0
            ExtTag- RBE+
        DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
            RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
            MaxPayload 128 bytes, MaxReadReq 128 bytes
        DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-
        LnkCap: Port #3, Speed 5GT/s, Width x1, ASPM not supported
            ClockPM- Surprise- LLActRep- BwNot+ ASPMOptComp-
        LnkCtl: ASPM Disabled; Disabled- CommClk-
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 5GT/s (ok), Width x1 (ok)
            TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
            Slot #0, PowerLimit 0.000W; Interlock- NoCompl-
        SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
            Control: AttnInd Off, PwrInd Off, Power- Interlock-
        SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
            Changed: MRL- PresDet- LinkState+
        DevCap2: Completion Timeout: Not Supported, TimeoutDis- NROPrPrP- LTR+
             10BitTagComp- 10BitTagReq- OBFF Via message, ExtFmt- EETLPPrefix-
             EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
             FRS- ARIFwd-
             AtomicOpsCap: Routing-
        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR+ OBFF Disabled, ARIFwd-
             AtomicOpsCtl: EgressBlck-
        LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -3.5dB
             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
             Compliance De-emphasis: -6dB
        LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete- EqualizationPhase1-
             EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
             Retimer- 2Retimers- CrosslinkRes: unsupported
    Capabilities: [100 v1] Advanced Error Reporting
        UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
        CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
        CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
        AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
            MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
        HeaderLog: 00000000 00000000 00000000 00000000
    Capabilities: [140 v1] Virtual Channel
        Caps:   LPEVC=0 RefClk=100ns PATEntryBits=4
        Arb:    Fixed- WRR32- WRR64- WRR128-
        Ctrl:   ArbSelect=Fixed
        Status: InProgress-
        VC0:    Caps:   PATOffset=04 MaxTimeSlots=64 RejSnoopTrans-
            Arb:    Fixed+ WRR32- WRR64- WRR128+ TWRR128- WRR256-
            Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
            Status: NegoPending- InProgress-
            Port Arbitration Table <?>
    Capabilities: [20c v1] Power Budgeting <?>
    Capabilities: [220 v1] Access Control Services
        ACSCap: SrcValid+ TransBlk+ ReqRedir+ CmpltRedir+ UpstreamFwd+ EgressCtrl+ DirectTrans+
        ACSCtl: SrcValid- TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans-

04:00.0 SATA controller: Marvell Technology Group Ltd. 88SE9215 PCIe 2.0 x1 4-port SATA 6 Gb/s Controller (rev 11) (prog-if 01 [AHCI 1.0])
    Subsystem: Marvell Technology Group Ltd. 88SE9215 PCIe 2.0 x1 4-port SATA 6 Gb/s Controller
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Interrupt: pin A routed to IRQ 42
    Region 0: I/O ports at 0000
    Region 1: I/O ports at 0000
    Region 2: I/O ports at 0000
    Region 3: I/O ports at 0000
    Region 4: I/O ports at 0000
    Region 5: Memory at 600040000 (32-bit, non-prefetchable) [size=2K]
    Expansion ROM at 600000000 [size=256K]
    Capabilities: [40] Power Management version 3
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold-)
        Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit-
        Address: fffffffc  Data: 6541
    Capabilities: [70] Express (v2) Legacy Endpoint, MSI 00
        DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s <1us, L1 <8us
            ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
        DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
            RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
            MaxPayload 128 bytes, MaxReadReq 512 bytes
        DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
        LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <512ns, L1 <64us
            ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
        LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk-
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 5GT/s (ok), Width x1 (ok)
            TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        DevCap2: Completion Timeout: Not Supported, TimeoutDis+ NROPrPrP- LTR-
             10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt- EETLPPrefix-
             EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
             FRS-
             AtomicOpsCap: 32bit- 64bit- 128bitCAS-
        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- OBFF Disabled,
             AtomicOpsCtl: ReqEn-
        LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
             Compliance De-emphasis: -6dB
        LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
             EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
             Retimer- 2Retimers- CrosslinkRes: unsupported
    Capabilities: [e0] SATA HBA v0.0 BAR4 Offset=00000004
    Capabilities: [100 v1] Advanced Error Reporting
        UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
        CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
        CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
        AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn-
            MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
        HeaderLog: 00000000 00000000 00000000 00000000
    Kernel driver in use: ahci
    Kernel modules: ahci

05:00.0 USB controller: VIA Technologies, Inc. VL805 USB 3.0 Host Controller (rev 01) (prog-if 30 [XHCI])
    Subsystem: VIA Technologies, Inc. VL805 USB 3.0 Host Controller
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0, Cache Line Size: 64 bytes
    Interrupt: pin A routed to IRQ 34
    Region 0: Memory at 600100000 (64-bit, non-prefetchable) [size=4K]
    Capabilities: [80] Power Management version 3
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
        Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [90] MSI: Enable+ Count=1/4 Maskable- 64bit+
        Address: 00000000fffffffc  Data: 6540
    Capabilities: [c4] Express (v2) Endpoint, MSI 00
        DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
            ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 0.000W
        DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
            RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
            MaxPayload 128 bytes, MaxReadReq 512 bytes
        DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-
        LnkCap: Port #3, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <2us, L1 <16us
            ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp-
        LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk-
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 5GT/s (ok), Width x1 (ok)
            TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        DevCap2: Completion Timeout: Range B, TimeoutDis+ NROPrPrP- LTR-
             10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt- EETLPPrefix-
             EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
             FRS- TPHComp- ExtTPHComp-
             AtomicOpsCap: 32bit- 64bit- 128bitCAS-
        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- OBFF Disabled,
             AtomicOpsCtl: ReqEn-
        LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis+
             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
             Compliance De-emphasis: -6dB
        LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
             EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
             Retimer- 2Retimers- CrosslinkRes: unsupported
    Capabilities: [100 v1] Advanced Error Reporting
        UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
        CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
        CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
        AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn-
            MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
        HeaderLog: 00000000 00000000 00000000 00000000
    Kernel driver in use: xhci_hcd

(Port 02:01.0 had an accident where I dropped the switch with a card plugged in and it pulled the plastic shell of the connector off rendering it useless, so it's not connected to anything. That is likely why it is reported as degraded to 2.5GT/s)

antonbo commented 1 year ago

I also have problems with very similar setup and crash but looks a bit different So I have: CM4 + CM4 IO board as base. PCIe connected to switch ASMedia Technology Inc. ASM1184e PCIe Switch 3 of 4 slots on switch is occupied with

  1. USB3 controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02)
  2. SATA controller: Marvell Technology Group Ltd. 88SE9215 PCIe 2.0 x1 4-port SATA 6 Gb/s Controller (rev 11)
  3. SATA controller: Marvell Technology Group Ltd. 88SE9215 PCIe 2.0 x1 4-port SATA 6 Gb/s Controller (rev 11) (second one)

In case if all disks are connected only to a single SATA PCIe controller system is very stable. Uptime now 18 days with 24/7 usage. But as soon as I connect disks to the second SATA controller the system starting to crash. Usually quite easy to trigger with shell command 'sync'. But might happen itself after some time. I was unlucky and second controller were installed at the same time when kernel was updated from 5.x to 6x so I reverted back to 5.x version. It worked for some days and than started to crash immediately after boot up.

I'm using BTRFS on all disks (but no RAID or similar).

Solution tried dtoverlay=pcie-32bit-dma in the config.txt and pci=nomsi in cmdline.txt

Crash screenshot (sorry, do not have serial log attached so took screen shot from monitor) crash

lspci -vvv output

lspci -vvv
00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2711 PCIe Bridge (rev 20) (prog-if 00 [Normal decode])
    Device tree node: /sys/firmware/devicetree/base/scb/pcie@7d500000/pci@0,0
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Interrupt: pin A routed to IRQ 0
    Bus: primary=00, secondary=01, subordinate=06, sec-latency=0
    I/O behind bridge: 00000000-00000fff [size=4K]
    Memory behind bridge: c0000000-c02fffff [size=3M]
    Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff [disabled]
    Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ <SERR- <PERR-
    BridgeCtl: Parity- SERR- NoISA- VGA- VGA16- MAbort- >Reset- FastB2B-
        PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
    Capabilities: [48] Power Management version 3
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold-)
        Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=1 PME-
    Capabilities: [ac] Express (v2) Root Port (Slot-), MSI 00
        DevCap: MaxPayload 512 bytes, PhantFunc 0
            ExtTag- RBE+
        DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
            RlxdOrd+ ExtTag- PhantFunc- AuxPwr+ NoSnoop+
            MaxPayload 128 bytes, MaxReadReq 512 bytes
        DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
        LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <1us, L1 <2us
            ClockPM+ Surprise- LLActRep- BwNot+ ASPMOptComp+
        LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 5GT/s (ok), Width x1 (ok)
            TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt+
        RootCap: CRSVisible+
        RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
        RootSta: PME ReqID 0000, PMEStatus- PMEPending-
        DevCap2: Completion Timeout: Range ABCD, TimeoutDis+ NROPrPrP- LTR+
             10BitTagComp- 10BitTagReq- OBFF Via WAKE#, ExtFmt- EETLPPrefix-
             EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
             FRS- LN System CLS Not Supported, TPHComp- ExtTPHComp- ARIFwd-
             AtomicOpsCap: Routing- 32bit- 64bit- 128bitCAS-
        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- OBFF Disabled, ARIFwd-
             AtomicOpsCtl: ReqEn- EgressBlck-
        LnkCap2: Supported Link Speeds: 2.5-5GT/s, Crosslink- Retimer- 2Retimers- DRS+
        LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
             Compliance De-emphasis: -6dB
        LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
             EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
             Retimer- 2Retimers- CrosslinkRes: unsupported, DRS-
             DownstreamComp: Link Down - Not Determined
    Capabilities: [100 v1] Advanced Error Reporting
        UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
        CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
        CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
        AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn-
            MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
        HeaderLog: 00000000 00000000 00000000 00000000
        RootCmd: CERptEn- NFERptEn- FERptEn-
        RootSta: CERcvd- MultCERcvd- UERcvd- MultUERcvd-
             FirstFatal- NonFatalMsg- FatalMsg- IntMsg 0
        ErrorSrc: ERR_COR: 0000 ERR_FATAL/NONFATAL: 0000
    Capabilities: [180 v1] Vendor Specific Information: ID=0000 Rev=0 Len=028 <?>
    Capabilities: [240 v1] L1 PM Substates
        L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_PM_Substates+
              PortCommonModeRestoreTime=8us PortTPowerOnTime=10us
        L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
               T_CommonMode=1us LTR1.2_Threshold=0ns
        L1SubCtl2: T_PwrOn=10us
lspci: Unable to load libkmod resources: error -2

01:00.0 PCI bridge: ASMedia Technology Inc. ASM1184e PCIe Switch Port (prog-if 00 [Normal decode])
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Interrupt: pin A routed to IRQ 0
    Bus: primary=01, secondary=02, subordinate=06, sec-latency=0
    I/O behind bridge: 0000f000-00000fff [disabled]
    Memory behind bridge: c0000000-c02fffff [size=3M]
    Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff [disabled]
    Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
    BridgeCtl: Parity- SERR+ NoISA- VGA- VGA16- MAbort- >Reset- FastB2B-
        PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
    Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
        Address: 0000000000000000  Data: 0000
    Capabilities: [78] Power Management version 3
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
        Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [80] Express (v2) Upstream Port, MSI 00
        DevCap: MaxPayload 256 bytes, PhantFunc 0
            ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ SlotPowerLimit 0.000W
        DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
            RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
            MaxPayload 128 bytes, MaxReadReq 512 bytes
        DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-
        LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <2us, L1 unlimited
            ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+
        LnkCtl: ASPM Disabled; Disabled- CommClk+
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 5GT/s (ok), Width x1 (ok)
            TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        DevCap2: Completion Timeout: Not Supported, TimeoutDis- NROPrPrP- LTR-
             10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt- EETLPPrefix-
             EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
             FRS-
             AtomicOpsCap: Routing-
        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- OBFF Disabled,
             AtomicOpsCtl: EgressBlck-
        LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
             Compliance De-emphasis: -6dB
        LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete- EqualizationPhase1-
             EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
             Retimer- 2Retimers- CrosslinkRes: unsupported
    Capabilities: [c0] Subsystem: ASMedia Technology Inc. ASM1184e PCIe Switch Port
    Capabilities: [100 v1] Virtual Channel
        Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
        Arb:    Fixed- WRR32- WRR64- WRR128-
        Ctrl:   ArbSelect=Fixed
        Status: InProgress-
        VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
            Arb:    Fixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-
            Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
            Status: NegoPending- InProgress-
    Capabilities: [200 v1] Advanced Error Reporting
        UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
        CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
        CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
        AERCap: First Error Pointer: 1f, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
            MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
        HeaderLog: 00000000 00000000 00000000 00000000
    Capabilities: [300 v1] Vendor Specific Information: ID=0000 Rev=0 Len=c00 <?>

02:01.0 PCI bridge: ASMedia Technology Inc. ASM1184e PCIe Switch Port (prog-if 00 [Normal decode])
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Interrupt: pin A routed to IRQ 0
    Bus: primary=02, secondary=03, subordinate=03, sec-latency=0
    I/O behind bridge: 0000f000-00000fff [disabled]
    Memory behind bridge: c0000000-c00fffff [size=1M]
    Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff [disabled]
    Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
    BridgeCtl: Parity- SERR+ NoISA- VGA- VGA16- MAbort- >Reset- FastB2B-
        PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
    Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
        Address: 0000000000000000  Data: 0000
    Capabilities: [78] Power Management version 3
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
        Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [80] Express (v2) Downstream Port (Slot+), MSI 00
        DevCap: MaxPayload 256 bytes, PhantFunc 0
            ExtTag+ RBE+
        DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
            RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
            MaxPayload 128 bytes, MaxReadReq 512 bytes
        DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-
        LnkCap: Port #1, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <2us, L1 unlimited
            ClockPM- Surprise- LLActRep+ BwNot+ ASPMOptComp+
        LnkCtl: ASPM Disabled; Disabled- CommClk+
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 5GT/s (ok), Width x1 (ok)
            TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
        SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
            Slot #1, PowerLimit 26.000W; Interlock- NoCompl-
        SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
            Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
        SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
            Changed: MRL- PresDet- LinkState+
        DevCap2: Completion Timeout: Not Supported, TimeoutDis- NROPrPrP- LTR-
             10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt- EETLPPrefix-
             EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
             FRS- ARIFwd-
             AtomicOpsCap: Routing-
        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- OBFF Disabled, ARIFwd-
             AtomicOpsCtl: EgressBlck-
        LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB
             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
             Compliance De-emphasis: -6dB
        LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
             EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
             Retimer- 2Retimers- CrosslinkRes: unsupported
    Capabilities: [c0] Subsystem: ASMedia Technology Inc. ASM1184e PCIe Switch Port
    Capabilities: [100 v1] Virtual Channel
        Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
        Arb:    Fixed- WRR32- WRR64- WRR128-
        Ctrl:   ArbSelect=Fixed
        Status: InProgress-
        VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
            Arb:    Fixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-
            Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
            Status: NegoPending- InProgress-
    Capabilities: [200 v1] Advanced Error Reporting
        UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
        CESta:  RxErr+ BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
        CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
        AERCap: First Error Pointer: 1f, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
            MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
        HeaderLog: 00000000 00000000 00000000 00000000

02:03.0 PCI bridge: ASMedia Technology Inc. ASM1184e PCIe Switch Port (prog-if 00 [Normal decode])
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Interrupt: pin A routed to IRQ 0
    Bus: primary=02, secondary=04, subordinate=04, sec-latency=0
    I/O behind bridge: 0000f000-00000fff [disabled]
    Memory behind bridge: c0100000-c01fffff [size=1M]
    Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff [disabled]
    Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
    BridgeCtl: Parity- SERR+ NoISA- VGA- VGA16- MAbort- >Reset- FastB2B-
        PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
    Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
        Address: 0000000000000000  Data: 0000
    Capabilities: [78] Power Management version 3
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
        Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [80] Express (v2) Downstream Port (Slot+), MSI 00
        DevCap: MaxPayload 256 bytes, PhantFunc 0
            ExtTag+ RBE+
        DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
            RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
            MaxPayload 128 bytes, MaxReadReq 512 bytes
        DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-
        LnkCap: Port #3, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <2us, L1 unlimited
            ClockPM- Surprise- LLActRep+ BwNot+ ASPMOptComp+
        LnkCtl: ASPM Disabled; Disabled- CommClk+
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 5GT/s (ok), Width x1 (ok)
            TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt+
        SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
            Slot #3, PowerLimit 26.000W; Interlock- NoCompl-
        SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
            Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
        SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
            Changed: MRL- PresDet- LinkState+
        DevCap2: Completion Timeout: Not Supported, TimeoutDis- NROPrPrP- LTR-
             10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt- EETLPPrefix-
             EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
             FRS- ARIFwd-
             AtomicOpsCap: Routing-
        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- OBFF Disabled, ARIFwd-
             AtomicOpsCtl: EgressBlck-
        LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB
             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
             Compliance De-emphasis: -6dB
        LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
             EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
             Retimer- 2Retimers- CrosslinkRes: unsupported
    Capabilities: [c0] Subsystem: ASMedia Technology Inc. ASM1184e PCIe Switch Port
    Capabilities: [100 v1] Virtual Channel
        Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
        Arb:    Fixed- WRR32- WRR64- WRR128-
        Ctrl:   ArbSelect=Fixed
        Status: InProgress-
        VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
            Arb:    Fixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-
            Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
            Status: NegoPending- InProgress-
    Capabilities: [200 v1] Advanced Error Reporting
        UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
        CESta:  RxErr+ BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
        CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
        AERCap: First Error Pointer: 1f, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
            MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
        HeaderLog: 00000000 00000000 00000000 00000000

02:05.0 PCI bridge: ASMedia Technology Inc. ASM1184e PCIe Switch Port (prog-if 00 [Normal decode])
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Interrupt: pin A routed to IRQ 0
    Bus: primary=02, secondary=05, subordinate=05, sec-latency=0
    I/O behind bridge: 0000f000-00000fff [disabled]
    Memory behind bridge: c0200000-c02fffff [size=1M]
    Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff [disabled]
    Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
    BridgeCtl: Parity- SERR+ NoISA- VGA- VGA16- MAbort- >Reset- FastB2B-
        PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
    Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
        Address: 0000000000000000  Data: 0000
    Capabilities: [78] Power Management version 3
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
        Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [80] Express (v2) Downstream Port (Slot+), MSI 00
        DevCap: MaxPayload 256 bytes, PhantFunc 0
            ExtTag+ RBE+
        DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
            RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
            MaxPayload 128 bytes, MaxReadReq 512 bytes
        DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-
        LnkCap: Port #5, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <2us, L1 unlimited
            ClockPM- Surprise- LLActRep+ BwNot+ ASPMOptComp+
        LnkCtl: ASPM Disabled; Disabled- CommClk+
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 5GT/s (ok), Width x1 (ok)
            TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt+
        SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
            Slot #5, PowerLimit 26.000W; Interlock- NoCompl-
        SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
            Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
        SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
            Changed: MRL- PresDet- LinkState+
        DevCap2: Completion Timeout: Not Supported, TimeoutDis- NROPrPrP- LTR-
             10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt- EETLPPrefix-
             EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
             FRS- ARIFwd-
             AtomicOpsCap: Routing-
        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- OBFF Disabled, ARIFwd-
             AtomicOpsCtl: EgressBlck-
        LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB
             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
             Compliance De-emphasis: -6dB
        LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
             EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
             Retimer- 2Retimers- CrosslinkRes: unsupported
    Capabilities: [c0] Subsystem: ASMedia Technology Inc. ASM1184e PCIe Switch Port
    Capabilities: [100 v1] Virtual Channel
        Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
        Arb:    Fixed- WRR32- WRR64- WRR128-
        Ctrl:   ArbSelect=Fixed
        Status: InProgress-
        VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
            Arb:    Fixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-
            Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
            Status: NegoPending- InProgress-
    Capabilities: [200 v1] Advanced Error Reporting
        UESta:  DLP+ SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
        CESta:  RxErr+ BadTLP+ BadDLLP+ Rollover- Timeout- AdvNonFatalErr-
        CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
        AERCap: First Error Pointer: 04, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
            MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
        HeaderLog: fefefe50 c2dadcfe fe63ddb5 1f314665

02:07.0 PCI bridge: ASMedia Technology Inc. ASM1184e PCIe Switch Port (prog-if 00 [Normal decode])
    Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Interrupt: pin A routed to IRQ 0
    Bus: primary=02, secondary=06, subordinate=06, sec-latency=0
    I/O behind bridge: 0000f000-00000fff [disabled]
    Memory behind bridge: fff00000-000fffff [disabled]
    Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff [disabled]
    Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
    BridgeCtl: Parity- SERR+ NoISA- VGA- VGA16- MAbort- >Reset- FastB2B-
        PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
    Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
        Address: 0000000000000000  Data: 0000
    Capabilities: [78] Power Management version 3
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
        Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [80] Express (v2) Downstream Port (Slot+), MSI 00
        DevCap: MaxPayload 256 bytes, PhantFunc 0
            ExtTag+ RBE+
        DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
            RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
            MaxPayload 128 bytes, MaxReadReq 512 bytes
        DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-
        LnkCap: Port #7, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s unlimited, L1 unlimited
            ClockPM- Surprise- LLActRep+ BwNot+ ASPMOptComp+
        LnkCtl: ASPM Disabled; Disabled- CommClk-
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 2.5GT/s (downgraded), Width x1 (ok)
            TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
            Slot #7, PowerLimit 26.000W; Interlock- NoCompl-
        SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
            Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
        SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
            Changed: MRL- PresDet- LinkState-
        DevCap2: Completion Timeout: Not Supported, TimeoutDis- NROPrPrP- LTR-
             10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt- EETLPPrefix-
             EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
             FRS- ARIFwd-
             AtomicOpsCap: Routing-
        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- OBFF Disabled, ARIFwd-
             AtomicOpsCtl: EgressBlck-
        LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB
             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
             Compliance De-emphasis: -6dB
        LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete- EqualizationPhase1-
             EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
             Retimer- 2Retimers- CrosslinkRes: unsupported
    Capabilities: [c0] Subsystem: ASMedia Technology Inc. ASM1184e PCIe Switch Port
    Capabilities: [100 v1] Virtual Channel
        Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
        Arb:    Fixed- WRR32- WRR64- WRR128-
        Ctrl:   ArbSelect=Fixed
        Status: InProgress-
        VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
            Arb:    Fixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-
            Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
            Status: NegoPending+ InProgress-
    Capabilities: [200 v1] Advanced Error Reporting
        UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
        CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
        CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
        AERCap: First Error Pointer: 1f, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
            MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
        HeaderLog: 00000000 00000000 00000000 00000000

03:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02) (prog-if 30 [XHCI])
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0, Cache Line Size: 64 bytes
    Interrupt: pin A routed to IRQ 32
    Region 0: Memory at 600000000 (64-bit, non-prefetchable) [size=8K]
    Capabilities: [50] Power Management version 3
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
        Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [70] MSI: Enable- Count=1/8 Maskable- 64bit+
        Address: 0000000000000000  Data: 0000
    Capabilities: [90] MSI-X: Enable- Count=8 Masked-
        Vector table: BAR=0 offset=00001000
        PBA: BAR=0 offset=00001080
    Capabilities: [a0] Express (v2) Endpoint, MSI 00
        DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
            ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 0.000W
        DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
            RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
            MaxPayload 128 bytes, MaxReadReq 512 bytes
        DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-
        LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <4us, L1 unlimited
            ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp-
        LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 5GT/s (ok), Width x1 (ok)
            TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        DevCap2: Completion Timeout: Not Supported, TimeoutDis+ NROPrPrP- LTR+
             10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt- EETLPPrefix-
             EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
             FRS- TPHComp- ExtTPHComp-
             AtomicOpsCap: 32bit- 64bit- 128bitCAS-
        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- OBFF Disabled,
             AtomicOpsCtl: ReqEn-
        LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
             Compliance De-emphasis: -6dB
        LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
             EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
             Retimer- 2Retimers- CrosslinkRes: unsupported
    Capabilities: [100 v1] Advanced Error Reporting
        UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
        CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
        CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
        AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn-
            MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
        HeaderLog: 00000000 00000000 00000000 00000000
    Capabilities: [150 v1] Latency Tolerance Reporting
        Max snoop latency: 0ns
        Max no snoop latency: 0ns
    Kernel driver in use: xhci_hcd

04:00.0 SATA controller: Marvell Technology Group Ltd. 88SE9215 PCIe 2.0 x1 4-port SATA 6 Gb/s Controller (rev 11) (prog-if 01 [AHCI 1.0])
    Subsystem: Marvell Technology Group Ltd. 88SE9215 PCIe 2.0 x1 4-port SATA 6 Gb/s Controller
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Interrupt: pin A routed to IRQ 39
    Region 0: I/O ports at 0000
    Region 1: I/O ports at 0000
    Region 2: I/O ports at 0000
    Region 3: I/O ports at 0000
    Region 4: I/O ports at 0000
    Region 5: Memory at 600110000 (32-bit, non-prefetchable) [size=2K]
    Expansion ROM at 600100000 [disabled] [size=64K]
    Capabilities: [40] Power Management version 3
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold-)
        Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit-
        Address: 00000000  Data: 0000
    Capabilities: [70] Express (v2) Legacy Endpoint, MSI 00
        DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s <1us, L1 <8us
            ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
        DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
            RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
            MaxPayload 128 bytes, MaxReadReq 512 bytes
        DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
        LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <512ns, L1 <64us
            ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
        LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 5GT/s (ok), Width x1 (ok)
            TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        DevCap2: Completion Timeout: Not Supported, TimeoutDis+ NROPrPrP- LTR-
             10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt- EETLPPrefix-
             EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
             FRS-
             AtomicOpsCap: 32bit- 64bit- 128bitCAS-
        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- OBFF Disabled,
             AtomicOpsCtl: ReqEn-
        LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
             Compliance De-emphasis: -6dB
        LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
             EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
             Retimer- 2Retimers- CrosslinkRes: unsupported
    Capabilities: [e0] SATA HBA v0.0 BAR4 Offset=00000004
    Capabilities: [100 v1] Advanced Error Reporting
        UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
        CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
        CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
        AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn-
            MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
        HeaderLog: 00000000 00000000 00000000 00000000
    Kernel driver in use: ahci

05:00.0 SATA controller: Marvell Technology Group Ltd. 88SE9215 PCIe 2.0 x1 4-port SATA 6 Gb/s Controller (rev 11) (prog-if 01 [AHCI 1.0])
    Subsystem: Marvell Technology Group Ltd. 88SE9215 PCIe 2.0 x1 4-port SATA 6 Gb/s Controller
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Interrupt: pin A routed to IRQ 32
    Region 0: I/O ports at 0000
    Region 1: I/O ports at 0000
    Region 2: I/O ports at 0000
    Region 3: I/O ports at 0000
    Region 4: I/O ports at 0000
    Region 5: Memory at 600210000 (32-bit, non-prefetchable) [size=2K]
    Expansion ROM at 600200000 [disabled] [size=64K]
    Capabilities: [40] Power Management version 3
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold-)
        Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit-
        Address: 00000000  Data: 0000
    Capabilities: [70] Express (v2) Legacy Endpoint, MSI 00
        DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s <1us, L1 <8us
            ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
        DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
            RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
            MaxPayload 128 bytes, MaxReadReq 512 bytes
        DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
        LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <512ns, L1 <64us
            ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
        LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 5GT/s (ok), Width x1 (ok)
            TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        DevCap2: Completion Timeout: Not Supported, TimeoutDis+ NROPrPrP- LTR-
             10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt- EETLPPrefix-
             EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
             FRS-
             AtomicOpsCap: 32bit- 64bit- 128bitCAS-
        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- OBFF Disabled,
             AtomicOpsCtl: ReqEn-
        LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
             Compliance De-emphasis: -6dB
        LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
             EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
             Retimer- 2Retimers- CrosslinkRes: unsupported
    Capabilities: [e0] SATA HBA v0.0 BAR4 Offset=00000004
    Capabilities: [100 v1] Advanced Error Reporting
        UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
        CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
        CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
        AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn-
            MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
        HeaderLog: 00000000 00000000 00000000 00000000
    Kernel driver in use: ahci
P33M commented 1 year ago

One proposed patch on the linux-pci list:

https://lore.kernel.org/linux-pci/385baf9dbfb6b65112803998dfc0cd6f84a5e6ba.1691296765.git.lukas@wunner.de/

I think the author is correct in that accesses when the link is doing a retrain result in fatal errors, but I also think the race condition is unavoidable. Bad signal integrity could cause link-down at any time, and there's no notification that state has changed.

It's also half the story - there is an actual bug in how the probe code is enabling CRS software visibility, which results in fatal errors if an endpoint does have an active link but has not yet completed internal initialisation and responds with Retry to a config read. The call to pci_enable_crs() which suppresses that particular error response is done before the link is established, so PERST# is asserted and root complex configuration registers are held in reset.

I'm waiting on hardware that should let me replicate the failure case that the mailing list alludes to.

P33M commented 1 year ago

Ugh, even CRSV=1 doesn't work in all cases. I have an Etron EJ188 xhci controller which, if plugged into the switch's downstream port, occasionally responds to the first config write with a CRS response, whereas the first set of reads work OK. Writes with a retry status always result in a fatal bus exception.

This device arguably deviates from the PCIe spec, as Retry status after a reset should be a global read-write lockout and not just a write lockout, but it exists and predates the CM4.

l1k commented 1 year ago

@P33M The patch you've linked to makes enumeration work reliably with the ASMedia ASM1184e, but timeouts (and thus kernel panics) persist with the Pericom PI7C9X2G404SL (occasionally) and with the Pericom PI7C9X2G404SV (very often).

With those chips, particularly with the latter, enumeration sometimes initially works but subsequently timeouts occur out of the blue when accessing devices downstream of that switch. Also, sometimes the switch itself is enumerated but downstream devices are not.

Since the issue is easy to reproduce with the PI7C9X2G404SV, I recommend testing with that one. The chip is interesting because it consumes less power than the others and conforms to industrial requirements (temperature and otherwise). Unfortunately eval boards with the PI7C9X2G404SV are hard to come by and expensive. @iluminat23 has a single one, but it's loaned, so he's very hesitant to give it away. That eval board absolutely does not work reliably in the CM4 IO board, but shows no issues at all in a Sitara AM64 EVM or in an x86 PC. So there must be something fishy going on with the CM4 PCIe controller.

By accessing the switch's registers after a kernel panic on enumeration (over SMBUS from a different machine) it has been discovered that the Common Clock Configuration bit in the Link Control Register of the Switch Upstream Port is zero. In the working case, i.e., without kernel panic on enumeration, that bit is set. So it seems that the switch has difficulty recovering the reference clock presented by the BCM2711 PCIe controller.

Analysis of that clock with a Keysight high-speed oscilloscope has indeed exposed issues: For one, the clock changes multiple times after power-on, oscillating around the expected frequency. Second, there's a "capacitor effect" visible whereby the clock takes a while to "come down" to the expected voltage, presumably because the AC coupling needs time to charge.

It has been tried to work around the unclean clock signal by delaying release of PERST of the switch. That didn't help. It has also been tried to not show the clock signal to the switch until it has stabilized (i.e. keeping the clock visible to the switch in High-Z for a while). Didn't help either. It has been tried to shift the clock voltage up a little to open the "eye" of the signal. Didn't help.

Analysis of the communication between the CM4 and the PI7C9X2G404SV with a Teledyne Lecroy protocol analyzer initially didn't work at all. After desoldering the AC coupling on the CM4, the analyzer started to see communication, but there were no TLPs visible that would point to an error. It seems the issue is at the physical layer, not the TLP layer.

@CyrilBrulebois has commented on #5455 and on the mailing list that updating the CM4 EEPROM helps. This was tried as well. It didn't help with the PI7C9X2G404SV.

Again, no issues if the switch eval board is plugged into an AM64 EVM or x86 PC. It's only the CM4 that exhibits these issues.

nbuchwitz commented 1 year ago

Thanks for the summary of the status quo and esp. the things we tried so far, @l1k !

l1k commented 1 year ago

Ref clock

Reference clock exposed by the BCM2711 PCIe controller, showing a "capacitor effect" (green signal, top-left corner) and showing that the clock oscillates between 96 MHz and 106 MHz before settling at 100 MHz after about 391 usec (yellow signal at the bottom).

Note that 391 usec is well after PERST has been released, so the unclean clock is visible to the PCIe device attached to the controller.

However, working around these issues still did not make the PI7C9X2G404SV work reliably.

l1k commented 1 year ago

I forgot to mention that forcing de-emphasis to -3.5dB (instead of the default -6dB) in the Link Control 2 register of the BCM2711 Root Port seemed to slightly improve reliability with the PI7C9X2G404SV. (The kernel would predictably crash when flashing firmware onto a Renesas USB controller attached below the switch with -6dB, but not with de-emphasis at -3.5dB. Nevertheless crashes would still occur later on.)

This seems to further suggest that there's a signal issue at play.

florincosta commented 11 months ago

Hi, @l1k I'm also having problems with the CM4 and a similar PCIe switch, the PI7C9X2G404EV, I think only the IC package differs and the PI7C9X2G404EV it's basically the same as PI7C9X2G404SV. I've developed my on board and the problem is that the board sometimes hangs during boot, I've only tested it for a couple of days, so far no kernel panics, running latest 64 bit Raspberry pi OS and latest CM4 EEPROM image.

I've probed the CM4 PERST and PCIE REFCLK, it seems that REFCLK is enabled about 500us before de-asserting PERST, see scope capture below:

20230918_130953

I've noticed that in the PI7C9X2G404EV datasheet the REFCLK should already be stable for about 100ms when PERST is de-asserted:

f20704e124481f1f7b58125b77ad3743ab4e9f59_2_690x291

The issue is similar to the one here: https://community.toradex.com/t/verdin-imx8mm-clock-reset-sequencing/15851/11

I want to add the 100ms of REFCLK stabilization before de-asserting PERST, I'm not familliar with the Broadcom PCIe kernel driver, can somebody point me in the right direction? I could also add the hardware RC delay.

danclive commented 11 months ago

@florincosta Hi, the 100ms delay has been added in version 6.2.y. I don't have the hardware, so I'm not sure if the problem is still there!

https://github.com/raspberrypi/linux/blob/rpi-6.2.y/drivers/pci/controller/pcie-brcmstb.c#L1043-L1047

pelwell commented 11 months ago

@P33M Any concerns about us back-porting https://github.com/raspberrypi/linux/commit/3ae140ad827b359bc4fa7c7985691c4c1e3ca8f4 to rpi-6.1.y? It applies cleanly.

P33M commented 11 months ago

No, but there's some terminology in this thread that needs clearing up -

Referring to the CEM specification v4 rev 1.0, figure 8, the critical time periods are 1 through 5.

  1. 3v3aux power on to SMBUS activity - not applicable, the CM4IO board doesn't connect SMBUS, and in any case there is a protracted boot process required before the hardware is available for software to use.
  2. Main power available to PERST# deassert (Tpvperl) - 100ms - satisfied as the boot process, whether or not the PCIe core is accessed from the firmware or Linux, takes >5 seconds.
  3. Refclk stable to PERST# deassert (Tperst-clk) - 100us - this delay is maintained by an internal state machine within the PCIe root complex.
  4. PERST# inactive to link out of electrical idle - not specified in the CEM but >0 seconds and <20ms in the base specification. This sequence is maintained by an internal state machine within the PCIe root complex.
  5. PERST# inactive to JTAG activity - not applicable, the CM4IO board doesn't connect JTAG pins.

The delay referred to in the patch is inaccurately described/placed. After the previous line, the link will have autonomously activated and in general will be in L0 on the first or second iteration of the loop checking for link-up.

Referring to the base specification v4.0 6.6.1 (I don't have v5 to hand, but in any case this part of the spec is stable across gen 3 thru 5), the context describes a time period after the link is active where software must not send any configuration requests to the downstream device, unless a Readiness Notification is received. I doubt the RC can generate an interrupt for a RN therefore the 100ms delay is required - but this should be after L0. In practice it doesn't matter.

There is an ultimate timeout of 1 second after the first attempt to issue a configuration request for the device for it to return a successful completion. This delay is catered for in the various enumeration mechanisms in the upper Linux PCI layer.

P33M commented 11 months ago

If the switch really needs 1000x the minimum required Tperst-clk, then there's an issue - there's no easy way to extend this time.

pelwell commented 11 months ago

Ta.

pelwell commented 11 months ago

See 6f634d7efb88.

florincosta commented 11 months ago

If the switch really needs 1000x the minimum required Tperst-clk, then there's an issue - there's no easy way to extend this time.

Yeah, it seems the PI7C9X2G404EV switch needs a Tperst-clk of 100ms, although in the CEM spec this Tperst-clk is only specified as a minimum of 100us, maximum not specified, so the PI7C9X2G404EV requires 100ms of REFCLK stabilization before de-asserting the PERST# signal.. The 100ms from 6f634d7efb8876e5953c30c0a613aaa5f575fe05, are added after the PERST# is de-asserted, so this does not help in this case.

@P33M thanks for the info regarding Tperst-clk 100us and where is handled.

I still did try @danclive suggestion with 6.2.16-v8+ but got the same results: CM4 PERST#

So I guess now there is only on way to fix this, add the 100ms delay the hardway :)

e8263ad545f63524d56a7598d8154f6c84500085

P33M commented 11 months ago

I think I may have found a way to optionally delay PERST# deassertion with a magic register bit in PCIE_MISC_HARD_DEBUG - bit 3 directly controls the output pad. If I set this bit prior to the call to pcie->perst_set(pcie, 0) and add a msleep(n) before resetting this bit, the refclk becomes active approximately n milliseconds before I see the reset line rise.

It may be the case that the RC is trying to initiate training during this delay which would violate constraint 4 above but that is probably tolerable.

P33M commented 11 months ago

Nope, delaying the deassert in this manner doesn't affect when the RC starts link training (~300us after). It's a pretty tall ask to make the driver do this for every endpoint (thus delaying boot) so another devicetree knob is needed.

P33M commented 11 months ago

On a CM4 try testing sudo rpi-update pulls/5609 which should add the required delay.

florincosta commented 11 months ago

On a CM4 try testing sudo rpi-update pulls/5609 which should add the required delay.

Tried it, it works, there is a Tperst-clk of aprox 100ms, 97ms to be precise. Thanks!

CM4 Tperst-clk-clk 100ms

I will now test it on my CM4 carrier board.

iluminat23 commented 11 months ago

Hi,

I've tested sudo rpi-update pulls/5609 with this setup:

We tested this with ~3800 cold boots.

We also tested this with ~80 reboots:

We had no time to investigate the LAN7430 issue any further. But I wanted to report back our test results.

P33M commented 10 months ago

Can you re-do sudo rpi-update pulls/5609 then add dtparam=pcie_tperst_clk_ms=100 to /boot/firmware/config.txt, then redo your reboot test? It moves the hack to a configurable override.

theodric commented 10 months ago

I merged the changes that were present in #5609 as of 24-Oct-2023 into 5.15.92 and have been beating the snot out of it for 6 days with no further issues. I've sent 5+ terabytes across the switch each way between USB3-attached disks and SATA-attached disks. Previously I was getting crashes at least every few hours/few hundred gigs when attempting this.

I'm running the following on a CM4 + official I/O board:

00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2711 PCIe Bridge (rev 20)
01:00.0 PCI bridge: Pericom Semiconductor PI7C9X2G304 EL/SL PCIe2 3-Port/4-Lane Packet Switch (rev 05)
02:01.0 PCI bridge: Pericom Semiconductor PI7C9X2G304 EL/SL PCIe2 3-Port/4-Lane Packet Switch (rev 05)
02:02.0 PCI bridge: Pericom Semiconductor PI7C9X2G304 EL/SL PCIe2 3-Port/4-Lane Packet Switch (rev 05)
03:00.0 SATA controller: ASMedia Technology Inc. Device 1166 (rev 02)
04:00.0 USB controller: VIA Technologies, Inc. VL805 USB 3.0 Host Controller (rev 01)

So - thanks!

iluminat23 commented 10 months ago

@P33M This didn't change any thing for the reboot issue.

cold boot:

pi@raspberrypi:~ $ dmesg | grep -a -E "pci 0000:[0-9][0-9]:[0-9][0-9]\.0: \["
[    1.380599] pci 0000:00:00.0: [14e4:2711] type 01 class 0x060400
[    1.602178] pci 0000:01:00.0: [12d8:b404] type 01 class 0x060400
[    1.603560] pci 0000:02:01.0: [12d8:b404] type 01 class 0x060400
[    1.604571] pci 0000:02:02.0: [12d8:b404] type 01 class 0x060400
[    1.605536] pci 0000:02:03.0: [12d8:b404] type 01 class 0x060400
[    1.609895] pci 0000:03:00.0: [1912:0014] type 00 class 0x0c0330
[    1.611158] pci 0000:04:00.0: [1055:7430] type 00 class 0x020000
[    1.612654] pci 0000:05:00.0: [8086:107d] type 00 class 0x020000

reboot:

pi@raspberrypi:~ $ dmesg | grep -a -E "pci 0000:[0-9][0-9]:[0-9][0-9]\.0: \["
[    1.382958] pci 0000:00:00.0: [14e4:2711] type 01 class 0x060400
[    1.606017] pci 0000:01:00.0: [12d8:b404] type 01 class 0x060400
[    1.607403] pci 0000:02:01.0: [12d8:b404] type 01 class 0x060400
[    1.608417] pci 0000:02:02.0: [12d8:b404] type 01 class 0x060400
[    1.609371] pci 0000:02:03.0: [12d8:b404] type 01 class 0x060400
[    1.613736] pci 0000:03:00.0: [1912:0014] type 00 class 0x0c0330
[    1.615353] pci 0000:05:00.0: [8086:107d] type 00 class 0x020000
pi@raspberrypi:~ $ cat /boot/.firmware_revision 
9ffba7f9e53ab64d6e3583d7bf4ece60a19c6237
pi@raspberrypi:~ $ sudo fdtdump /sys/firmware/fdt | grep tperst

**** fdtdump is a low-level debugging tool, not meant for general use.
**** If you want to decompile a dtb, you probably want
****     dtc -I dtb -O dts <filename>

            brcm,tperst-clk-ms = <0x00000064>;
        pcie_tperst_clk_ms = [00 00 00 3e 62 72 63 6d 2c 74 70 65 72 73 74 2d 63 6c 6b 2d 6d 73 3a 30 00];
P33M commented 10 months ago

Is the behaviour the same if you don't use a soft reboot, and instead forcibly reset the CM4 via the RUN pin?

iluminat23 commented 10 months ago

My test setup failed me and I'm not able to do any tests for now. I'm also not in the office for the next weeks and will not be able to fix the setup.

P33M commented 9 months ago

Regarding the disappearing LAN7430, I've found that the default CM4 boot order includes NVMe probe, which will wake up the link without the requisite Tperst_clk time. Please confirm whether or not 0x4 or 0x6 appears anywhere in your BOOT_ORDER eeprom config. If a switch is attached there's no point having either of these as the bootloader won't enumerate devices behind a switch.

iluminat23 commented 9 months ago

Yes on the most of my CMs I have not touched the boot order and thus NVMe boot is enabled.

jolla commented 5 months ago

I'm experiencing similar behavior on a custom carrier board using Pericom Semiconductor PI7C9X2G608GP PCIe2 6-Port/8-Lane Packet Switch.

There are 2 main issues we are seeing that seem related to the OP

  1. Crash/hang on boot when PCIe is enabled, around 1 out of 10 boots this happens
  2. PCIe device missing after reboot, after full power cycle it will reappear

Setting dtparam=pcie_tperst_clk_ms=250 seems to help as the crash happens less often but still is reproducible

Last night I tested the following patch, which did change the behavior, in that the system booted succesfully 100% of the time, however 1 out of 10 tests results in no PCIe at all. https://lore.kernel.org/linux-pci/385baf9dbfb6b65112803998dfc0cd6f84a5e6ba.1691296765.git.lukas@wunner.de/

Anything else we can try?