From: Kalle Valo <kvalo@codeaurora.org>
To: Wen Gong <wgong@codeaurora.org>
Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org
Subject: Re: [PATCH] ath10k: cancel rx worker in hif_stop for SDIO
Date: Fri, 06 Nov 2020 09:32:58 +0200 [thread overview]
Message-ID: <87r1p7kkid.fsf@codeaurora.org> (raw)
In-Reply-To: <1604558036-4056-1-git-send-email-wgong@codeaurora.org> (Wen Gong's message of "Thu, 5 Nov 2020 14:33:56 +0800")
Wen Gong <wgong@codeaurora.org> writes:
> The rx worker of SDIO should be cancelled after disable interrupt, and
> release rx sk_buff in queue, otherwise the rx worker maybe still run
> after hif_stop. And it should be cancelled before napi_synchronize in
> hif_stop, because the rx worker of SDIO will call napi_schedule, it
> should have no napi_schedule before napi_synchronize, otherwise it
> lead napi_synchronize wait untill napi_complete.
>
> Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00049
>
> Signed-off-by: Wen Gong <wgong@codeaurora.org>
> ---
> drivers/net/wireless/ath/ath10k/sdio.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c
> index 81ddaafb6721..2c619ef8a87c 100644
> --- a/drivers/net/wireless/ath/ath10k/sdio.c
> +++ b/drivers/net/wireless/ath/ath10k/sdio.c
> @@ -1962,9 +1962,15 @@ static void ath10k_sdio_hif_stop(struct ath10k *ar)
> {
> struct ath10k_sdio_bus_request *req, *tmp_req;
> struct ath10k_sdio *ar_sdio = ath10k_sdio_priv(ar);
> + struct sk_buff *skb;
>
> ath10k_sdio_irq_disable(ar);
>
> + cancel_work_sync(&ar_sdio->async_work_rx);
> +
> + while (skb = skb_dequeue(&ar_sdio->rx_head))
> + dev_kfree_skb_any(skb);
This gives a warning:
drivers/net/wireless/ath/ath10k/sdio.c: In function 'ath10k_sdio_hif_stop':
drivers/net/wireless/ath/ath10k/sdio.c:1971:9: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
Fixed in the pending branch.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@codeaurora.org>
To: Wen Gong <wgong@codeaurora.org>
Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] ath10k: cancel rx worker in hif_stop for SDIO
Date: Fri, 06 Nov 2020 09:32:58 +0200 [thread overview]
Message-ID: <87r1p7kkid.fsf@codeaurora.org> (raw)
In-Reply-To: <1604558036-4056-1-git-send-email-wgong@codeaurora.org> (Wen Gong's message of "Thu, 5 Nov 2020 14:33:56 +0800")
Wen Gong <wgong@codeaurora.org> writes:
> The rx worker of SDIO should be cancelled after disable interrupt, and
> release rx sk_buff in queue, otherwise the rx worker maybe still run
> after hif_stop. And it should be cancelled before napi_synchronize in
> hif_stop, because the rx worker of SDIO will call napi_schedule, it
> should have no napi_schedule before napi_synchronize, otherwise it
> lead napi_synchronize wait untill napi_complete.
>
> Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00049
>
> Signed-off-by: Wen Gong <wgong@codeaurora.org>
> ---
> drivers/net/wireless/ath/ath10k/sdio.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c
> index 81ddaafb6721..2c619ef8a87c 100644
> --- a/drivers/net/wireless/ath/ath10k/sdio.c
> +++ b/drivers/net/wireless/ath/ath10k/sdio.c
> @@ -1962,9 +1962,15 @@ static void ath10k_sdio_hif_stop(struct ath10k *ar)
> {
> struct ath10k_sdio_bus_request *req, *tmp_req;
> struct ath10k_sdio *ar_sdio = ath10k_sdio_priv(ar);
> + struct sk_buff *skb;
>
> ath10k_sdio_irq_disable(ar);
>
> + cancel_work_sync(&ar_sdio->async_work_rx);
> +
> + while (skb = skb_dequeue(&ar_sdio->rx_head))
> + dev_kfree_skb_any(skb);
This gives a warning:
drivers/net/wireless/ath/ath10k/sdio.c: In function 'ath10k_sdio_hif_stop':
drivers/net/wireless/ath/ath10k/sdio.c:1971:9: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
Fixed in the pending branch.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2020-11-06 7:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-05 6:33 [PATCH] ath10k: cancel rx worker in hif_stop for SDIO Wen Gong
2020-11-05 6:33 ` Wen Gong
2020-11-06 7:32 ` Kalle Valo [this message]
2020-11-06 7:32 ` Kalle Valo
2020-11-07 7:58 ` Kalle Valo
2020-11-07 7:58 ` 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=87r1p7kkid.fsf@codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=ath10k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=wgong@codeaurora.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.