linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Qualcomm Atheros Ath10k and Ath11k CE Buffer DMA alignment issues on Raspberry PI CM4 - Aarch64 architecture
@ 2021-09-16 14:38 Maurice Smulders
  2021-10-01  6:38 ` Kalle Valo
  0 siblings, 1 reply; 3+ messages in thread
From: Maurice Smulders @ 2021-09-16 14:38 UTC (permalink / raw)
  To: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 3437 bytes --]

I am trying to use the QCA6174A and the QCA6390 on a custom board using a PCIe switch - but that doesn't matter - It still fails w/o the switch:

lspci
00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2711 PCIe Bridge (rev 20)
01:00.0 PCI bridge: Pericom Semiconductor PI7C9X2G608GP PCIe2 6-Port/8-Lane Packet Switch
02:01.0 PCI bridge: Pericom Semiconductor PI7C9X2G608GP PCIe2 6-Port/8-Lane Packet Switch
02:02.0 PCI bridge: Pericom Semiconductor PI7C9X2G608GP PCIe2 6-Port/8-Lane Packet Switch
02:03.0 PCI bridge: Pericom Semiconductor PI7C9X2G608GP PCIe2 6-Port/8-Lane Packet Switch
02:04.0 PCI bridge: Pericom Semiconductor PI7C9X2G608GP PCIe2 6-Port/8-Lane Packet Switch
02:05.0 PCI bridge: Pericom Semiconductor PI7C9X2G608GP PCIe2 6-Port/8-Lane Packet Switch
05:00.0 Unassigned class [ff00]: Qualcomm QCA6390 Wireless Network Adapter [AX500-DBS (2x2)]
06:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)

Both device drivers do not work. I changed the CE code to use the GFP_DMA32 flag as an attempt to allocate the memory correctly, but DMESG shows

[pi@node6745 ~]$ dmesg | grep ath
[    5.801896] ath10k_pci 0000:06:00.0: ath10k_ce_alloc_src_ring: Not unaligned <--- User message exit from this function
[    5.804284] ath10k_pci 0000:06:00.0: failed to alloc CE src ring 0: -12
[    5.813138] ath10k_pci 0000:06:00.0: failed to allocate copy engine pipe 0: -12
[    5.815414] ath10k_pci 0000:06:00.0: failed to allocate copy engine pipes: -12
[    5.818002] ath10k_pci 0000:06:00.0: failed to setup resource: -12
[    5.826953] ath10k_pci: probe of 0000:06:00.0 failed with error -12
[    5.855993] ath11k_pci 0000:05:00.0: WARNING: ath11k PCI support is experimental!
[    5.896148] ath11k_pci 0000:05:00.0: BAR 0: assigned [mem 0x600000000-0x600ffffff 64bit]
[    5.900236] ath11k_pci 0000:05:00.0: enabling device (0000 -> 0002)
[    5.914050] ath11k_pci: probe of 0000:05:00.0 failed with error -12

Error -12 (ENOMEM) gets returned and the driver doesn't work...

05:00.0 Unassigned class [ff00]: Qualcomm QCA6390 Wireless Network Adapter [AX500-DBS (2x2)]
Subsystem: Qualcomm Device 0108
Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Region 0: Memory at 600000000 (64-bit, non-prefetchable) [size=16M]
Capabilities: <access denied>
Kernel modules: ath11k_pci

06:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)
Subsystem: ASUSTeK Computer Inc. Device 86e0
Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Interrupt: pin A routed to IRQ 48
Region 0: Memory at 601000000 (64-bit, non-prefetchable) [disabled] [size=2M]
Capabilities: <access denied>
Kernel modules: ath10k_pci

I am at a loss what to do here. The ath11k driver has the SINGLE MSI fix built in. 

Any ideas' what I can try to fix this problem on the raspberry Pi CM4?

- Maurice



 
 
Maurice Smulders  |  Operating System Software Engineer
--------------------------------------------------------------
https://windtalker.com   |  C: 720.514.0310


[-- Attachment #2: image001.png --]
[-- Type: image/png, Size: 4551 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Qualcomm Atheros Ath10k and Ath11k CE Buffer DMA alignment issues on Raspberry PI CM4 - Aarch64 architecture
  2021-09-16 14:38 Qualcomm Atheros Ath10k and Ath11k CE Buffer DMA alignment issues on Raspberry PI CM4 - Aarch64 architecture Maurice Smulders
@ 2021-10-01  6:38 ` Kalle Valo
  2021-10-01 11:17   ` Govind Singh
  0 siblings, 1 reply; 3+ messages in thread
From: Kalle Valo @ 2021-10-01  6:38 UTC (permalink / raw)
  To: Maurice Smulders; +Cc: linux-wireless, ath10k, ath11k

Maurice Smulders <Maurice.Smulders@windtalker.com> writes:

> I am trying to use the QCA6174A and the QCA6390 on a custom board using a PCIe switch - but that doesn't matter - It still fails w/o the switch:
>
> lspci
> 00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2711 PCIe Bridge (rev 20)
> 01:00.0 PCI bridge: Pericom Semiconductor PI7C9X2G608GP PCIe2 6-Port/8-Lane Packet Switch
> 02:01.0 PCI bridge: Pericom Semiconductor PI7C9X2G608GP PCIe2 6-Port/8-Lane Packet Switch
> 02:02.0 PCI bridge: Pericom Semiconductor PI7C9X2G608GP PCIe2 6-Port/8-Lane Packet Switch
> 02:03.0 PCI bridge: Pericom Semiconductor PI7C9X2G608GP PCIe2 6-Port/8-Lane Packet Switch
> 02:04.0 PCI bridge: Pericom Semiconductor PI7C9X2G608GP PCIe2 6-Port/8-Lane Packet Switch
> 02:05.0 PCI bridge: Pericom Semiconductor PI7C9X2G608GP PCIe2 6-Port/8-Lane Packet Switch
> 05:00.0 Unassigned class [ff00]: Qualcomm QCA6390 Wireless Network Adapter [AX500-DBS (2x2)]
> 06:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)
>
> Both device drivers do not work. I changed the CE code to use the GFP_DMA32 flag as an attempt to allocate the memory correctly, but DMESG shows
>
> [pi@node6745 ~]$ dmesg | grep ath
> [    5.801896] ath10k_pci 0000:06:00.0: ath10k_ce_alloc_src_ring: Not unaligned <--- User message exit from this function
> [    5.804284] ath10k_pci 0000:06:00.0: failed to alloc CE src ring 0: -12
> [    5.813138] ath10k_pci 0000:06:00.0: failed to allocate copy engine pipe 0: -12
> [    5.815414] ath10k_pci 0000:06:00.0: failed to allocate copy engine pipes: -12
> [    5.818002] ath10k_pci 0000:06:00.0: failed to setup resource: -12
> [    5.826953] ath10k_pci: probe of 0000:06:00.0 failed with error -12
> [    5.855993] ath11k_pci 0000:05:00.0: WARNING: ath11k PCI support is experimental!
> [    5.896148] ath11k_pci 0000:05:00.0: BAR 0: assigned [mem 0x600000000-0x600ffffff 64bit]
> [    5.900236] ath11k_pci 0000:05:00.0: enabling device (0000 -> 0002)
> [    5.914050] ath11k_pci: probe of 0000:05:00.0 failed with error -12
>
> Error -12 (ENOMEM) gets returned and the driver doesn't work...
>
> 05:00.0 Unassigned class [ff00]: Qualcomm QCA6390 Wireless Network Adapter [AX500-DBS (2x2)]
> Subsystem: Qualcomm Device 0108
> Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
> Region 0: Memory at 600000000 (64-bit, non-prefetchable) [size=16M]
> Capabilities: <access denied>
> Kernel modules: ath11k_pci
>
> 06:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)
> Subsystem: ASUSTeK Computer Inc. Device 86e0
> Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
> Interrupt: pin A routed to IRQ 48
> Region 0: Memory at 601000000 (64-bit, non-prefetchable) [disabled] [size=2M]
> Capabilities: <access denied>
> Kernel modules: ath10k_pci
>
> I am at a loss what to do here. The ath11k driver has the SINGLE MSI fix built in. 
>
> Any ideas' what I can try to fix this problem on the raspberry Pi CM4?

Sorry, no ideas. But adding ath10k and ath11k lists, maybe people there
can propose something.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Qualcomm Atheros Ath10k and Ath11k CE Buffer DMA alignment issues on Raspberry PI CM4 - Aarch64 architecture
  2021-10-01  6:38 ` Kalle Valo
@ 2021-10-01 11:17   ` Govind Singh
  0 siblings, 0 replies; 3+ messages in thread
From: Govind Singh @ 2021-10-01 11:17 UTC (permalink / raw)
  To: Kalle Valo, Maurice Smulders; +Cc: linux-wireless, ath10k, ath11k


On 01-10-2021 12:08, Kalle Valo wrote:
> Maurice Smulders <Maurice.Smulders@windtalker.com> writes:
>
>> I am trying to use the QCA6174A and the QCA6390 on a custom board using a PCIe switch - but that doesn't matter - It still fails w/o the switch:
>>
>> lspci
>> 00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2711 PCIe Bridge (rev 20)
>> 01:00.0 PCI bridge: Pericom Semiconductor PI7C9X2G608GP PCIe2 6-Port/8-Lane Packet Switch
>> 02:01.0 PCI bridge: Pericom Semiconductor PI7C9X2G608GP PCIe2 6-Port/8-Lane Packet Switch
>> 02:02.0 PCI bridge: Pericom Semiconductor PI7C9X2G608GP PCIe2 6-Port/8-Lane Packet Switch
>> 02:03.0 PCI bridge: Pericom Semiconductor PI7C9X2G608GP PCIe2 6-Port/8-Lane Packet Switch
>> 02:04.0 PCI bridge: Pericom Semiconductor PI7C9X2G608GP PCIe2 6-Port/8-Lane Packet Switch
>> 02:05.0 PCI bridge: Pericom Semiconductor PI7C9X2G608GP PCIe2 6-Port/8-Lane Packet Switch
>> 05:00.0 Unassigned class [ff00]: Qualcomm QCA6390 Wireless Network Adapter [AX500-DBS (2x2)]
>> 06:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)
>>
>> Both device drivers do not work. I changed the CE code to use the GFP_DMA32 flag as an attempt to allocate the memory correctly, but DMESG shows
>>
>> [pi@node6745 ~]$ dmesg | grep ath
>> [    5.801896] ath10k_pci 0000:06:00.0: ath10k_ce_alloc_src_ring: Not unaligned <--- User message exit from this function
>> [    5.804284] ath10k_pci 0000:06:00.0: failed to alloc CE src ring 0: -12
>> [    5.813138] ath10k_pci 0000:06:00.0: failed to allocate copy engine pipe 0: -12
>> [    5.815414] ath10k_pci 0000:06:00.0: failed to allocate copy engine pipes: -12
>> [    5.818002] ath10k_pci 0000:06:00.0: failed to setup resource: -12
>> [    5.826953] ath10k_pci: probe of 0000:06:00.0 failed with error -12
>> [    5.855993] ath11k_pci 0000:05:00.0: WARNING: ath11k PCI support is experimental!
>> [    5.896148] ath11k_pci 0000:05:00.0: BAR 0: assigned [mem 0x600000000-0x600ffffff 64bit]
>> [    5.900236] ath11k_pci 0000:05:00.0: enabling device (0000 -> 0002)
>> [    5.914050] ath11k_pci: probe of 0000:05:00.0 failed with error -12
>>
>> Error -12 (ENOMEM) gets returned and the driver doesn't work...
>>
>> 05:00.0 Unassigned class [ff00]: Qualcomm QCA6390 Wireless Network Adapter [AX500-DBS (2x2)]
>> Subsystem: Qualcomm Device 0108
>> Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
>> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
>> Region 0: Memory at 600000000 (64-bit, non-prefetchable) [size=16M]
>> Capabilities: <access denied>
>> Kernel modules: ath11k_pci
>>
>> 06:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)
>> Subsystem: ASUSTeK Computer Inc. Device 86e0
>> Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
>> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
>> Interrupt: pin A routed to IRQ 48
>> Region 0: Memory at 601000000 (64-bit, non-prefetchable) [disabled] [size=2M]
>> Capabilities: <access denied>
>> Kernel modules: ath10k_pci
>>
>> I am at a loss what to do here. The ath11k driver has the SINGLE MSI fix built in.
>>
>> Any ideas' what I can try to fix this problem on the raspberry Pi CM4?
> Sorry, no ideas. But adding ath10k and ath11k lists, maybe people there
> can propose something.
In RPI CM4 board, pcie-32bit-dma configuration is required for 
QCA6174/QCA9880 module, which can be enabled using dt overlay. Also, you 
will have to enable legacy PCI IRQ mode(using modparam@ath10k_pci 
irq_mode=1) as MSI does not work.

DT overlay change:
56b8b2c96118293ad6dec20203dada8116f7c664:overlays: Add pcie-32bit-dma 
overlay


BR,

Govind



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-01 11:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-16 14:38 Qualcomm Atheros Ath10k and Ath11k CE Buffer DMA alignment issues on Raspberry PI CM4 - Aarch64 architecture Maurice Smulders
2021-10-01  6:38 ` Kalle Valo
2021-10-01 11:17   ` Govind Singh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).