ath10k: Incorrect MTU size for SDIO

3 messages, 1 author, 2021-09-15 · open the first message on its own page

ath10k: Incorrect MTU size for SDIO

From: Fabio Estevam <festevam@gmail.com>
Date: 2021-08-19 17:29:41

Hi,

On a i.MX7-based board with QCA9377 chip, I received the following
report from a user running kernel 5.10.48:

"Doing scp or just pipe through files with >10 lines I get stalls and
error logs. The ath10k_sdio errors look like this:
[  196.822363] ath10k_sdio mmc2:0001:1: failed to transmit packet, dropping: -12
[  196.830109] ath10k_sdio mmc2:0001:1: failed to submit frame: -12
[  196.836279] ath10k_sdio mmc2:0001:1: failed to push frame: -12
[  196.925452] ath10k_sdio mmc2:0001:1: failed to transmit packet, dropping: -12
[  196.933090] ath10k_sdio mmc2:0001:1: failed to submit frame: -12
[  196.939334] ath10k_sdio mmc2:0001:1: failed to push frame: -12

I am able to reliably reproduce the issue by sending a lot of data
from the i.MX7 board to a host connected via the AP:
printf '=%.0s' {1..24000} | nc 192.168.0.2 1234

I was able to narrow the issue down to the mtu. If I set the mtu for
the wlan0 device to 1486 instead of 1500, the issue does not happen.

The size of frames that I see on Wireshark is exactly 1500 after
setting it to 1486."

Is this a known issue?

Alagu/Erik,

Have you ever observed such an issue?

Thanks

Re: ath10k: Incorrect MTU size for SDIO

From: Fabio Estevam <festevam@gmail.com>
Date: 2021-09-15 00:04:30

On Thu, Aug 19, 2021 at 2:29 PM Fabio Estevam [off-list ref] wrote:
Hi,

On a i.MX7-based board with QCA9377 chip, I received the following
report from a user running kernel 5.10.48:

"Doing scp or just pipe through files with >10 lines I get stalls and
error logs. The ath10k_sdio errors look like this:
[  196.822363] ath10k_sdio mmc2:0001:1: failed to transmit packet, dropping: -12
[  196.830109] ath10k_sdio mmc2:0001:1: failed to submit frame: -12
[  196.836279] ath10k_sdio mmc2:0001:1: failed to push frame: -12
[  196.925452] ath10k_sdio mmc2:0001:1: failed to transmit packet, dropping: -12
[  196.933090] ath10k_sdio mmc2:0001:1: failed to submit frame: -12
[  196.939334] ath10k_sdio mmc2:0001:1: failed to push frame: -12

I am able to reliably reproduce the issue by sending a lot of data
from the i.MX7 board to a host connected via the AP:
printf '=%.0s' {1..24000} | nc 192.168.0.2 1234

I was able to narrow the issue down to the mtu. If I set the mtu for
the wlan0 device to 1486 instead of 1500, the issue does not happen.

The size of frames that I see on Wireshark is exactly 1500 after
setting it to 1486."
I am able to reproduce this locally on an imx6dl-pico-pi board with a
QCA9377 SDIO chip
running kernel 5.15-rc1.

[   10.383463] ath10k_sdio mmc1:0001:1: qca9377 hw1.1 sdio target
0x05020001 chip_id 0x00000000 sub 0000:0000
[   10.393717] ath10k_sdio mmc1:0001:1: kconfig debug 0 debugfs 0
tracing 0 dfs 0 testmode 0
[   10.405764] ath10k_sdio mmc1:0001:1: firmware ver
WLAN.TF.1.1.1-00061-QCATFSWPZ-1 api 5 features ignore-otp crc32
7746e551
[   10.640195] 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
[   10.664515] ath10k_sdio mmc1:0001:1: board_file api 1 bmi_id N/A
crc32 544289f7

The QCA9377 operates in STA mode.

Simply doing "ssh user@192.168.0.1" causes:

[   55.824159] ath10k_sdio mmc1:0001:1: failed to transmit packet, dropping: -12
[   55.832169] ath10k_sdio mmc1:0001:1: failed to submit frame: -12
[   55.838529] ath10k_sdio mmc1:0001:1: failed to push frame: -12
[   55.905863] ath10k_sdio mmc1:0001:1: failed to transmit packet, dropping: -12
[   55.913650] ath10k_sdio mmc1:0001:1: failed to submit frame: -12
[   55.919887] ath10k_sdio mmc1:0001:1: failed to push frame: -12

and it is not possible to connect via ssh to the other machine.

Changing the MTU size to 1486:

# ifconfig wlan0 mtu 1486

and trying the ssh connection again, it is possible to connect to the
other machine.

Any logs I should capture to help to analyze this problem?

Thanks

Re: ath10k: Incorrect MTU size for SDIO

From: Fabio Estevam <festevam@gmail.com>
Date: 2021-09-15 00:57:15

On Tue, Sep 14, 2021 at 9:04 PM Fabio Estevam [off-list ref] wrote:
On Thu, Aug 19, 2021 at 2:29 PM Fabio Estevam [off-list ref] wrote:
quoted
Hi,

On a i.MX7-based board with QCA9377 chip, I received the following
report from a user running kernel 5.10.48:

"Doing scp or just pipe through files with >10 lines I get stalls and
error logs. The ath10k_sdio errors look like this:
[  196.822363] ath10k_sdio mmc2:0001:1: failed to transmit packet, dropping: -12
[  196.830109] ath10k_sdio mmc2:0001:1: failed to submit frame: -12
[  196.836279] ath10k_sdio mmc2:0001:1: failed to push frame: -12
[  196.925452] ath10k_sdio mmc2:0001:1: failed to transmit packet, dropping: -12
[  196.933090] ath10k_sdio mmc2:0001:1: failed to submit frame: -12
[  196.939334] ath10k_sdio mmc2:0001:1: failed to push frame: -12

I am able to reliably reproduce the issue by sending a lot of data
from the i.MX7 board to a host connected via the AP:
printf '=%.0s' {1..24000} | nc 192.168.0.2 1234

I was able to narrow the issue down to the mtu. If I set the mtu for
the wlan0 device to 1486 instead of 1500, the issue does not happen.

The size of frames that I see on Wireshark is exactly 1500 after
setting it to 1486."
I am able to reproduce this locally on an imx6dl-pico-pi board with a
QCA9377 SDIO chip
running kernel 5.15-rc1.

[   10.383463] ath10k_sdio mmc1:0001:1: qca9377 hw1.1 sdio target
0x05020001 chip_id 0x00000000 sub 0000:0000
[   10.393717] ath10k_sdio mmc1:0001:1: kconfig debug 0 debugfs 0
tracing 0 dfs 0 testmode 0
[   10.405764] ath10k_sdio mmc1:0001:1: firmware ver
WLAN.TF.1.1.1-00061-QCATFSWPZ-1 api 5 features ignore-otp crc32
7746e551
[   10.640195] 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
[   10.664515] ath10k_sdio mmc1:0001:1: board_file api 1 bmi_id N/A
crc32 544289f7

The QCA9377 operates in STA mode.

Simply doing "ssh user@192.168.0.1" causes:

[   55.824159] ath10k_sdio mmc1:0001:1: failed to transmit packet, dropping: -12
[   55.832169] ath10k_sdio mmc1:0001:1: failed to submit frame: -12
[   55.838529] ath10k_sdio mmc1:0001:1: failed to push frame: -12
[   55.905863] ath10k_sdio mmc1:0001:1: failed to transmit packet, dropping: -12
[   55.913650] ath10k_sdio mmc1:0001:1: failed to submit frame: -12
[   55.919887] ath10k_sdio mmc1:0001:1: failed to push frame: -12

and it is not possible to connect via ssh to the other machine.

Changing the MTU size to 1486:

# ifconfig wlan0 mtu 1486

and trying the ssh connection again, it is possible to connect to the
other machine.

Any logs I should capture to help to analyze this problem?
If I clear HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE, I don't see the error:
diff --git a/drivers/net/wireless/ath/ath10k/core.c
b/drivers/net/wireless/ath/ath10k/core.c
index 2f9be182fbfb..728a18b3b462 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -730,11 +730,7 @@ static int ath10k_init_sdio(struct ath10k *ar,
enum ath10k_firmware_mode mode)
  return ret;

  param |= HI_ACS_FLAGS_SDIO_REDUCE_TX_COMPL_SET;
-
- if (mode == ATH10K_FIRMWARE_MODE_NORMAL)
- param |= HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE;
- else
- param &= ~HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE;
+ param &= ~HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE;

  if (mode == ATH10K_FIRMWARE_MODE_UTF)
  param &= ~HI_ACS_FLAGS_SDIO_SWAP_MAILBOX_SET;

Any comments, please?

Thanks
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help