Support PCIe Ethernet RTL8125

Hi @frank-w

I’m porting an embedded PCIe ethernet module - RTL8125, on BPI-R4 board by using one of the SIM2 SIM3 slots as shown below, without WIFI plugin.

The product: PCle to 2.5GbE Ethernet (Realtek RTL8125) - RobotShop.

The official downloadable driver: Realtek PCIe FE / GbE / 2.5GbE / 5G / 10G Family Controller Software. It said 2.5G Ethernet LINUX driver r8125 for kernel up to 6.12.

It is plugged in to SIM2 slot but it seems inactivated:

root@bpi-r4:/# lspci
root@bpi-r4:/#
root@bpi-r4:/# ll /proc/bus/pci/*
-r--r--r-- 1 root root 0 Jul 11 19:52 /proc/bus/pci/devices
root@bpi-r4:/#
root@bpi-r4:/# cat /proc/bus/pci/devices
root@bpi-r4:/#

It is plugged in to SIM3 slot, PCI detected RTL8125 but the devices info is weird and pci errors are keep reporting behind the scenes:

root@bpi-r4:/# lspci
0001:00:00.0 PCI bridge: MEDIATEK Corp. Device 7988 (rev 01)
0001:01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
root@bpi-r4:/#
root@bpi-r4:/# ll /proc/bus/pci/*
-r--r--r-- 1 root root 0 Jul 11 19:55 /proc/bus/pci/devices

'/proc/bus/pci/0001:00':
total 0
dr-xr-xr-x 3 root root    0 Jul 11 19:55 ./
dr-xr-xr-x 5 root root    0 Jul 11 19:55 ../
-rw-r--r-- 1 root root 4096 Jul 11 19:55 00.0

'/proc/bus/pci/0001:01':
total 0
dr-xr-xr-x 3 root root    0 Jul 11 19:55 ./
dr-xr-xr-x 5 root root    0 Jul 11 19:55 ../
-rw-r--r-- 1 root root 4096 Jul 11 19:55 00.0
root@bpi-r4:/#
root@bpi-r4:/# cat /proc/bus/pci/devices
0000    14c37988        77              38300004                       0                       0                       0                     0                       0                       0                    8000                       0                     0                       0                       0                       0                       0      pcieport
0100    10ec8125        ff                200001                       0                38200004                       0              38220004                       0                38210000                     100                       0                 10000                       0                    4000                       0                   10000
root@bpi-r4:/#
root@bpi-r4:/# dmesg | grep -i pci | tail
[   81.135793] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:01:00.0
[   81.135806] pci 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Transmitter ID)
[   81.135811] pci 0001:01:00.0:   device [10ec:8125] error status/mask=00001001/0000e000
[   81.135816] pci 0001:01:00.0:    [ 0] RxErr                  (First)
[   81.135821] pci 0001:01:00.0:    [12] Timeout
[   81.279606] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:01:00.0
[   81.279618] pci 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Transmitter ID)
[   81.279624] pci 0001:01:00.0:   device [10ec:8125] error status/mask=00001001/0000e000
[   81.279629] pci 0001:01:00.0:    [ 0] RxErr                  (First)
[   81.279634] pci 0001:01:00.0:    [12] Timeout
root@bpi-r4:/#
root@bpi-r4:/# dmesg | grep -i pci | tail
[   85.703039] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:01:00.0
[   85.703057] pci 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Transmitter ID)
[   85.703063] pci 0001:01:00.0:   device [10ec:8125] error status/mask=00001001/0000e000
[   85.703068] pci 0001:01:00.0:    [ 0] RxErr                  (First)
[   85.703074] pci 0001:01:00.0:    [12] Timeout
[   85.862519] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:01:00.0
[   85.862533] pci 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Transmitter ID)
[   85.862539] pci 0001:01:00.0:   device [10ec:8125] error status/mask=00001001/0000e000
[   85.862544] pci 0001:01:00.0:    [ 0] RxErr                  (First)
[   85.862549] pci 0001:01:00.0:    [12] Timeout
root@bpi-r4:/# [  102.072806] pci 0001:01:00.0: AER:   Error of this Agent is reported first

root@bpi-r4:/#
root@bpi-r4:/# dmesg | grep -i pci | tail
[  108.407371] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[  108.407377] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[  108.423236] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[  108.423244] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[  108.423249] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[  108.423254] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[  108.432535] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[  108.432543] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[  108.432547] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[  108.432551] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
root@bpi-r4:/#
root@bpi-r4:/# dmesg | grep -i pci | tail
[  213.764355] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[  213.774747] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[  213.774755] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[  213.774760] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[  213.774765] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[  213.848725] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:01:00.0
[  213.848734] pci 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Transmitter ID)
[  213.848738] pci 0001:01:00.0:   device [10ec:8125] error status/mask=00001001/0000e000
[  213.848743] pci 0001:01:00.0:    [ 0] RxErr                  (First)
[  213.848748] pci 0001:01:00.0:    [12] Timeout
root@bpi-r4:/#

As it provided driver resources with Linux kernel up to 6.12, it should be at least portable to your Linux 6.12-main branch?

Inside the tarball, there are source code and Makefiles for it. How can we build it in kernel?

Thanks

I guess you mean pcie#2/3? But afair the mpcie slots are pcie0+1

Nethertheless lspcie should see the card is bot slots. But be careful to have 12V switched off!

For driver part you can fork my repo and then you could integrate the driver in correct folder (drivers/pcie/…) add to kconfig and makefile and enable it in your defconfig for r4.

From 6.16, it is included in linux kernel.

Yes, these two:

image

However, plugging to pcie0 (SIM2) that has nothing happened, while plugging to pcie1 (SIM3) that keeps reporting pcie errors.

My R4 is currently running on linux 6.17 Ubuntu noble.

There are reports of some m.2 to mpcie adapters not functioning, while others are. The same may be for the pcie to mpcie adapter you are using, it may also be cause of the problem.

Does the pcie card use 5V or 12V? Do you need to supply that? Or does the adapter create these voltages then is 3.3v overloaded?

Could try a m.2 rtl8125 card with adapter, it is designed to use 3.3v, not any higher voltages., You might have more luck or maybe not. Perhaps even trying different models of adapters.

Another note, using the rtl8125, it cannot be used with hardware offloading of the flow, if you would ever want to use it. In this case you may be better off using a sfp module with the rtl8221b accessible through rollball protocol.

The PCIe RTL8125 should be exactly this one: https://www.amazon.co.uk/2-5Gbase-T-Realtek-RTL8125-Network-Ethernet/dp/B0B7RZ9JWM

I found “Voltage voltage: 3.3V_AUX, 12V, 3.3V.” from the page.

About the pcie-mpcie adapter, I think it does accept and transfer reasonable voltage from the BPI-R4 input. The extra 12V switch supply can be turned off. I plugged-in the adapter which 4 LEDs just lighted up.

And I have tested the PCIe RTL8125 with pcie-mpcie adapter plugged-in on the original shipped BPI-R4 NAND Openwrt firmware. The result is:

  • pcie0 (mPCIe SIM2 slot) interface did not report any PCI devices.
  • pcie1 (mPCIe SIM3 slot) interface reported the board PCI bridge and RTL8125. It seems look good but it should have no specific linux driver enabled.

So I can probably confirm the PCIe RTL8125 and pci-mpcie adapter are good to the pcie1 (mPCIe SIM3 slot).

Do you mean to set the SFP module as disabled in .dts?

image

image

I mean using the sfp instead of a PCIe ethernet interface. Only using the internal mac (or mtk-wifi) it is possible to use hardware flow offloading. In the case of the R4, one could choose a 10G sfp instead.

If you do not plan to use hardware offloading of flow, then both options are ok.

But of course, it is always nice to know if the PCIe to mpcie adapter works and if the rtl8125 can be used. Would need to test under full load, pulling the maximum watts.

Plugged-in PCIe0 interface in pre-built Openwrt NAND image, it is unable to detect the RTL8125:

root@OpenWrt:/# cat /etc/os-release
NAME="OpenWrt"
VERSION="21.02-SNAPSHOT"
ID="openwrt"
ID_LIKE="lede openwrt"
PRETTY_NAME="OpenWrt 21.02-SNAPSHOT"
VERSION_ID="21.02-snapshot"
HOME_URL="https://openwrt.org/"
BUG_URL="https://bugs.openwrt.org/"
SUPPORT_URL="https://forum.openwrt.org/"
BUILD_ID="unknown"
OPENWRT_BOARD="mediatek/mt7988"
OPENWRT_ARCH="aarch64_cortex-a53"
OPENWRT_TAINTS="no-all busybox"
OPENWRT_DEVICE_MANUFACTURER="OpenWrt"
OPENWRT_DEVICE_MANUFACTURER_URL="https://openwrt.org/"
OPENWRT_DEVICE_PRODUCT="Generic"
OPENWRT_DEVICE_REVISION="v0"
OPENWRT_RELEASE="OpenWrt 21.02-SNAPSHOT unknown"
root@OpenWrt:/#
root@OpenWrt:/# uname -a
Linux OpenWrt 5.4.271 #0 SMP Wed Jun 5 06:11:29 2024 aarch64 GNU/Linux
root@OpenWrt:/#
root@OpenWrt:/# lspci
0004:00:00.0 Unclassified device [0002]: MEDIATEK Corp. Device 7981
root@OpenWrt:/#
root@OpenWrt:/# cat /proc/bus/pci/
0004:00/  devices
root@OpenWrt:/# cat /proc/bus/pci/devices
0000    14c37981        75              18000004                       0                       0                       0                     0                       0                       0                 1000000                       0                    10                      10                      10                      10                       0
root@OpenWrt:/#
root@OpenWrt:/# dmesg | grep -i pci
[    0.000000] Kernel command line: console=ttyS0,115200n1 loglevel=8                       earlycon=uart8250,mmio32,0x11000000                           pci=pcie_bus_perf
[    0.267471] rbus 18000000.wbsys: PCI host bridge to bus 0004:00
[    0.273468] pci_bus 0004:00: root bus resource [mem 0x18000000-0x18ffffff]
[    0.280428] pci_bus 0004:00: root bus resource [bus 00-ff]
[    0.285979] pci_bus 0004:00: scanning bus
[    0.290044] pci 0004:00:00.0: [14c3:7981] type 00 class 0x000280
[    0.296133] pci 0004:00:00.0: reg 0x10: [mem 0x18000000-0x1800000f 64bit]
[    0.303006] pci 0004:00:00.0: reg 0x18: [mem 0x00000000-0x0000000f]
[    0.309351] pci 0004:00:00.0: reg 0x1c: [mem 0x00000000-0x0000000f]
[    0.315695] pci 0004:00:00.0: reg 0x20: [mem 0x00000000-0x0000000f]
[    0.322039] pci 0004:00:00.0: reg 0x24: [mem 0x00000000-0x0000000f]
[    0.329364] pci_bus 0004:00: fixups for bus
[    0.333598] pci_bus 0004:00: bus scan returning with max=00
[    0.440187] PCI: CLS 0 bytes, default 64
[    0.515339] mtk-pcie 11300000.pcie: host bridge /pcie@11300000 ranges:
[    0.521962] mtk-pcie 11300000.pcie: Parsing ranges property...
[    0.527872] mtk-pcie 11300000.pcie:    IO 0x30000000..0x301fffff -> 0x30000000
[    0.535190] mtk-pcie 11300000.pcie:   MEM 0x30200000..0x37ffffff -> 0x30200000
[    0.542532] mtk-pcie 11300000.pcie: failed to get max link width
[    0.755440] mtk-pcie 11300000.pcie: PCIe link down, ltssm reg val: 0x3
[    0.762082] mtk-pcie: probe of 11300000.pcie failed with error -110
[    0.768493] mtk-pcie 11310000.pcie: host bridge /pcie@11310000 ranges:
[    0.775103] mtk-pcie 11310000.pcie: Parsing ranges property...
[    0.781010] mtk-pcie 11310000.pcie:    IO 0x38000000..0x381fffff -> 0x38000000
[    0.788328] mtk-pcie 11310000.pcie:   MEM 0x38200000..0x3fffffff -> 0x38200000
[    0.795655] mtk-pcie 11310000.pcie: failed to get max link width
[    1.007456] mtk-pcie 11310000.pcie: PCIe link down, ltssm reg val: 0x1
[    1.014084] mtk-pcie: probe of 11310000.pcie failed with error -110
[    1.020487] mtk-pcie 11280000.pcie: host bridge /pcie@11280000 ranges:
[    1.027099] mtk-pcie 11280000.pcie: Parsing ranges property...
[    1.033005] mtk-pcie 11280000.pcie:    IO 0x20000000..0x201fffff -> 0x20000000
[    1.040324] mtk-pcie 11280000.pcie:   MEM 0x20200000..0x27ffffff -> 0x20200000
[    1.053477] mtk-pcie 11280000.pcie: failed to get max link width
[    1.267435] mtk-pcie 11280000.pcie: PCIe link down, ltssm reg val: 0x1
[    1.274065] mtk-pcie: probe of 11280000.pcie failed with error -110
[    1.280458] mtk-pcie 11290000.pcie: host bridge /pcie@11290000 ranges:
[    1.287069] mtk-pcie 11290000.pcie: Parsing ranges property...
[    1.292975] mtk-pcie 11290000.pcie:    IO 0x28000000..0x281fffff -> 0x28000000
[    1.300293] mtk-pcie 11290000.pcie:   MEM 0x28200000..0x2fffffff -> 0x28200000
[    1.307622] mtk-pcie 11290000.pcie: failed to get max link width
[    1.519444] mtk-pcie 11290000.pcie: PCIe link down, ltssm reg val: 0x1
[    1.526074] mtk-pcie: probe of 11290000.pcie failed with error -110
[   13.681681] mtk_pci: module uses symbols from proprietary module mtk_hwifi, inheriting taint.
root@OpenWrt:/#

Plugged-in PCIe1 interface in pre-built Openwrt NAND image, it is able to detect the RTL8125:

root@OpenWrt:/# cat /etc/os-release
NAME="OpenWrt"
VERSION="21.02-SNAPSHOT"
ID="openwrt"
ID_LIKE="lede openwrt"
PRETTY_NAME="OpenWrt 21.02-SNAPSHOT"
VERSION_ID="21.02-snapshot"
HOME_URL="https://openwrt.org/"
BUG_URL="https://bugs.openwrt.org/"
SUPPORT_URL="https://forum.openwrt.org/"
BUILD_ID="unknown"
OPENWRT_BOARD="mediatek/mt7988"
OPENWRT_ARCH="aarch64_cortex-a53"
OPENWRT_TAINTS="no-all busybox"
OPENWRT_DEVICE_MANUFACTURER="OpenWrt"
OPENWRT_DEVICE_MANUFACTURER_URL="https://openwrt.org/"
OPENWRT_DEVICE_PRODUCT="Generic"
OPENWRT_DEVICE_REVISION="v0"
OPENWRT_RELEASE="OpenWrt 21.02-SNAPSHOT unknown"
root@OpenWrt:/#
root@OpenWrt:/# uname -a
Linux OpenWrt 5.4.271 #0 SMP Wed Jun 5 06:11:29 2024 aarch64 GNU/Linux
root@OpenWrt:/#
root@OpenWrt:/# lspci
0001:00:00.0 PCI bridge: MEDIATEK Corp. Device 7988 (rev 01)
0001:01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
0004:00:00.0 Unclassified device [0002]: MEDIATEK Corp. Device 7981
root@OpenWrt:/#
root@OpenWrt:/# cat /proc/bus/pci/
0001:00/  0001:01/  0004:00/  devices
root@OpenWrt:/# cat /proc/bus/pci/devices
0000    14c37981        75              18000004                       0                       0                       0                     0                       0                       0                 1000000                       0                    10                      10                      10                      10                       0
0000    14c37988        0               38300004                       0                       0                       0                     0                       0                       0                    8000                       0                     0                       0                       0                       0                       0
0100    10ec8125        ff                200001                       0                38200004                       0              38220004                       0                38210000                     100                       0                 10000                       0                    4000                       0                   10000
root@OpenWrt:/#
root@OpenWrt:/# dmesg | grep -i pci
[    0.000000] Kernel command line: console=ttyS0,115200n1 loglevel=8                       earlycon=uart8250,mmio32,0x11000000                           pci=pcie_bus_perf
[    0.267291] rbus 18000000.wbsys: PCI host bridge to bus 0004:00
[    0.273289] pci_bus 0004:00: root bus resource [mem 0x18000000-0x18ffffff]
[    0.280249] pci_bus 0004:00: root bus resource [bus 00-ff]
[    0.285799] pci_bus 0004:00: scanning bus
[    0.289864] pci 0004:00:00.0: [14c3:7981] type 00 class 0x000280
[    0.295954] pci 0004:00:00.0: reg 0x10: [mem 0x18000000-0x1800000f 64bit]
[    0.302828] pci 0004:00:00.0: reg 0x18: [mem 0x00000000-0x0000000f]
[    0.309173] pci 0004:00:00.0: reg 0x1c: [mem 0x00000000-0x0000000f]
[    0.315516] pci 0004:00:00.0: reg 0x20: [mem 0x00000000-0x0000000f]
[    0.321860] pci 0004:00:00.0: reg 0x24: [mem 0x00000000-0x0000000f]
[    0.329207] pci_bus 0004:00: fixups for bus
[    0.333443] pci_bus 0004:00: bus scan returning with max=00
[    0.440107] PCI: CLS 0 bytes, default 64
[    0.515900] mtk-pcie 11300000.pcie: host bridge /pcie@11300000 ranges:
[    0.522516] mtk-pcie 11300000.pcie: Parsing ranges property...
[    0.528429] mtk-pcie 11300000.pcie:    IO 0x30000000..0x301fffff -> 0x30000000
[    0.535751] mtk-pcie 11300000.pcie:   MEM 0x30200000..0x37ffffff -> 0x30200000
[    0.543093] mtk-pcie 11300000.pcie: failed to get max link width
[    0.755290] mtk-pcie 11300000.pcie: PCIe link down, ltssm reg val: 0x1
[    0.761933] mtk-pcie: probe of 11300000.pcie failed with error -110
[    0.768341] mtk-pcie 11310000.pcie: host bridge /pcie@11310000 ranges:
[    0.774951] mtk-pcie 11310000.pcie: Parsing ranges property...
[    0.780858] mtk-pcie 11310000.pcie:    IO 0x38000000..0x381fffff -> 0x38000000
[    0.788176] mtk-pcie 11310000.pcie:   MEM 0x38200000..0x3fffffff -> 0x38200000
[    0.795505] mtk-pcie 11310000.pcie: failed to get max link width
[    0.932170] mtk-pcie 11310000.pcie: PCI host bridge to bus 0001:00
[    0.938432] pci_bus 0001:00: root bus resource [bus 00-ff]
[    0.943988] pci_bus 0001:00: root bus resource [io  0x200000-0x3fffff] (bus address [0x38000000-0x381fffff])
[    0.953941] pci_bus 0001:00: root bus resource [mem 0x38200000-0x3fffffff]
[    0.960900] pci_bus 0001:00: scanning bus
[    0.964971] pci 0001:00:00.0: [14c3:7988] type 01 class 0x060400
[    0.971077] pci 0001:00:00.0: reg 0x10: [mem 0x00000000-0x00007fff 64bit]
[    0.978004] pci 0001:00:00.0: PME# supported from D0 D3hot D3cold
[    0.984178] pci 0001:00:00.0: PME# disabled
[    0.989460] pci_bus 0001:00: fixups for bus
[    0.993697] pci 0001:00:00.0: scanning [bus 00-00] behind bridge, pass 0
[    1.000484] pci 0001:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.008595] pci 0001:00:00.0: scanning [bus 00-00] behind bridge, pass 1
[    1.015428] pci_bus 0001:01: scanning bus
[    1.019503] pci 0001:01:00.0: [10ec:8125] type 00 class 0x020000
[    1.025620] pci 0001:01:00.0: reg 0x10: [io  0x0000-0x00ff]
[    1.031285] pci 0001:01:00.0: reg 0x18: [mem 0x00000000-0x0000ffff 64bit]
[    1.038170] pci 0001:01:00.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit]
[    1.045052] pci 0001:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    1.051946] pci 0001:01:00.0: supports D1 D2
[    1.056266] pci 0001:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.062965] pci 0001:01:00.0: PME# disabled
[    1.068167] pci_bus 0001:01: fixups for bus
[    1.072400] pci_bus 0001:01: bus scan returning with max=01
[    1.078042] pci_bus 0001:01: busn_res: [bus 01-ff] end is updated to 01
[    1.084739] pci_bus 0001:00: bus scan returning with max=01
[    1.090393] pci 0001:00:00.0: BAR 8: assigned [mem 0x38200000-0x382fffff]
[    1.097267] pci 0001:00:00.0: BAR 0: assigned [mem 0x38300000-0x38307fff 64bit]
[    1.104672] pci 0001:00:00.0: BAR 7: assigned [io  0x200000-0x200fff]
[    1.111197] pci 0001:01:00.0: BAR 2: assigned [mem 0x38200000-0x3820ffff 64bit]
[    1.118608] pci 0001:01:00.0: BAR 6: assigned [mem 0x38210000-0x3821ffff pref]
[    1.125919] pci 0001:01:00.0: BAR 4: assigned [mem 0x38220000-0x38223fff 64bit]
[    1.133330] pci 0001:01:00.0: BAR 0: assigned [io  0x200000-0x2000ff]
[    1.139854] pci 0001:00:00.0: PCI bridge to [bus 01]
[    1.144882] pci 0001:00:00.0:   bridge window [io  0x200000-0x200fff]
[    1.151404] pci 0001:00:00.0:   bridge window [mem 0x38200000-0x382fffff]
[    1.158289] pci 0001:00:00.0: Max Payload Size set to  256/ 256 (was  128), Max Read Rq  256
[    1.166856] pci 0001:01:00.0: Max Payload Size set to  256/ 256 (was  128), Max Read Rq  256
[    1.175493] mtk-pcie 11280000.pcie: host bridge /pcie@11280000 ranges:
[    1.182109] mtk-pcie 11280000.pcie: Parsing ranges property...
[    1.188017] mtk-pcie 11280000.pcie:    IO 0x20000000..0x201fffff -> 0x20000000
[    1.195334] mtk-pcie 11280000.pcie:   MEM 0x20200000..0x27ffffff -> 0x20200000
[    1.208496] mtk-pcie 11280000.pcie: failed to get max link width
[    1.419293] mtk-pcie 11280000.pcie: PCIe link down, ltssm reg val: 0x1
[    1.425930] mtk-pcie: probe of 11280000.pcie failed with error -110
[    1.432322] mtk-pcie 11290000.pcie: host bridge /pcie@11290000 ranges:
[    1.438935] mtk-pcie 11290000.pcie: Parsing ranges property...
[    1.444842] mtk-pcie 11290000.pcie:    IO 0x28000000..0x281fffff -> 0x28000000
[    1.452155] mtk-pcie 11290000.pcie:   MEM 0x28200000..0x2fffffff -> 0x28200000
[    1.459483] mtk-pcie 11290000.pcie: failed to get max link width
[    1.671273] mtk-pcie 11290000.pcie: PCIe link down, ltssm reg val: 0x1
[    1.677900] mtk-pcie: probe of 11290000.pcie failed with error -110
[   14.473524] mtk_pci: module uses symbols from proprietary module mtk_hwifi, inheriting taint.
root@OpenWrt:/#

From mt7988a.dtsi,

pcie0: pcie@11300000

It couldn’t detect device when it was plugged-in:

[    0.515339] mtk-pcie 11300000.pcie: host bridge /pcie@11300000 ranges:
[    0.521962] mtk-pcie 11300000.pcie: Parsing ranges property...
[    0.527872] mtk-pcie 11300000.pcie:    IO 0x30000000..0x301fffff -> 0x30000000
[    0.535190] mtk-pcie 11300000.pcie:   MEM 0x30200000..0x37ffffff -> 0x30200000
[    0.542532] mtk-pcie 11300000.pcie: failed to get max link width
[    0.755440] mtk-pcie 11300000.pcie: PCIe link down, ltssm reg val: 0x3
[    0.762082] mtk-pcie: probe of 11300000.pcie failed with error -110

pcie1: pcie@11310000

On the other side, this could detect the plug-in device:

[    0.768341] mtk-pcie 11310000.pcie: host bridge /pcie@11310000 ranges:
[    0.774951] mtk-pcie 11310000.pcie: Parsing ranges property...
[    0.780858] mtk-pcie 11310000.pcie:    IO 0x38000000..0x381fffff -> 0x38000000
[    0.788176] mtk-pcie 11310000.pcie:   MEM 0x38200000..0x3fffffff -> 0x38200000
[    0.795505] mtk-pcie 11310000.pcie: failed to get max link width
[    0.932170] mtk-pcie 11310000.pcie: PCI host bridge to bus 0001:00

Ubuntu 24.04 noble emmc

Plug-in pcie0 (pcie@11300000) slot, no detectable devices from it:

root@bpi-r4:/# cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.3 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
root@bpi-r4:/#
root@bpi-r4:/# uname -a
Linux bpi-r4 6.17.0-bpi-r4-main #1 SMP Mon Oct 13 19:13:37 CST 2025 aarch64 aarch64 aarch64 GNU/Linux
root@bpi-r4:/#
root@bpi-r4:/# lspci
root@bpi-r4:/#
root@bpi-r4:/# ll /proc/bus/pci/
total 0
dr-xr-xr-x 3 root root 0 Oct 14 04:22 ./
dr-xr-xr-x 4 root root 0 Oct 14 04:22 ../
-r--r--r-- 1 root root 0 Oct 14 04:22 devices
root@bpi-r4:/#
root@bpi-r4:/# cat /proc/bus/pci/devices
root@bpi-r4:/#
root@bpi-r4:/# dmesg | grep -i pci | head -n 100
[    0.376077] /soc/pcie@11280000: Fixed dependency cycle(s) with /soc/pcie@11280000/interrupt-controller
[    0.385631] /soc/pcie@11290000: Fixed dependency cycle(s) with /soc/pcie@11290000/interrupt-controller
[    0.395161] /soc/pcie@11300000: Fixed dependency cycle(s) with /soc/pcie@11300000/interrupt-controller
[    0.404701] /soc/pcie@11310000: Fixed dependency cycle(s) with /soc/pcie@11310000/interrupt-controller
[    0.585898] PCI: CLS 0 bytes, default 64
[    1.750863] mtk-pcie-gen3 11280000.pcie: host bridge /soc/pcie@11280000 ranges:
[    1.751023] mtk-pcie-gen3 11290000.pcie: host bridge /soc/pcie@11290000 ranges:
[    1.751049] mtk-pcie-gen3 11290000.pcie: Parsing ranges property...
[    1.751092] mtk-pcie-gen3 11290000.pcie:       IO 0x0028000000..0x00281fffff -> 0x0028000000
[    1.751107] mtk-pcie-gen3 11290000.pcie:      MEM 0x0028200000..0x002fffffff -> 0x0028200000
[    1.751341] mtk-pcie-gen3 11300000.pcie: host bridge /soc/pcie@11300000 ranges:
[    1.751352] mtk-pcie-gen3 11300000.pcie: Parsing ranges property...
[    1.751365] mtk-pcie-gen3 11300000.pcie:       IO 0x0030000000..0x00301fffff -> 0x0030000000
[    1.751374] mtk-pcie-gen3 11300000.pcie:      MEM 0x0030200000..0x0037ffffff -> 0x0030200000
[    1.751494] mtk-pcie-gen3 11310000.pcie: host bridge /soc/pcie@11310000 ranges:
[    1.751503] mtk-pcie-gen3 11310000.pcie: Parsing ranges property...
[    1.751513] mtk-pcie-gen3 11310000.pcie:       IO 0x0038000000..0x00381fffff -> 0x0038000000
[    1.751522] mtk-pcie-gen3 11310000.pcie:      MEM 0x0038200000..0x003fffffff -> 0x0038200000
[    1.762407] mtk-pcie-gen3 11280000.pcie: Parsing ranges property...
[    1.775969] mtk-pcie-gen3 11280000.pcie:       IO 0x0020000000..0x00201fffff -> 0x0020000000
[    1.792819] mtk-pcie-gen3 11280000.pcie:      MEM 0x0020200000..0x0027ffffff -> 0x0020200000
[    1.954800] mtk-pcie-gen3 11300000.pcie: PCIe link down, current LTSSM state: detect.quiet (0x3)
[    1.954951] mtk-pcie-gen3 11290000.pcie: PCIe link down, current LTSSM state: detect.quiet (0x1)
[    1.954974] mtk-pcie-gen3 11290000.pcie: probe with driver mtk-pcie-gen3 failed with error -110
[    1.964814] mtk-pcie-gen3 11310000.pcie: PCIe link down, current LTSSM state: detect.quiet (0x1)
[    1.964833] mtk-pcie-gen3 11310000.pcie: probe with driver mtk-pcie-gen3 failed with error -110
[    1.967365] mtk-pcie-gen3 11300000.pcie: probe with driver mtk-pcie-gen3 failed with error -110
[    2.014795] mtk-pcie-gen3 11280000.pcie: PCIe link down, current LTSSM state: detect.quiet (0x1)
[    2.021899] mtk-pcie-gen3 11280000.pcie: probe with driver mtk-pcie-gen3 failed with error -110
root@bpi-r4:/#

Plug-in pcie1 (pcie@11310000) slot, keeps popping PCI errors in background:

root@bpi-r4:/# cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.3 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
root@bpi-r4:/#
root@bpi-r4:/# uname -a
Linux bpi-r4 6.17.0-bpi-r4-main #1 SMP Mon Oct 13 19:13:37 CST 2025 aarch64 aarch64 aarch64 GNU/Linux
root@bpi-r4:/#
root@bpi-r4:/# lspci
0001:00:00.0 PCI bridge: MEDIATEK Corp. Device 7988 (rev 01)
0001:01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
root@bpi-r4:/#
root@bpi-r4:/# ll /proc/bus/pci/
total 0
dr-xr-xr-x 5 root root 0 Oct 14 04:27 ./
dr-xr-xr-x 4 root root 0 Oct 14 04:27 ../
dr-xr-xr-x 3 root root 0 Oct 14 04:27 0001:00/
dr-xr-xr-x 3 root root 0 Oct 14 04:27 0001:01/
-r--r--r-- 1 root root 0 Oct 14 04:27 devices
root@bpi-r4:/#
root@bpi-r4:/# cat /proc/bus/pci/devices
0000    14c37988        77              38300004                       0                       0                       0                     0                       0                       0                    8000                       0                     0                       0                       0                       0                       0      pcieport
0100    10ec8125        76                400001                       0                38200004                       0              38220004                       0                38210000                     100                       0                 10000                       0                    4000                       0                   10000      r8169
root@bpi-r4:/#
root@bpi-r4:/# dmesg | grep -i pci | head -n 100
[    1.982625] mtk-pcie-gen3 11310000.pcie: PCI host bridge to bus 0001:00
[    2.002720] pci_bus 0001:00: root bus resource [bus 00-ff]
[    2.020181] pci_bus 0001:00: root bus resource [io  0x400000-0x5fffff] (bus address [0x38000000-0x381fffff])
[    2.037984] pci_bus 0001:00: root bus resource [mem 0x38200000-0x3fffffff]
[    2.055268] pci_bus 0001:00: scanning bus
[    2.067107] pci 0001:00:00.0: [14c3:7988] type 01 class 0x060400 PCIe Root Port
[    2.079945] pci 0001:00:00.0: BAR 0 [mem 0x00000000-0x00007fff 64bit]
[    2.094478] mtk-pcie-gen3 11280000.pcie: PCIe link down, current LTSSM state: detect.quiet (0x1)
[    2.094506] mtk-pcie-gen3 11280000.pcie: probe with driver mtk-pcie-gen3 failed with error -110
[    2.096784] pci 0001:00:00.0: PCI bridge to [bus 00]
[    2.096793] pci 0001:00:00.0:   bridge window [io  0x0000-0x0fff]
[    2.107387] pci 0001:00:00.0:   bridge window [mem 0x00000000-0x000fffff]
[    2.180129] pci 0001:00:00.0:   bridge window [mem 0x00000000-0x000fffff 64bit pref]
[    2.187943] pci 0001:00:00.0: PME# supported from D0 D3hot D3cold
[    2.194031] pci 0001:00:00.0: PME# disabled
[    2.198342] pci 0001:00:00.0: vgaarb: pci_notify
[    2.203799] pci_bus 0001:00: fixups for bus
[    2.207986] pci 0001:00:00.0: scanning [bus 00-00] behind bridge, pass 0
[    2.214679] pci 0001:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.222673] pci 0001:00:00.0: scanning [bus 00-00] behind bridge, pass 1
[    2.229420] pci_bus 0001:01: scanning bus
[    2.241550] pci 0001:01:00.0: [10ec:8125] type 00 class 0x020000 PCIe Endpoint
[    2.256943] pci 0001:01:00.0: BAR 0 [io  0x0000-0x00ff]
[    2.271233] pci 0001:01:00.0: BAR 2 [mem 0x00000000-0x0000ffff 64bit]
[    2.286771] pci 0001:01:00.0: BAR 4 [mem 0x00000000-0x00003fff 64bit]
[    2.286777] pci 0001:01:00.0: ROM [mem 0x00000000-0x0000ffff pref]
[    2.308660] pci 0001:01:00.0: supports D1 D2
[    2.312926] pci 0001:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    2.319537] pci 0001:01:00.0: PME# disabled
[    2.323880] pci 0001:01:00.0: vgaarb: pci_notify
[    2.346395] pci_bus 0001:01: fixups for bus
[    2.350573] pci_bus 0001:01: bus scan returning with max=01
[    2.362320] pci_bus 0001:01: busn_res: [bus 01-ff] end is updated to 01
[    2.368947] pci_bus 0001:00: bus scan returning with max=01
[    2.374540] pci 0001:00:00.0: bridge window [mem 0x38200000-0x382fffff]: assigned
[    2.382011] pci 0001:00:00.0: BAR 0 [mem 0x38300000-0x38307fff 64bit]: assigned
[    2.396781] pci 0001:00:00.0: bridge window [io  0x400000-0x400fff]: assigned
[    2.411638] pci 0001:01:00.0: BAR 2 [mem 0x38200000-0x3820ffff 64bit]: assigned
[    2.418950] pci 0001:01:00.0: ROM [mem 0x38210000-0x3821ffff pref]: assigned
[    2.436563] pci 0001:01:00.0: BAR 4 [mem 0x38220000-0x38223fff 64bit]: assigned
[    2.443871] pci 0001:01:00.0: BAR 0 [io  0x400000-0x4000ff]: assigned
[    2.450306] pci 0001:00:00.0: PCI bridge to [bus 01]
[    2.455264] pci 0001:00:00.0:   bridge window [io  0x400000-0x400fff]
[    2.461692] pci 0001:00:00.0:   bridge window [mem 0x38200000-0x382fffff]
[    2.479160] pci_bus 0001:00: resource 4 [io  0x400000-0x5fffff]
[    2.485075] pci_bus 0001:00: resource 5 [mem 0x38200000-0x3fffffff]
[    2.497836] pci_bus 0001:01: resource 0 [io  0x400000-0x400fff]
[    2.503744] pci_bus 0001:01: resource 1 [mem 0x38200000-0x382fffff]
[    2.510065] pcieport 0001:00:00.0: vgaarb: pci_notify
[    2.525776] pcieport 0001:00:00.0: assign IRQ: got 118
[    2.530912] pcieport 0001:00:00.0: enabling device (0000 -> 0003)
[    2.537011] pcieport 0001:00:00.0: enabling bus mastering
[    2.542788] mtk-pcie-gen3 11310000.pcie: msi#0x0 address_hi 0x0 address_lo 0x11310c00 data 0
[    2.551225] mtk-pcie-gen3 11310000.pcie: msi#0x1 address_hi 0x0 address_lo 0x11310c00 data 1
[    2.570312] mtk-pcie-gen3 11310000.pcie: msi#0x2 address_hi 0x0 address_lo 0x11310c00 data 2
[    2.570316] mtk-pcie-gen3 11310000.pcie: msi#0x3 address_hi 0x0 address_lo 0x11310c00 data 3
[    2.585428] mtk-pcie-gen3 11310000.pcie: msi#0x4 address_hi 0x0 address_lo 0x11310c00 data 4
[    2.596801] mtk-pcie-gen3 11310000.pcie: msi#0x5 address_hi 0x0 address_lo 0x11310c00 data 5
[    2.596806] mtk-pcie-gen3 11310000.pcie: msi#0x6 address_hi 0x0 address_lo 0x11310c00 data 6
[    2.611911] mtk-pcie-gen3 11310000.pcie: msi#0x7 address_hi 0x0 address_lo 0x11310c00 data 7
[    2.628753] mtk-pcie-gen3 11310000.pcie: msi#0x8 address_hi 0x0 address_lo 0x11310c00 data 8
[    2.628758] mtk-pcie-gen3 11310000.pcie: msi#0x9 address_hi 0x0 address_lo 0x11310c00 data 9
[    2.641087] mtk-pcie-gen3 11310000.pcie: msi#0xa address_hi 0x0 address_lo 0x11310c00 data 10
[    2.654543] mtk-pcie-gen3 11310000.pcie: msi#0xb address_hi 0x0 address_lo 0x11310c00 data 11
[    2.654548] mtk-pcie-gen3 11310000.pcie: msi#0xc address_hi 0x0 address_lo 0x11310c00 data 12
[    2.696267] mtk-pcie-gen3 11310000.pcie: msi#0xd address_hi 0x0 address_lo 0x11310c00 data 13
[    2.704787] mtk-pcie-gen3 11310000.pcie: msi#0xe address_hi 0x0 address_lo 0x11310c00 data 14
[    2.713298] mtk-pcie-gen3 11310000.pcie: msi#0xf address_hi 0x0 address_lo 0x11310c00 data 15
[    2.721815] mtk-pcie-gen3 11310000.pcie: msi#0x10 address_hi 0x0 address_lo 0x11310c00 data 16
[    2.744000] mtk-pcie-gen3 11310000.pcie: msi#0x11 address_hi 0x0 address_lo 0x11310c00 data 17
[    2.755345] mtk-pcie-gen3 11310000.pcie: msi#0x12 address_hi 0x0 address_lo 0x11310c00 data 18
[    2.763940] mtk-pcie-gen3 11310000.pcie: msi#0x13 address_hi 0x0 address_lo 0x11310c00 data 19
[    2.778360] mtk-pcie-gen3 11310000.pcie: msi#0x14 address_hi 0x0 address_lo 0x11310c00 data 20
[    2.786960] mtk-pcie-gen3 11310000.pcie: msi#0x15 address_hi 0x0 address_lo 0x11310c00 data 21
[    2.795561] mtk-pcie-gen3 11310000.pcie: msi#0x16 address_hi 0x0 address_lo 0x11310c00 data 22
[    2.804159] mtk-pcie-gen3 11310000.pcie: msi#0x17 address_hi 0x0 address_lo 0x11310c00 data 23
[    2.812760] mtk-pcie-gen3 11310000.pcie: msi#0x18 address_hi 0x0 address_lo 0x11310c00 data 24
[    2.821360] mtk-pcie-gen3 11310000.pcie: msi#0x19 address_hi 0x0 address_lo 0x11310c00 data 25
[    2.829963] mtk-pcie-gen3 11310000.pcie: msi#0x1a address_hi 0x0 address_lo 0x11310c00 data 26
[    2.838563] mtk-pcie-gen3 11310000.pcie: msi#0x1b address_hi 0x0 address_lo 0x11310c00 data 27
[    2.847164] mtk-pcie-gen3 11310000.pcie: msi#0x1c address_hi 0x0 address_lo 0x11310c00 data 28
[    2.855765] mtk-pcie-gen3 11310000.pcie: msi#0x1d address_hi 0x0 address_lo 0x11310c00 data 29
[    2.864363] mtk-pcie-gen3 11310000.pcie: msi#0x1e address_hi 0x0 address_lo 0x11310c00 data 30
[    2.872964] mtk-pcie-gen3 11310000.pcie: msi#0x1f address_hi 0x0 address_lo 0x11310c00 data 31
[    2.882060] mtk-pcie-gen3 11310000.pcie: msi#0x0 address_hi 0x0 address_lo 0x11310c00 data 0
[    2.890580] pcieport 0001:00:00.0: PME: Signaling with IRQ 119
[    2.896529] pcieport 0001:00:00.0: AER: enabled with IRQ 119
[    2.899288] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[    2.902242] pcieport 0001:00:00.0: bwctrl: enabled with IRQ 119
[    2.911417] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[    2.917323] pcieport 0001:00:00.0: save config 0x00: 0x798814c3
[    2.927032] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[    2.932926] pcieport 0001:00:00.0: save config 0x04: 0x00100407
[    2.941265] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[    2.947166] pcieport 0001:00:00.0: save config 0x08: 0x06040001
[    2.953944] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0 (no details found
[    2.959843] pcieport 0001:00:00.0: save config 0x0c: 0x00010000
[    2.970614] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[    2.976515] pcieport 0001:00:00.0: save config 0x10: 0x38300004
[    2.985719] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
root@bpi-r4:/#
root@bpi-r4:/# dmesg | grep -i pci | head -n 150
[    8.105644] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[    8.145986] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[    8.146001] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[    8.146006] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[    8.146012] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[    8.146021] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[    8.161487] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[    8.161496] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[    8.161501] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[    8.161505] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[    8.161513] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[    8.168435] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[    8.168457] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[    8.168462] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[    8.168467] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[    8.168477] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[    8.178304] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[    8.178321] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[    8.178326] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000041/00006000
[    8.178332] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[    8.178337] pcieport 0001:00:00.0:    [ 6] BadTLP
[    8.178345] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[    8.226642] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[    8.226664] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[    8.226669] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[    8.226674] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[    8.226684] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[    8.351386] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[    8.351416] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[    8.353458] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[    8.353478] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[    8.457009] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[    8.457039] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Transmitter ID)
[    8.515434] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[    8.515463] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[    8.526772] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[    8.526796] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   12.996978] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   12.996994] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   12.996999] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[   12.997005] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[   13.002242] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   13.002250] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   13.002254] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000041/00006000
[   13.002259] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[   13.002263] pcieport 0001:00:00.0:    [ 6] BadTLP
[   13.020568] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   13.020582] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   13.020587] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[   13.020592] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[   13.032071] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   13.032081] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   13.032086] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[   13.032091] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[   13.162627] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   13.162637] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   13.162642] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[   13.162647] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[   13.162655] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   13.192335] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   13.192346] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   13.192350] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[   13.192356] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[   13.192364] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   13.258296] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   13.258307] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   13.258311] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[   13.258317] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[   13.258324] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   13.273403] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   13.273414] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   13.273419] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[   13.273424] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[   13.273432] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   13.301516] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   13.301526] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   13.301531] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[   13.301537] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[   13.301544] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   13.310317] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   13.310329] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   13.310334] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[   13.310339] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[   13.310347] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   13.337260] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   13.337273] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   13.393363] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   13.393377] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   13.394882] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   13.394896] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   13.433309] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   13.433322] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   18.007401] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   18.007417] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   18.007422] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[   18.007427] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[   18.117123] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   18.117137] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   18.117142] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[   18.117148] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[   18.148076] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   18.148086] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   18.148091] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[   18.148096] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[   18.162501] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   18.162512] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   18.162516] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[   18.162521] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[   18.184114] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   18.184124] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   18.184128] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[   18.184133] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[   18.184141] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   18.201496] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   18.201508] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   18.201513] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000041/00006000
[   18.201518] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[   18.201522] pcieport 0001:00:00.0:    [ 6] BadTLP
[   18.201530] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   18.280269] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   18.280281] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   18.280285] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[   18.280291] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[   18.280298] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   18.336956] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   18.336967] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   18.336972] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[   18.336977] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[   18.336985] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   18.515948] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   18.515960] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   18.515965] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[   18.515970] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[   18.515977] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   18.526711] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   18.526723] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   18.526727] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
[   18.526733] pcieport 0001:00:00.0:    [ 0] RxErr                  (First)
[   18.526741] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   18.597394] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   18.597408] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   18.603934] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   18.603945] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   18.668954] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   18.668982] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   18.677462] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   18.677489] r8169 0001:01:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   23.062036] pcieport 0001:00:00.0: AER: Multiple Correctable error message received from 0001:00:00.0
[   23.062054] pcieport 0001:00:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
[   23.062059] pcieport 0001:00:00.0:   device [14c3:7988] error status/mask=00000001/00006000
root@bpi-r4:/#

Related reports around the Internet:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2015670

RESOLVED, at least ping does work.

PCIe0 slot does not detect any sub-devices on it. So I focus on PCIe1 slot.

U-boot

Build-in driver:

image

Patch .dts:

Set and ping with the target ethernet interface. In this case “eth2: eth_rtl8169”, we have to set “ethact” as eth2 (eth_rtl8169 is also accepted):

F0: 102B 0000
FA: 1042 0000
FA: 1042 0000 [0200]
F9: 1041 0000
F3: 1006 0033 [0200]
F3: 4001 00E0 [0200]
F3: 0000 0000
V0: 0000 0000 [0001]
00: 0000 0000
BP: 0600 0041 [0000]
G0: 1190 0000
EC: 0000 0000 [2000]
MK: 0000 0000 [0000]
T0: 0000 01DE [0101]
Jump to BL

NOTICE:  BL2: v2.12.0(release):822d09ff94e-bpi-r4-emmc
NOTICE:  BL2: Built : 16:29:44, Oct 15 2025
NOTICE:  WDT: Cold boot
NOTICE:  WDT: disabled
NOTICE:  CPU: MT7988
NOTICE:  EMI: Using DDR unknown settings
NOTICE:  EMI: Detected DRAM size: 4096 MB
NOTICE:  EMI: complex R/W mem test passed
NOTICE:  LVTS: Enable thermal HW reset
NOTICE:  BL2: Booting BL31
NOTICE:  BL31: v2.12.0(release):822d09ff94e-bpi-r4-emmc
NOTICE:  BL31: Built : 16:29:47, Oct 15 2025


U-Boot 2025.10-bpi-g4e8065e823a3-dirty (Oct 15 2025 - 16:29:21 +0800)

CPU:   MediaTek MT7988
Model: mt7988-rfb
DRAM:  4 GiB
Core:  68 devices, 24 uclasses, devicetree: separate
MMC:   mmc@11230000: 0
Loading Environment from UBI... spi-nand: spi_nand spi_nand@0: Winbond SPI NAND was found.
spi-nand: spi_nand spi_nand@0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
jedec_spi_nor spi_nor@0: unrecognized JEDEC id bytes: ff, ff, ff
Volume ubootenv not found!

** Unable to read env from ubi:ubootenv **
In:    serial@11000000
Out:   serial@11000000
Err:   serial@11000000
=> board_late_init...
bootmedia:emmc
Net:   PCI: Failed autoconfig bar 10
PCI device ethernet@1,0: unknown chip version, assuming RTL-8169
PCI device: TxConfig = 0xFFFFFFFF

Warning: ethernet@1,0 (eth1) using random MAC address - a6:52:17:48:17:6e
eth1: ethernet@1,0MediaTek MT7988 built-in switch

Warning: ethernet@15110100 (eth0) using random MAC address - 3e:a6:01:24:81:fa
, eth0: ethernet@15110100, eth2: eth_rtl8169
Hit any key to stop autoboot: 0
BPI-R4> pci
BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
_____________________________________________________________
00.1f.07   0xffff     0xffff     Does not fit any class  0xff
00.00.00   0x14c3     0x7988     Bridge device           0x04
01.00.00   0x10ec     0x8125     Network controller      0x00
BPI-R4> setenv ethact eth2
BPI-R4> ping $serverip
Using eth_rtl8169 device
host 192.168.1.10 is alive
BPI-R4>

Kernel

Build-in driver:

image

No need to bind driver in .dts.

By default,

eth0 for wan lan1 lan2 lan3

eth1/2 for SFP wan lan

The RTL8125 driver (aka R8169) automatically add eth3 interface in use. If to set the above nodes as “disabled” in kernel .dts that will move the ethX number forward.

In case the driver creates eth3, add 06-eth3.network under systemd network control. Restart systemd-networkd service and test the network:

root@bpi-r4:/# lspci
0001:00:00.0 PCI bridge: MEDIATEK Corp. Device 7988 (rev 01)
0001:01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
root@bpi-r4:/#
root@bpi-r4:/# cat /etc/systemd/network/06-eth3.network
[Match]
Name=eth3

[Network]
DHCP=no
LinkLocalAddressing=no
ConfigureWithoutCarrier=true
Address=192.168.1.99/24
root@bpi-r4:/#
root@bpi-r4:/# systemctl restart systemd-networkd
root@bpi-r4:/# ip addr show eth3
10: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:e0:4c:68:33:8e brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.99/24 brd 192.168.1.255 scope global eth3
       valid_lft forever preferred_lft forever
root@bpi-r4:/#
root@bpi-r4:/# ping 192.168.1.10
PING 192.168.1.10 (192.168.1.10) 56(84) bytes of data.
64 bytes from 192.168.1.10: icmp_seq=1 ttl=128 time=0.837 ms
64 bytes from 192.168.1.10: icmp_seq=2 ttl=128 time=0.567 ms
64 bytes from 192.168.1.10: icmp_seq=3 ttl=128 time=0.503 ms
^C
--- 192.168.1.10 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2065ms
rtt min/avg/max/mdev = 0.503/0.635/0.837/0.144 ms
root@bpi-r4:/#

And kernel CONFIG_HOTPLUG_PCI=y CONFIG_HOTPLUG_PCI_PCIE=y does not work (no effect). Also, unplug the RTL8125 adapter/card will usually crash the kernel → auto-reboot. I think it’s a case just like SFP modules unplug crash mentioned in https://docs.banana-pi.org/en/BPI-R4/GettingStarted_BPI-R4#_10g_sfp_module

The kernel pcie interface would also keep reporting error messages in background as I commented on above posts. I’m just ignoring them in this moment. The Linux/Ubuntu community seems finding ways to resolve it.