Issue with ATH10K driver on sunxi platform using sdio
Hi,
I am trying to use an QCA9377-3 based module on a custom board based around an Allwinner V3s SoC.
The modules are loaded correctly, the module is detected and scanning for networks works. However when trying to connect to a network, I get the following message about an unaligned scatterlist.
----------------------------------------------------------------------------------
[ 52.006548] mmc1: new high speed SDIO card at address 0001 [ 52.084936] ath10k_sdio mmc1:0001:1: qca9377 hw1.1 sdio target 0x05020001 chip_id 0x00000000 sub 0000:0000 [ 52.084996] ath10k_sdio mmc1:0001:1: kconfig debug 0 debugfs 0 tracing 0 dfs 0 testmode 0 [ 52.088478] ath10k_sdio mmc1:0001:1: firmware ver WLAN.TF.1.1.1-00061-QCATFSWPZ-1 api 5 features ignore-otp crc32 7746e551 [ 52.258959] ath10k_sdio mmc1:0001:1: failed to fetch board data for bus=sdio,vendor=0271,device=0701,subsystem-vendor=0000,subsystem-device=0000 from ath10k/QCA9377/hw1.0/board-2.bin [ 52.307328] ath10k_sdio mmc1:0001:1: board_file api 1 bmi_id N/A crc32 544289f7 [ 56.217772] ath10k_sdio mmc1:0001:1: htt-ver 3.32 wmi-op 4 htt-op 3 cal otp max-sta 32 raw 0 hwcrypto 1 [ 56.217995] sunxi-mmc 1c10000.mmc: unaligned scatterlist: os 4c0 length 11 [ 56.218020] sunxi-mmc 1c10000.mmc: map DMA failed [ 56.218035] ath10k_sdio mmc1:0001:1: failed to write to address 0x12ff5: -22 [ 56.218051] ath10k_sdio mmc1:0001:1: failed to write skb to 0x12ff5 asynchronously: -22 [ 56.270321] mmc1: queuing unknown CIS tuple 0x01 [d9 01 ff] (3 bytes) [ 56.277541] mmc1: queuing unknown CIS tuple 0x1a [01 01 00 02 07] (5 bytes) [ 56.280698] mmc1: queuing unknown CIS tuple 0x1b [c1 41 30 30 ff ff 32 00] (8 bytes) [ 56.281344] mmc1: queuing unknown CIS tuple 0x14 [] (0 bytes) [ 56.282522] ath: EEPROM regdomain: 0x0 [ 56.282542] ath: EEPROM indicates default country code should be used [ 56.282550] ath: doing EEPROM country->regdmn map search [ 56.282559] ath: country maps to regdmn code: 0x3a [ 56.282568] ath: Country alpha2 being used: US [ 56.282576] ath: Regpair used: 0x3a [ 60.308005] sunxi-mmc 1c10000.mmc: unaligned scatterlist: os b80 length 11 [ 60.308061] sunxi-mmc 1c10000.mmc: map DMA failed [ 60.308078] ath10k_sdio mmc1:0001:1: failed to write to address 0x12ff5: -22 [ 60.308096] ath10k_sdio mmc1:0001:1: failed to write skb to 0x12ff5 asynchronously: -22
----------------------------------------------------------------------------------
Has anyone maybe got an idea as to how this could be fixed?
The kernel running on the board is Linux Mainline 6.8.2
Best regards,
Lukas Schmid
Hi Lukas,
Quoted 4 lines · Lukas Schmid
The modules are loaded correctly, the module is detected and scanning for networks works. However when trying to connect to a network, I get the following message about an unaligned scatterlist.
----------------------------------------------------------------------------------
[...]
Quoted 2 lines
[ 56.217995] sunxi-mmc 1c10000.mmc: unaligned scatterlist: os 4c0 length 11 [ 56.218020] sunxi-mmc 1c10000.mmc: map DMA failed
[...]
Quoted 4 lines
----------------------------------------------------------------------------------
Has anyone maybe got an idea as to how this could be fixed?
sunxi-mmc could implement a bounce buffer to gracefully handle these unaligned DMA operations. This is what other architectures do.
Here's an example from STM32: https://patches.linaro.org/project/linux-mmc/patch/[email protected]/
Regards,
Felix