Failure with mhi-pci-generic driver and T99W175 modem

I finally got some time to bring all the pieces together and test:

  • HiLink HLK-7621A evaluation board running current snapshot
  • M.2. to mPCIe adapter with PCI pins interconnected
  • T99W175 modem

The modem is visible:

root@OpenWrt:/# lspci
00:02.0 PCI bridge: Device 0e8d:0801 (rev 01)
01:00.0 Unassigned class [ff00]: Foxconn International, Inc. Device e0b1
root@OpenWrt:/# lspci -v
[...]
01:00.0 Unassigned class [ff00]: Foxconn International, Inc. Device e0b1
        Subsystem: Qualcomm Technologies, Inc Device 010c
        Flags: fast devsel
        Memory at 60000000 (64-bit, non-prefetchable) [size=4K]
        Memory at 60001000 (64-bit, non-prefetchable) [size=4K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/32 Maskable+ 64bit+
        Capabilities: [70] Express Endpoint, IntMsgNum 0
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [148] Secondary PCI Express
        Capabilities: [168] Physical Layer 16.0 GT/s <?>
        Capabilities: [18c] Lane Margining at the Receiver
        Capabilities: [19c] Transaction Processing Hints
        Capabilities: [228] Latency Tolerance Reporting
        Capabilities: [230] L1 PM Substates
        Capabilities: [240] Data Link Feature <?>

Device e0b1 is known to the driver.

However, this is what I have in the log:

Tue Jun  4 08:19:47 2024 user.info kernel: [   11.569397] kmodloader: loading kernel modules from /etc/modules.d/*
Tue Jun  4 08:19:47 2024 kern.info kernel: [   11.643715] mtk-eip93 1e004000.crypto: EIP93 Crypto Engine Initialized.
Tue Jun  4 08:19:47 2024 kern.info kernel: [   12.135026] Loading modules backported from Linux version v6.6.15-0-g51f354b815c4
Tue Jun  4 08:19:47 2024 kern.info kernel: [   12.150096] Backport generated by backports.git 193becf2
Tue Jun  4 08:19:47 2024 kern.info kernel: [   12.172914] mhi-pci-generic 0000:01:00.0: MHI PCI device found: foxconn-sdx55
Tue Jun  4 08:19:47 2024 kern.info kernel: [   12.187302] mhi-pci-generic 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x60000fff 64bit]
Tue Jun  4 08:19:47 2024 kern.info kernel: [   12.204004] pci 0000:00:02.0: enabling device (0006 -> 0007)
Tue Jun  4 08:19:47 2024 kern.info kernel: [   12.215319] mhi-pci-generic 0000:01:00.0: enabling device (0000 -> 0002)
Tue Jun  4 08:19:47 2024 kern.err kernel: [   12.228733] mhi-pci-generic 0000:01:00.0: Error allocating MSI vectors -28
Tue Jun  4 08:19:47 2024 kern.warn kernel: [   12.242440] mhi-pci-generic: probe of 0000:01:00.0 failed with error -28
Tue Jun  4 08:19:47 2024 kern.info kernel: [   12.268090] NET: Registered PF_QIPCRTR protocol family
Tue Jun  4 08:19:47 2024 kern.info kernel: [   12.548464] PPP generic driver version 2.4.2
Tue Jun  4 08:19:47 2024 kern.info kernel: [   12.559088] NET: Registered PF_PPPOX protocol family
Tue Jun  4 08:19:47 2024 user.info kernel: [   12.576129] kmodloader: done loading kernel modules from /etc/modules.d/*

As I can see, mhi-pci-generic is not loaded for whatever reason.

In this topic the driver is loaded without errors with the same modem.

Do I need to adjust my DTS file or do anything else? Here is the original DTS, I only removed a section with &pcie2.

I have a feeling that the problem has something to do with shared interrupts.
I noticed that my log does not have an entry that is present in some of the other logs I found:
mhi-pci-generic 0003:01:00.0: assign IRQ: got 0

Another difference that I see:
my lspci -v shows:

Capabilities: [50] MSI: Enable- Count=1/32 Maskable+ 64bit+
Capabilities: [70] Express Endpoint, IntMsgNum 0

while it should be like this:

Capabilities: [50] MSI: Enable+ Count=8/32 Maskable+ 64bit+
Capabilities: [70] Express Endpoint, MSI 00

MSI is enabled:

root@OpenWrt:/# cat /sys/bus/pci/devices/*/msi_bus
1
1

@daniel can you take a look please?