From: Brian Norris <briannorris@chromium.org>
To: Abhishek Kumar <kuabhs@chromium.org>
Cc: kvalo@kernel.org, linux-kernel@vger.kernel.org,
linux-wireless@vger.kernel.org, ath10k@lists.infradead.org,
netdev@vger.kernel.org, Wen Gong <quic_wgong@quicinc.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH] ath10k: skip ath10k_halt during suspend for driver state RESTARTING
Date: Mon, 25 Apr 2022 16:11:44 -0700 [thread overview]
Message-ID: <YmcqsFyCMqcWAEMM@google.com> (raw)
In-Reply-To: <20220425021442.1.I650b809482e1af8d0156ed88b5dc2677a0711d46@changeid>
On Mon, Apr 25, 2022 at 02:15:20AM +0000, Abhishek Kumar wrote:
> --- a/drivers/net/wireless/ath/ath10k/mac.c
> +++ b/drivers/net/wireless/ath/ath10k/mac.c
> @@ -5345,8 +5345,22 @@ static void ath10k_stop(struct ieee80211_hw *hw)
>
> mutex_lock(&ar->conf_mutex);
> if (ar->state != ATH10K_STATE_OFF) {
> - if (!ar->hw_rfkill_on)
> - ath10k_halt(ar);
> + if (!ar->hw_rfkill_on) {
> + /* If the current driver state is RESTARTING but not yet
> + * fully RESTARTED because of incoming suspend event,
> + * then ath11k_halt is already called via
s/ath11k/ath10k/
I know ath11k is the hot new thing, but this is ath10k ;)
> + * ath10k_core_restart and should not be called here.
s/ath10k/ath11k/
> + */
> + if (ar->state != ATH10K_STATE_RESTARTING)
> + ath10k_halt(ar);
> + else
> + /* Suspending here, because when in RESTARTING
> + * state, ath11k_core_stop skips
s/ath10k/ath11k/
> + * ath10k_wait_for_suspend.
> + */
> + ath10k_wait_for_suspend(ar,
> + WMI_PDEV_SUSPEND_AND_DISABLE_INTR);
> + }
> ar->state = ATH10K_STATE_OFF;
> }
> mutex_unlock(&ar->conf_mutex);
Otherwise, I believe this is the right solution to the problem pointed
out in the commit message:
Reviewed-by: Brian Norris <briannorris@chromium.org>
next prev parent reply other threads:[~2022-04-25 23:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-25 2:15 [PATCH] ath10k: skip ath10k_halt during suspend for driver state RESTARTING Abhishek Kumar
2022-04-25 6:14 ` Kalle Valo
2022-04-25 16:26 ` Abhishek Kumar
2022-04-25 23:11 ` Brian Norris [this message]
2022-04-25 23:13 ` Brian Norris
2022-04-26 6:42 ` Abhishek Kumar
2022-04-26 16:18 ` Jeff Johnson
2022-04-26 16:18 ` Jeff Johnson
2022-04-26 16:23 ` Jeff Johnson
2022-04-26 22:26 ` Abhishek Kumar
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=YmcqsFyCMqcWAEMM@google.com \
--to=briannorris@chromium.org \
--cc=ath10k@lists.infradead.org \
--cc=davem@davemloft.net \
--cc=kuabhs@chromium.org \
--cc=kuba@kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=quic_wgong@quicinc.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).