linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ath10k: Poor performance with kernel 5.3 fixed
@ 2019-09-25  9:08 Federico Cuello
  2019-09-25  9:08 ` [PATCH] ath10k: Fix ath10k_init_uart when uart_print is false Federico Cuello
  2019-09-25 16:24 ` ath10k: Poor performance with kernel 5.3 fixed Brian Norris
  0 siblings, 2 replies; 7+ messages in thread
From: Federico Cuello @ 2019-09-25  9:08 UTC (permalink / raw)
  To: linux-wireless; +Cc: wgong

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.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] ath10k: Fix ath10k_init_uart when uart_print is false
  2019-09-25  9:08 ath10k: Poor performance with kernel 5.3 fixed Federico Cuello
@ 2019-09-25  9:08 ` Federico Cuello
  2019-09-25 12:02   ` Kalle Valo
  2019-09-25 16:24 ` ath10k: Poor performance with kernel 5.3 fixed Brian Norris
  1 sibling, 1 reply; 7+ messages in thread
From: Federico Cuello @ 2019-09-25  9:08 UTC (permalink / raw)
  To: linux-wireless; +Cc: wgong, 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.

Signed-off-by: Federico Cuello <fedux@fedux.com.ar>
---
 drivers/net/wireless/ath/ath10k/core.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index dc45d16e8d21..dd1311910d6a 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -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;
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] ath10k: Fix ath10k_init_uart when uart_print is false
  2019-09-25  9:08 ` [PATCH] ath10k: Fix ath10k_init_uart when uart_print is false Federico Cuello
@ 2019-09-25 12:02   ` Kalle Valo
  0 siblings, 0 replies; 7+ messages in thread
From: Kalle Valo @ 2019-09-25 12:02 UTC (permalink / raw)
  To: Federico Cuello; +Cc: linux-wireless, wgong, ath10k

+ ath10k

Federico Cuello <fedux@fedux.com.ar> writes:

> 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.
>
> Signed-off-by: Federico Cuello <fedux@fedux.com.ar>

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.

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ath10k: Poor performance with kernel 5.3 fixed
  2019-09-25  9:08 ath10k: Poor performance with kernel 5.3 fixed Federico Cuello
  2019-09-25  9:08 ` [PATCH] ath10k: Fix ath10k_init_uart when uart_print is false Federico Cuello
@ 2019-09-25 16:24 ` Brian Norris
  2019-09-26  7:56   ` Federico Cuello
  1 sibling, 1 reply; 7+ messages in thread
From: Brian Norris @ 2019-09-25 16:24 UTC (permalink / raw)
  To: Federico Cuello; +Cc: linux-wireless, Wen Gong

On Wed, Sep 25, 2019 at 2:16 AM Federico Cuello <fedux@fedux.com.ar> wrote:
> 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

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

-ENOPATCH

Brian

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ath10k: Poor performance with kernel 5.3 fixed
  2019-09-25 16:24 ` ath10k: Poor performance with kernel 5.3 fixed Brian Norris
@ 2019-09-26  7:56   ` Federico Cuello
  2019-09-26 12:54     ` Kalle Valo
  0 siblings, 1 reply; 7+ messages in thread
From: Federico Cuello @ 2019-09-26  7:56 UTC (permalink / raw)
  To: Brian Norris; +Cc: linux-wireless, Wen Gong

On 2019-09-25 18:24, Brian Norris wrote:
> On Wed, Sep 25, 2019 at 2:16 AM Federico Cuello <fedux@fedux.com.ar> 
> wrote:
>> 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


> 
>> 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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ath10k: Poor performance with kernel 5.3 fixed
  2019-09-26  7:56   ` Federico Cuello
@ 2019-09-26 12:54     ` Kalle Valo
  2019-09-27  9:25       ` Federico Cuello
  0 siblings, 1 reply; 7+ messages in thread
From: Kalle Valo @ 2019-09-26 12:54 UTC (permalink / raw)
  To: Federico Cuello; +Cc: Brian Norris, linux-wireless, Wen Gong, Miaoqing Pan

+ Miaoqing

Federico Cuello <fedux@fedux.com.ar> writes:

> On 2019-09-25 18:24, Brian Norris wrote:
>> On Wed, Sep 25, 2019 at 2:16 AM Federico Cuello <fedux@fedux.com.ar>
>> wrote:
>>> 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
>
>
>>
>>> 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.

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.

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ath10k: Poor performance with kernel 5.3 fixed
  2019-09-26 12:54     ` Kalle Valo
@ 2019-09-27  9:25       ` Federico Cuello
  0 siblings, 0 replies; 7+ messages in thread
From: Federico Cuello @ 2019-09-27  9:25 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Brian Norris, linux-wireless, Wen Gong, Miaoqing Pan

On 2019-09-26 14:54, Kalle Valo wrote:
> + Miaoqing
> 
> Federico Cuello <fedux@fedux.com.ar> writes:
> 
>> On 2019-09-25 18:24, Brian Norris wrote:
>>> On Wed, Sep 25, 2019 at 2:16 AM Federico Cuello <fedux@fedux.com.ar>
>>> wrote:
>>>> 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
>> 
>> 
>>> 
>>>> 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.
> 
> 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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-09-27  9:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-25  9:08 ath10k: Poor performance with kernel 5.3 fixed Federico Cuello
2019-09-25  9:08 ` [PATCH] ath10k: Fix ath10k_init_uart when uart_print is false Federico Cuello
2019-09-25 12:02   ` Kalle Valo
2019-09-25 16:24 ` ath10k: Poor performance with kernel 5.3 fixed Brian Norris
2019-09-26  7:56   ` Federico Cuello
2019-09-26 12:54     ` Kalle Valo
2019-09-27  9:25       ` Federico Cuello

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).