linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] ath9k: fix intr_txqs setting
@ 2021-11-16 22:07 Peter Seiderer
  2021-11-17  8:47 ` Kalle Valo
  2021-11-19  8:07 ` Kalle Valo
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Seiderer @ 2021-11-16 22:07 UTC (permalink / raw)
  To: linux-wireless
  Cc: ath9k-devel, David S . Miller, Jakub Kicinski, linux-kernel, netdev

The struct ath_hw member intr_txqs is never reset/assigned outside
of ath9k_hw_init_queues() and with the used bitwise-or in the interrupt
handling ar9002_hw_get_isr() accumulates all ever set interrupt flags.

Fix this by using a pure assign instead of bitwise-or for the
first line (note: intr_txqs is only evaluated in case ATH9K_INT_TX bit
is set).

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Note:
  - the ath5k_hw member ah_txq_isr_txok_all in ath5k_hw_get_isr()
    (see drivers/net/wireless/ath/ath5k/dma.c) sufferes from the
    same problem and can be fixed by an assignment to zero before
    furhter usage (but I lack suitable hardware for testing)
---
 drivers/net/wireless/ath/ath9k/ar9002_mac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9002_mac.c b/drivers/net/wireless/ath/ath9k/ar9002_mac.c
index ce9a0a53771e..fba5a847c3bb 100644
--- a/drivers/net/wireless/ath/ath9k/ar9002_mac.c
+++ b/drivers/net/wireless/ath/ath9k/ar9002_mac.c
@@ -120,7 +120,7 @@ static bool ar9002_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked,
 					 AR_ISR_TXEOL);
 			}
 
-			ah->intr_txqs |= MS(s0_s, AR_ISR_S0_QCU_TXOK);
+			ah->intr_txqs = MS(s0_s, AR_ISR_S0_QCU_TXOK);
 			ah->intr_txqs |= MS(s0_s, AR_ISR_S0_QCU_TXDESC);
 			ah->intr_txqs |= MS(s1_s, AR_ISR_S1_QCU_TXERR);
 			ah->intr_txqs |= MS(s1_s, AR_ISR_S1_QCU_TXEOL);
-- 
2.33.1


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

* Re: [PATCH v1] ath9k: fix intr_txqs setting
  2021-11-16 22:07 [PATCH v1] ath9k: fix intr_txqs setting Peter Seiderer
@ 2021-11-17  8:47 ` Kalle Valo
  2021-11-17 19:07   ` Peter Seiderer
  2021-11-19  8:07 ` Kalle Valo
  1 sibling, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2021-11-17  8:47 UTC (permalink / raw)
  To: Peter Seiderer
  Cc: linux-wireless, ath9k-devel, David S . Miller, Jakub Kicinski,
	linux-kernel, netdev

Peter Seiderer <ps.report@gmx.net> wrote:

> The struct ath_hw member intr_txqs is never reset/assigned outside
> of ath9k_hw_init_queues() and with the used bitwise-or in the interrupt
> handling ar9002_hw_get_isr() accumulates all ever set interrupt flags.
> 
> Fix this by using a pure assign instead of bitwise-or for the
> first line (note: intr_txqs is only evaluated in case ATH9K_INT_TX bit
> is set).
> 
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

How did you test this? I'm getting way too many ath9k patches which have not
been tested on a real device.

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20211116220720.30145-1-ps.report@gmx.net/

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


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

* Re: [PATCH v1] ath9k: fix intr_txqs setting
  2021-11-17  8:47 ` Kalle Valo
@ 2021-11-17 19:07   ` Peter Seiderer
  2021-11-18  4:18     ` Kalle Valo
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Seiderer @ 2021-11-17 19:07 UTC (permalink / raw)
  To: Kalle Valo
  Cc: linux-wireless, ath9k-devel, David S . Miller, Jakub Kicinski,
	linux-kernel, netdev

Hello Kalle,

On Wed, 17 Nov 2021 08:47:40 +0000 (UTC), Kalle Valo <kvalo@codeaurora.org> wrote:

> Peter Seiderer <ps.report@gmx.net> wrote:
>
> > The struct ath_hw member intr_txqs is never reset/assigned outside
> > of ath9k_hw_init_queues() and with the used bitwise-or in the interrupt
> > handling ar9002_hw_get_isr() accumulates all ever set interrupt flags.
> >
> > Fix this by using a pure assign instead of bitwise-or for the
> > first line (note: intr_txqs is only evaluated in case ATH9K_INT_TX bit
> > is set).
> >
> > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
>
> How did you test this? I'm getting way too many ath9k patches which have not
> been tested on a real device.
>

Did test it with an Compex WLE200NX 7A card (AR9280) running IBSS mode
against one older (madwifi) and one newer (ath10k) Atheros card using
ping and iperf traffic (investigating some performance degradation
compared to two older cards...., but getting better with the latest
rc80211_minstrel/rc80211_minstrel_ht changes), checked via printk
debugging intr_txqs is not cleared when entering ar9002_hw_get_isr(),
and checked wifi is still working after the change...., can provide more
info and/or debug traces if needed...

Regards,
Peter

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

* Re: [PATCH v1] ath9k: fix intr_txqs setting
  2021-11-17 19:07   ` Peter Seiderer
@ 2021-11-18  4:18     ` Kalle Valo
  0 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2021-11-18  4:18 UTC (permalink / raw)
  To: Peter Seiderer
  Cc: linux-wireless, ath9k-devel, David S . Miller, Jakub Kicinski,
	linux-kernel, netdev

Peter Seiderer <ps.report@gmx.net> writes:

> On Wed, 17 Nov 2021 08:47:40 +0000 (UTC), Kalle Valo <kvalo@codeaurora.org> wrote:
>
>> Peter Seiderer <ps.report@gmx.net> wrote:
>>
>> > The struct ath_hw member intr_txqs is never reset/assigned outside
>> > of ath9k_hw_init_queues() and with the used bitwise-or in the interrupt
>> > handling ar9002_hw_get_isr() accumulates all ever set interrupt flags.
>> >
>> > Fix this by using a pure assign instead of bitwise-or for the
>> > first line (note: intr_txqs is only evaluated in case ATH9K_INT_TX bit
>> > is set).
>> >
>> > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
>> > Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
>>
>> How did you test this? I'm getting way too many ath9k patches which have not
>> been tested on a real device.
>>
>
> Did test it with an Compex WLE200NX 7A card (AR9280) running IBSS mode
> against one older (madwifi) and one newer (ath10k) Atheros card using
> ping and iperf traffic (investigating some performance degradation
> compared to two older cards...., but getting better with the latest
> rc80211_minstrel/rc80211_minstrel_ht changes), checked via printk
> debugging intr_txqs is not cleared when entering ar9002_hw_get_isr(),
> and checked wifi is still working after the change...., can provide more
> info and/or debug traces if needed...

Perfect, thanks!

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

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

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

* Re: [PATCH v1] ath9k: fix intr_txqs setting
  2021-11-16 22:07 [PATCH v1] ath9k: fix intr_txqs setting Peter Seiderer
  2021-11-17  8:47 ` Kalle Valo
@ 2021-11-19  8:07 ` Kalle Valo
  1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2021-11-19  8:07 UTC (permalink / raw)
  To: Peter Seiderer
  Cc: linux-wireless, ath9k-devel, David S . Miller, Jakub Kicinski,
	linux-kernel, netdev

Peter Seiderer <ps.report@gmx.net> wrote:

> The struct ath_hw member intr_txqs is never reset/assigned outside
> of ath9k_hw_init_queues() and with the used bitwise-or in the interrupt
> handling ar9002_hw_get_isr() accumulates all ever set interrupt flags.
> 
> Fix this by using a pure assign instead of bitwise-or for the
> first line (note: intr_txqs is only evaluated in case ATH9K_INT_TX bit
> is set).
> 
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

5125b9a9c420 ath9k: fix intr_txqs setting

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20211116220720.30145-1-ps.report@gmx.net/

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


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

end of thread, other threads:[~2021-11-19  8:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16 22:07 [PATCH v1] ath9k: fix intr_txqs setting Peter Seiderer
2021-11-17  8:47 ` Kalle Valo
2021-11-17 19:07   ` Peter Seiderer
2021-11-18  4:18     ` Kalle Valo
2021-11-19  8:07 ` Kalle Valo

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