Trunk still not support pci wifi adapters on mt7621

Hello all,

please note that the trunk still not support pci wifi adapters on mt7621 board.

Here is from 19.07.4:

root@OpenWrt:~# lspci
00:00.0 PCI bridge: Device 0e8d:0801 (rev 01)
00:01.0 PCI bridge: Device 0e8d:0801 (rev 01)
01:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02)
02:00.0 Network controller: Qualcomm Atheros AR9287 Wireless Network Adapter (PCI-Express) (rev 01)

root@OpenWrt:~# lspci -v
(skip)
02:00.0 Network controller: Qualcomm Atheros AR9287 Wireless Network Adapter (PCI-Express) (rev 01)
        Subsystem: Qualcomm Atheros Device 30a4
        Flags: fast devsel, IRQ 255
        Memory at 60200000 (64-bit, non-prefetchable) [disabled] [size=64K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit-
        Capabilities: [60] Express Legacy Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Virtual Channel
        Capabilities: [160] Device Serial Number 00-15-17-ff-ff-24-14-12
        Capabilities: [170] Power Budgeting <?>


Here is from trunk built today:

root@OpenWrt:~# lspci
00:00.0 PCI bridge: Device 0e8d:0801 (rev 01)
00:01.0 PCI bridge: Device 0e8d:0801 (rev 01)
01:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02)
02:00.0 Ethernet controller: Qualcomm Atheros AR5008 Wireless Network Adapter (rev 01)

root@OpenWrt:~# lspci -v
(skip)
02:00.0 Ethernet controller: Qualcomm Atheros AR5008 Wireless Network Adapter (rev 01)
        Flags: fast devsel, IRQ 255
        Memory at 60200000 (64-bit, non-prefetchable) [disabled] [size=64K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit-
        Capabilities: [60] Express Legacy Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Virtual Channel
        Capabilities: [160] Device Serial Number 00-00-00-00-00-00-00-00
        Capabilities: [170] Power Budgeting <?>

You may see that the pci card in trunk does not initialized properly.

Did you report this problem on https://bugs.openwrt.org?

Yes:

Also found some interesting. At lspci:

00:01.0 PCI bridge: Device 0e8d:0801 (rev 01) (prog-if 00 [Normal decode])
        Device tree node: /sys/firmware/devicetree/base/pcie@1e140000/pcie@1,0
        Flags: bus master, fast devsel, latency 0, IRQ 255
        Memory at 60310000 (32-bit, non-prefetchable) [size=64K]
        Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
        I/O behind bridge: 00001000-00001fff [size=4K]
        **Memory behind bridge: 60200000-602fffff [size=1M]**
        Prefetchable memory behind bridge: [disabled]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [70] Express Root Port (Slot-), MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Virtual Channel

At dmesg:

[    1.667110] pci 0000:00:01.0: BAR 0: no space for [**mem size 0x80000000**]
[    1.673711] pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000]

Of course 0x80000000is greater than memory behind bridge: 60200000-602fffff [size=1M].

You may contact https://github.com/paraka as he wrote the new PCIe driver.

I wrote him some times ago.

And just for information. Trunk source code from 20 October was compiled and works fine.

There was a kernel version bump at that day, sounds then like a kernel related problem.

Yes, it looks like that was a kernel problem, I found similar message on linux forums that some kernel versions have a pci problems.

Hope it will never come back :))))

1 Like