[BPI-R3] NVME connection issue

Of course kmod-nvme is installed.

then happy troubleshooting urself, Im sorry if my suggestion made u looked dumb & offended u. “as I said”, “of cause”… you are too smart and don’t need opinion & suggestion.

Report: Samsung 970 Evo plus nvme ssd (500 gb version) works with BPI-R3 without issues.

Report: Samsung 970 Evo plus nvme ssd (500 gb version) works with BPI-R3 without issues.

Do you have kmod-nvme as built-in (kernel) or just installed from package?

I built openwrt image from source with kmod-nvme built-in.

Then thats correct. the kmod-nvme has to be compiled in kernel in order to solve cold boot nvme not found issue.

No matter how to install kmod-nvme. I tried both ways and result is the same.

I think the problem in too long init of NVME controller. Maybe I “won” the silicon lottery or something :weary:

I looked the Linux PCIe host controller driver ( pcie-mediatek-gen3.c) and decide modify it to fully comply the PCIe CEM clause 2.2.

Now I haven’t any issue with NVME. The patch in attach.

611-pcie-mediatek-gen3-PERST-for-100ms.patch (677 Байты)

1 Like

Thx for the Patch,you should send it to linux kernel mailing list to have it fixed in mainline

Do I need to trim f2fs ssd? Fstrim -a -v command trims 0 bytes on my /dev/nvme0n1.

I think trim is needed. Maybe for some reason your drive does not support trim, try “lsblk --discard” it will show support trim.

In my case I’m use ext4 and trim supported. “fstrim -v /mnt/nvme0n1p2” for the first time gives all free spase on ssd is trimmed, after it givs 0 bytes.

But I’m too lazy, and I set the “discard” in “Mount options” so I don’t have to think about it.

Checkout this, it will also apply to Debian i believe.

https://wiki.archlinux.org/title/F2FS

Chapter 3.2

If have used f2fs on SDmmc and Emmc and it behaves very well. For nvme I have chosen to use btrfs, as repair/recovery I think is better supported.

Hi Frank, Was this patch fixed in mainline? I have ordered Patriot P300, 512GB, M.2 SSD (P300P512GM28) for my Bpi-R3, is it going to be a pain to install? I can still cancel the order as I have not received the SSD.

the patch was not accepted in mainline and daniel did a second attempt…but i had no issues yet with nvme…

Thanks, for quick response, I guess I will not cancel the order, lets see if the Patriot P300, 512GB, M.2 SSD (P300P512GM28) works out of the box with BPi-R3 running Current stable release - OpenWrt 23.05.0

i guess the patch is included in openwrt (but not mainline linux) as daniel posted it too…

I would be interested in this outcome, as I’d like to do this also.

As I currently understand, we cannot boot from nvme devices?

nvme devices can be used for applications, opkg installed packages?

Yes,you have to boot from mmc or spi till linux kernel is loaded…rootfs can be on nvme

1 Like

Just wanted to share my experience on a similar issue I had about PCIe link down.

I fixed my issue by replacing my M.2 hard drive with a new one that was clearly indicated to be compatible with NVMe. My issue was because I didn’t noticed the M.2 hard drive that I purchased was only supporting SATA and wasn’t compatible with NVMe.

Yes r3 has only pcie connected to m.2 slot. No sata or usb lanes…

Reboots randomly after about a day. There are constant errors in the logs on the pci bus


Wed Oct 11 22:12:52 2023 kern.info kernel: [18415.914974] pcieport 0000:00:00.0: AER: Corrected error received: 0000:00:00.0
Wed Oct 11 22:12:52 2023 kern.warn kernel: [18415.922203] pcieport 0000:00:00.0: PCIe Bus Error: severity=Corrected, type=Physical Layer, (Receiver ID)
Wed Oct 11 22:12:52 2023 kern.warn kernel: [18415.931756] pcieport 0000:00:00.0:   device [14c3:1f32] error status/mask=000000c1/00006000
Wed Oct 11 22:12:52 2023 kern.warn kernel: [18415.940106] pcieport 0000:00:00.0:    [ 0] RxErr                  (First)
Wed Oct 11 22:12:52 2023 kern.warn kernel: [18415.946891] pcieport 0000:00:00.0:    [ 6] BadTLP
Wed Oct 11 22:12:52 2023 kern.warn kernel: [18415.952966] pcieport 0000:00:00.0:    [ 7] BadDLLP
Wed Oct 11 22:12:52 2023 kern.info kernel: [18415.959061] pcieport 0000:00:00.0: AER: Multiple Corrected error received: 0000:00:00.0
Wed Oct 11 22:12:52 2023 kern.info kernel: [18416.016360] pcieport 0000:00:00.0: AER: can't find device of ID0000
Wed Oct 11 22:12:52 2023 kern.info kernel: [18416.022619] pcieport 0000:00:00.0: AER: Multiple Corrected error received: 0000:00:00.0
Wed Oct 11 22:12:52 2023 kern.info kernel: [18416.080292] pcieport 0000:00:00.0: AER: can't find device of ID0000
Wed Oct 11 22:12:52 2023 kern.info kernel: [18416.086570] pcieport 0000:00:00.0: AER: Multiple Corrected error received: 0000:00:00.0
Wed Oct 11 22:12:52 2023 kern.info kernel: [18416.144216] pcieport 0000:00:00.0: AER: can't find device of ID0000
Wed Oct 11 22:12:52 2023 kern.info kernel: [18416.150469] pcieport 0000:00:00.0: AER: Multiple Corrected error received: 0000:00:00.0
Wed Oct 11 22:12:52 2023 kern.info kernel: [18416.208146] pcieport 0000:00:00.0: AER: can't find device of ID0000
Wed Oct 11 22:12:52 2023 kern.info kernel: [18416.214409] pcieport 0000:00:00.0: AER: Uncorrected (Fatal) error received: 0000:00:00.0
Wed Oct 11 22:12:52 2023 kern.err kernel: [18416.222489] pcieport 0000:00:00.0: PCIe Bus Error: severity=Uncorrected (Fatal), type=Transaction Layer, (Requester ID)
Wed Oct 11 22:12:52 2023 kern.err kernel: [18416.233251] pcieport 0000:00:00.0:   device [14c3:1f32] error status/mask=00004020/00400000
Wed Oct 11 22:12:52 2023 kern.err kernel: [18416.241594] pcieport 0000:00:00.0:    [ 5] SDES                   (First)
Wed Oct 11 22:12:52 2023 kern.err kernel: [18416.248373] pcieport 0000:00:00.0:    [14] CmpltTO
Wed Oct 11 22:12:52 2023 kern.debug kernel: [18416.254469] pcieport 0000:00:00.0: AER: broadcast error_detected message
Wed Oct 11 22:12:52 2023 kern.warn kernel: [18416.261159] nvme nvme0: frozen state error detected, reset controller

NVMe A-Data Falcon 1TB AFALCON-1T-C. Disabled APST in the kernel boot. Nothing helps.