Skip to contentSkip to conversation

ath10k: Poor performance with kernel 5.3 fixed

PATCH In review Federico Cuello 3 participants 7 messages Sep 25, 2019 – Sep 27, 2019 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore
#0 lore raw

When upgrading to 5.3 my AP started to work really slow. I tracked the problem to 4504f0e5b5714d9d26b1a80bf1fc133c95830588 and fixed the issue.

Logs before the patch:

ath10k_pci 0000:04:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043222ff sub 0000:0000
ath10k_pci 0000:04:00.0: kconfig debug 1 debugfs 1 tracing 1 dfs 0 testmode 0
ath10k_pci 0000:04:00.0: firmware ver 10.2.4-1.0-00047 api 5 features no-p2p,raw-mode,mfp,allows-mesh-bcast crc32 35bd9258 ath10k_pci 0000:04:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08
ath10k_pci 0000:04:00.0: UART prints enabled

Notice that UART prints were enabled (when they were not enabled by param)

The attached patch fixes the issue when uart_print is false and uart_pin_workaround also false.

#1 lore raw

PATCH 1/1 ath10k: Fix ath10k_init_uart when uart_print is false

Patch 4504f0e5b5714d9d26b1a80bf1fc133c95830588 introduced a workaround for a firmware UART pin configuration bug, but it caused uart_print to be interpreted as true when it was false and uart_pin_workaround also false.

This patch corrects the exit condition when uart_print is false.

---
 drivers/net/wireless/ath/ath10k/core.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
drivers/net/wireless/ath/ath10k/core.c +8 -6
index dc45d16e8d21..dd1311910d6a 100644
@@ -2118,12 +2118,14 @@ static int ath10k_init_uart(struct ath10k *ar)
 		return ret;
 	}
 
-	if (!uart_print && ar->hw_params.uart_pin_workaround) {
-		ret = ath10k_bmi_write32(ar, hi_dbg_uart_txpin,
-					 ar->hw_params.uart_pin);
-		if (ret) {
-			ath10k_warn(ar, "failed to set UART TX pin: %d", ret);
-			return ret;
+	if (!uart_print) {
+		if (ar->hw_params.uart_pin_workaround) {
+			ret = ath10k_bmi_write32(ar, hi_dbg_uart_txpin,
+						 ar->hw_params.uart_pin);
+			if (ret) {
+				ath10k_warn(ar, "failed to set UART TX pin: %d", ret);
+				return ret;
+			}
 		}
 
 		return 0;
Signature · 1 line
2.23.0
#2 lore raw

Re: [PATCH] ath10k: Fix ath10k_init_uart when uart_print is false

+ ath10k

Quoted 7 lines · Federico Cuello

Patch 4504f0e5b5714d9d26b1a80bf1fc133c95830588 introduced a workaround for a firmware UART pin configuration bug, but it caused uart_print to be interpreted as true when it was false and uart_pin_workaround also false.

This patch corrects the exit condition when uart_print is false.

I have already applied a fix for this:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=ath-next&id=1340cc631bd00431e2f174525c971f119df9efa1

But it's not CCed for stable, hopefully the stable bots still catch it.

Signature · 1 line
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#3 lore raw
In reply to Federico Cuello
Quoted 1 line · Federico Cuello

When upgrading to 5.3 my AP started to work really slow. I tracked the problem to 4504f0e5b5714d9d26b1a80bf1fc133c95830588 and fixed the issue.

For the record, that's:
4504f0e5b571 ath10k: sdio: workaround firmware UART pin configuration bug

Quoted 1 line

The attached patch fixes the issue when uart_print is false and uart_pin_workaround also false.

-ENOPATCH

Brian

#4 lore raw
Quoted 11 lines · Brian Norris
Quoted 1 line · Federico Cuello

When upgrading to 5.3 my AP started to work really slow. I tracked the problem to 4504f0e5b5714d9d26b1a80bf1fc133c95830588 and fixed the issue.

For the record, that's:
4504f0e5b571 ath10k: sdio: workaround firmware UART pin configuration bug

Quoted 1 line

The attached patch fixes the issue when uart_print is false and uart_pin_workaround also false.

-ENOPATCH

Sorry, I sent it in a different email "attached to the thread", but in any case, there was the same fix already applied to kvalo's tree.

Here is the patch and link to already applied fix:

https://patchwork.kernel.org/patch/11160267/

It would be great if we can get this to stable, in my case, my WiFi speed went from 150 Mbit/s to 1-5 Mbit/s without this fix.

#5 lore raw

+ Miaoqing

Quoted 21 lines · Federico Cuello
Quoted 12 lines · Brian Norris
Quoted 3 lines · Federico Cuello

When upgrading to 5.3 my AP started to work really slow. I tracked the problem to 4504f0e5b5714d9d26b1a80bf1fc133c95830588 and fixed the issue.

For the record, that's:
4504f0e5b571 ath10k: sdio: workaround firmware UART pin configuration bug

Quoted 4 lines
Quoted 2 lines

The attached patch fixes the issue when uart_print is false and uart_pin_workaround also false.

-ENOPATCH

Sorry, I sent it in a different email "attached to the thread", but in any case, there was the same fix already applied to kvalo's tree.

Quoted 7 lines

Here is the patch and link to already applied fix:

https://patchwork.kernel.org/patch/11160267/

It would be great if we can get this to stable, in my case, my WiFi speed went from 150 Mbit/s to 1-5 Mbit/s without this fix.

I didn't know that the bug was severe and I applied the patch to ath-next, which means it will go to v5.5 which is bad. (This is why I always ask people to clearly describe the bug in the commit log!)

In theory I could also push it to v5.4 but I just don't want to deal with the possible conflicts coming from duplicate commits.

Signature · 1 line
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#6 lore raw
Quoted 33 lines · Kalle Valo

+ Miaoqing

Quoted 21 lines · Federico Cuello
Quoted 12 lines · Brian Norris
Quoted 3 lines · Federico Cuello

When upgrading to 5.3 my AP started to work really slow. I tracked the problem to 4504f0e5b5714d9d26b1a80bf1fc133c95830588 and fixed the issue.

For the record, that's:
4504f0e5b571 ath10k: sdio: workaround firmware UART pin configuration bug

Quoted 4 lines
Quoted 2 lines

The attached patch fixes the issue when uart_print is false and uart_pin_workaround also false.

-ENOPATCH

Sorry, I sent it in a different email "attached to the thread", but in any case, there was the same fix already applied to kvalo's tree.

Quoted 7 lines

Here is the patch and link to already applied fix:

https://patchwork.kernel.org/patch/11160267/

It would be great if we can get this to stable, in my case, my WiFi speed went from 150 Mbit/s to 1-5 Mbit/s without this fix.

Quoted 6 lines

I didn't know that the bug was severe and I applied the patch to ath-next, which means it will go to v5.5 which is bad. (This is why I always ask people to clearly describe the bug in the commit log!)

In theory I could also push it to v5.4 but I just don't want to deal with the possible conflicts coming from duplicate commits.

I don't know how this is affecting others. Miaoqing? How did this affect you?

Also, would it be possible maybe to revert the patch and re-apply it with stable CCed to avoid any possible conflicts and get it to stable? I can still just patch my kernels if this is not big deal for others.