From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: Peter Seiderer <ps.report@gmx.net>
Cc: Simon Horman <simon.horman@corigine.com>,
linux-wireless@vger.kernel.org, Kalle Valo <kvalo@kernel.org>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Sujith Manoharan <c_manoha@qca.qualcomm.com>,
"John W . Linville" <linville@tuxdriver.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Gregg Wonderly <greggwonderly@seqtechllc.com>
Subject: Re: [PATCH v1] wifi: ath9k: fix AR9003 mac hardware hang check register offset calculation
Date: Sat, 22 Apr 2023 15:33:43 +0200 [thread overview]
Message-ID: <87zg70kpmw.fsf@toke.dk> (raw)
In-Reply-To: <20230422152234.639fc98e@gmx.net>
Peter Seiderer <ps.report@gmx.net> writes:
> On Sat, 22 Apr 2023 12:18:03 +0200, Toke Høiland-Jørgensen <toke@toke.dk> wrote:
>
>> Simon Horman <simon.horman@corigine.com> writes:
>>
>> > On Thu, Apr 20, 2023 at 10:43:16PM +0200, Peter Seiderer wrote:
>> >> Fix ath9k_hw_verify_hang()/ar9003_hw_detect_mac_hang() register offset
>> >> calculation (do not overflow the shift for the second register/queues
>> >> above five, use the register layout described in the comments above
>> >> ath9k_hw_verify_hang() instead).
>> >>
>> >> Fixes: 222e04830ff0 ("ath9k: Fix MAC HW hang check for AR9003")
>> >>
>> >> Reported-by: Gregg Wonderly <greggwonderly@seqtechllc.com>
>> >> Link: https://lore.kernel.org/linux-wireless/E3A9C354-0CB7-420C-ADEF-F0177FB722F4@seqtechllc.com/
>> >> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
>> >> ---
>> >> Notes:
>> >> - tested with MikroTik R11e-5HnD/Atheros AR9300 Rev:4 (lspci: 168c:0033
>> >> Qualcomm Atheros AR958x 802.11abgn Wireless Network Adapter (rev 01))
>> >> card
>> >> ---
>> >> drivers/net/wireless/ath/ath9k/ar9003_hw.c | 27 ++++++++++++++--------
>> >> 1 file changed, 18 insertions(+), 9 deletions(-)
>> >>
>> >> diff --git a/drivers/net/wireless/ath/ath9k/ar9003_hw.c b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
>> >> index 4f27a9fb1482..0ccf13a35fb4 100644
>> >> --- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c
>> >> +++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
>> >> @@ -1099,17 +1099,22 @@ static bool ath9k_hw_verify_hang(struct ath_hw *ah, unsigned int queue)
>> >> {
>> >> u32 dma_dbg_chain, dma_dbg_complete;
>> >> u8 dcu_chain_state, dcu_complete_state;
>> >> + unsigned int dbg_reg, reg_offset;
>> >> int i;
>> >>
>> >> - for (i = 0; i < NUM_STATUS_READS; i++) {
>> >> - if (queue < 6)
>> >> - dma_dbg_chain = REG_READ(ah, AR_DMADBG_4);
>> >> - else
>> >> - dma_dbg_chain = REG_READ(ah, AR_DMADBG_5);
>> >> + if (queue < 6) {
>> >> + dbg_reg = AR_DMADBG_4;
>> >> + reg_offset = i * 5;
>> >
>> > Hi Peter,
>> >
>> > unless my eyes are deceiving me, i is not initialised here.
>>
>> Nice catch! Hmm, I wonder why my test compile didn't complain about
>> that? Or maybe it did and I overlooked it? Anyway, Kalle, I already
>> delegated this patch to you in patchwork, so please drop it and I'll try
>> to do better on reviewing the next one :)
>
> No warning reported because of Makefile:
>
> 1038 # Enabled with W=2, disabled by default as noisy
> 1039 ifdef CONFIG_CC_IS_GCC
> 1040 KBUILD_CFLAGS += -Wno-maybe-uninitialized
> 1041 endif
Ah, I see! Right then, that explains it :)
-Toke
next prev parent reply other threads:[~2023-04-22 13:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-20 20:43 [PATCH v1] wifi: ath9k: fix AR9003 mac hardware hang check register offset calculation Peter Seiderer
2023-04-20 22:17 ` Toke Høiland-Jørgensen
2023-04-22 8:50 ` Simon Horman
2023-04-22 9:42 ` Peter Seiderer
2023-04-22 10:18 ` Toke Høiland-Jørgensen
2023-04-22 13:22 ` Peter Seiderer
2023-04-22 13:33 ` Toke Høiland-Jørgensen [this message]
2023-04-25 5:50 ` Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zg70kpmw.fsf@toke.dk \
--to=toke@toke.dk \
--cc=c_manoha@qca.qualcomm.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=greggwonderly@seqtechllc.com \
--cc=kuba@kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ps.report@gmx.net \
--cc=simon.horman@corigine.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).