Problem with meson-pcie patch

Hi @numbqq and @Frank

Seems there is a problem (at least for myself ) with a patch introduced by commit in Fenix build system

If I build a kernel with this patch I’m getting the following messages in my kernel log

    0.481935] dw-pcie fc000000.pcie: IRQ index 1 not found
[    0.484338] meson-pcie fc000000.pcie: host bridge /soc/pcie@fc000000 ranges:
[    0.484369] meson-pcie fc000000.pcie:       IO 0x00fc600000..0x00fc6fffff -> 0x0000000000
[    0.484383] meson-pcie fc000000.pcie:      MEM 0x00fc700000..0x00fdffffff -> 0x00fc700000
[    0.484454] meson-pcie fc000000.pcie: invalid resource
[    0.486713] meson-pcie fc000000.pcie: iATU unroll: enabled
[    0.486716] meson-pcie fc000000.pcie: Detected iATU regions: 4 outbound, 4 inbound
[    0.527447] meson-pcie fc000000.pcie: error: wait linkup timeout
[    0.568993] meson-pcie fc000000.pcie: error: wait linkup timeout

....

    1.268690] meson-pcie fc000000.pcie: error: wait linkup timeout
[    1.409751] meson-pcie fc000000.pcie: error: wait linkup timeout
[    1.550798] meson-pcie fc000000.pcie: error: wait linkup timeout
[    1.691855] meson-pcie fc000000.pcie: error: wait linkup timeout
[    1.832912] meson-pcie fc000000.pcie: error: wait linkup timeout
[    1.933278] meson-pcie fc000000.pcie: Phy link never came up
[    1.933418] meson-pcie fc000000.pcie: PCI host bridge to bus 0000:00
[    1.933426] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.933431] pci_bus 0000:00: root bus resource [io  0x0000-0xfffff]
[    1.933435] pci_bus 0000:00: root bus resource [mem 0xfc700000-0xfdffffff]
[    1.933460] pci 0000:00:00.0: [16c3:abcd] type 01 class 0x060400
[    1.933476] pci 0000:00:00.0: reg 0x38: [mem 0x00000000-0x0000ffff pref]
[    1.933509] pci 0000:00:00.0: supports D1
[    1.933513] pci 0000:00:00.0: PME# supported from D0 D1 D3hot D3cold
[    1.976998] meson-pcie fc000000.pcie: error: wait linkup timeout
[    1.979821] pci 0000:00:00.0: BAR 6: assigned [mem 0xfc700000-0xfc70ffff pref]
[    1.979842] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[    1.979858] pci 0000:00:00.0: Max Payload Size set to  256/ 256 (was  256), Max Read Rq  256
[    1.980240] pcieport 0000:00:00.0: PME: Signaling with IRQ 50
[    1.980493] pcieport 0000:00:00.0: AER: enabled with IRQ 50

And as result my NVME SSD stops working and isn’t visible to system

If I undo this patch - everything works absolutely fine and my system gets NVME SSD back

Tested on several kernels 5.15 and 5.16-RC8

@OldNavi I will check it

Just to mention - HW used: VIM3L → New M2X → NVME SSD.

@OldNavi

OK, I will check it today.

@OldNavi I tested it . This patch will make the SSD unusable. I will check this patch here and find a way to solve this bug. If you don’t need to use coral, you can remove this patch first.

Hi @Frank - thanks for confirming this defect, of course I don’t use coral and already disabled this patch.

1 Like

Is there a timeline for getting this patch reverted in one or more of the existing Krescue images? Barring that, is there a known-good image I should try instead that isn’t using an ancient kernel?

I’m trying to evaluate my VIM3(L) boards alongside some other ARM SBCs for an embedded hardware application, but if I can’t use a mainline kernel + SSD it’s going to be a short and unsuccessful test for the Khadas option. (I’ll still use them for my hobby projects, but only those that don’t require more storage than the built-in MMC, which rules out anything server or media-related.)

So I went back down the list of images in Krescue and tried basically everything running a 5.x kernel…and the latest Ubuntu 20.04 GNOME image worked!

Now, I don’t need or want the GNOME environment for this project, but I can work around it and build a new golden image from here, at least to get through my evaluation.

try to use Generic ubuntu images via Krescue or fenix

http://dl.khadas.com/firmware/Krescue/images/Generic_Ubuntu-minimal-focal_Linux-5.16-rc2_arm64_SD-USB_V1.0.7-211122-develop.img.xz

and dont forget install mainline uboot into emmc or spi