[OpenWrt-Devel] [PATCH] layerscape: kernel: cma: increase CMA buffer size from 16 to 32MB

Linus Lüssing linus.luessing at c0d3.blue
Mon May 25 03:40:00 EDT 2020


From: Linus Lüssing <ll at simonwunderlich.de>

16MB are not enough for ath10k to initialize three 4x4 AC Wave 2
PCIe cards
(168c:0046: Qualcomm Atheros QCA9984 802.11ac Wave 2 Wireless Network Adapter).
This leads to the following error when trying to initialize the third
one:

[   16.742475] ath10k_pci 0002:01:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[   16.874024] ath10k_pci 0002:01:00.0: Direct firmware load for ath10k/pre-cal-pci-0002:01:00.0.bin failed with error -2
[   16.884784] ath10k_pci 0002:01:00.0: Direct firmware load for ath10k/cal-pci-0002:01:00.0.bin failed with error -2
[   16.895224] ath10k_pci 0002:01:00.0: Direct firmware load for ath10k/QCA9984/hw1.0/firmware-6.bin failed with error -2
[   16.905956] ath10k_pci 0002:01:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe
[   16.915881] ath10k_pci 0002:01:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 1
[   16.925422] ath10k_pci 0002:01:00.0: firmware ver 10.4-3.9.0.2-00021 api 5 features no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast,no-ps crc32 9626782c
[   18.169022] ath10k_pci 0002:01:00.0: board_file api 2 bmi_id 0:31 crc32 cf58c3bc
[   20.692482] cma: cma_alloc: alloc failed, req-size: 200 pages, ret: -12
[   25.882670] ath10k_pci 0002:01:00.0: wmi service ready event not received
[   25.943121] ath10k_pci 0002:01:00.0: could not init core (-110)
[   25.949048] ath10k_pci 0002:01:00.0: could not probe fw (-110)

Fixing this issue by doubling the CMA buffer size from 16 to 32MB.
New values in /proc/meminfo, with three such cards connected:

root at OpenWrt:/# cat /proc/meminfo | grep -i "cma"
CmaTotal:          32768 kB
CmaFree:           19268 kB

Interestingly, older Qualcomm AC cards
(Qualcomm Atheros QCA986x/988x 802.11ac Wireless Network Adapter)
don't seem to use the Contiguous Memory Allocator and therefore
don't suffer from this issue.

Signed-off-by: Linus Lüssing <ll at simonwunderlich.de>
---
 target/linux/layerscape/armv8_64b/config-4.14 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/layerscape/armv8_64b/config-4.14 b/target/linux/layerscape/armv8_64b/config-4.14
index c1bd718366..ef1bbadd2b 100644
--- a/target/linux/layerscape/armv8_64b/config-4.14
+++ b/target/linux/layerscape/armv8_64b/config-4.14
@@ -140,7 +140,7 @@ CONFIG_CMA_ALIGNMENT=8
 CONFIG_CMA_AREAS=7
 # CONFIG_CMA_DEBUG is not set
 # CONFIG_CMA_DEBUGFS is not set
-CONFIG_CMA_SIZE_MBYTES=16
+CONFIG_CMA_SIZE_MBYTES=32
 # CONFIG_CMA_SIZE_SEL_MAX is not set
 CONFIG_CMA_SIZE_SEL_MBYTES=y
 # CONFIG_CMA_SIZE_SEL_MIN is not set
-- 
2.27.0.rc0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list