All of lore.kernel.org
 help / color / mirror / Atom feed
From: Govind Singh <govind.sk85@gmail.com>
To: Kalle Valo <kvalo@codeaurora.org>,
	Maurice Smulders <Maurice.Smulders@windtalker.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	ath10k@lists.infradead.org, ath11k@lists.infradead.org
Subject: Re: Qualcomm Atheros Ath10k and Ath11k CE Buffer DMA alignment issues on Raspberry PI CM4 - Aarch64 architecture
Date: Fri, 1 Oct 2021 16:47:30 +0530	[thread overview]
Message-ID: <6436bf9c-02fc-06b0-eb27-15a33b64abe0@gmail.com> (raw)
In-Reply-To: <87lf3d5jxo.fsf@tynnyri.adurom.net>


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



WARNING: multiple messages have this Message-ID (diff)
From: Govind Singh <govind.sk85@gmail.com>
To: Kalle Valo <kvalo@codeaurora.org>,
	Maurice Smulders <Maurice.Smulders@windtalker.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	ath10k@lists.infradead.org, ath11k@lists.infradead.org
Subject: Re: Qualcomm Atheros Ath10k and Ath11k CE Buffer DMA alignment issues on Raspberry PI CM4 - Aarch64 architecture
Date: Fri, 1 Oct 2021 16:47:30 +0530	[thread overview]
Message-ID: <6436bf9c-02fc-06b0-eb27-15a33b64abe0@gmail.com> (raw)
In-Reply-To: <87lf3d5jxo.fsf@tynnyri.adurom.net>


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



-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

WARNING: multiple messages have this Message-ID (diff)
From: Govind Singh <govind.sk85@gmail.com>
To: Kalle Valo <kvalo@codeaurora.org>,
	Maurice Smulders <Maurice.Smulders@windtalker.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	ath10k@lists.infradead.org, ath11k@lists.infradead.org
Subject: Re: Qualcomm Atheros Ath10k and Ath11k CE Buffer DMA alignment issues on Raspberry PI CM4 - Aarch64 architecture
Date: Fri, 1 Oct 2021 16:47:30 +0530	[thread overview]
Message-ID: <6436bf9c-02fc-06b0-eb27-15a33b64abe0@gmail.com> (raw)
In-Reply-To: <87lf3d5jxo.fsf@tynnyri.adurom.net>


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



_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  reply	other threads:[~2021-10-01 11:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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  6:38   ` Kalle Valo
2021-10-01  6:38   ` Kalle Valo
2021-10-01 11:17   ` Govind Singh [this message]
2021-10-01 11:17     ` Govind Singh
2021-10-01 11:17     ` Govind Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6436bf9c-02fc-06b0-eb27-15a33b64abe0@gmail.com \
    --to=govind.sk85@gmail.com \
    --cc=Maurice.Smulders@windtalker.com \
    --cc=ath10k@lists.infradead.org \
    --cc=ath11k@lists.infradead.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.