linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: kvalo@codeaurora.org, linux-wireless@vger.kernel.org,
	wcn36xx@lists.infradead.org
Cc: loic.poulain@linaro.org, benl@squareup.com,
	daniel.thompson@linaro.org, johannes@sipsolutions.net,
	bryan.odonoghue@linaro.org
Subject: [PATCH v2 5/5] wcn36xx: Put DXE block into reset before freeing memory
Date: Tue, 19 Oct 2021 00:17:22 +0100	[thread overview]
Message-ID: <20211018231722.873525-6-bryan.odonoghue@linaro.org> (raw)
In-Reply-To: <20211018231722.873525-1-bryan.odonoghue@linaro.org>

When deiniting the DXE hardware we should reset the block to ensure there
is no spurious DMA write transaction from the downstream WCNSS to upstream
MSM at a skbuff address we will have released.

Fixes: 8e84c2582169 ("wcn36xx: mac80211 driver for Qualcomm WCN3660/WCN3680 hardware")
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 drivers/net/wireless/ath/wcn36xx/dxe.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/ath/wcn36xx/dxe.c b/drivers/net/wireless/ath/wcn36xx/dxe.c
index d4f5746d9b10a..cf85b0cd11be4 100644
--- a/drivers/net/wireless/ath/wcn36xx/dxe.c
+++ b/drivers/net/wireless/ath/wcn36xx/dxe.c
@@ -1089,6 +1089,9 @@ void wcn36xx_dxe_deinit(struct wcn36xx *wcn)
 		wcn->tx_ack_skb = NULL;
 	}
 
+	/* Put the DXE block into reset before freeing memory */
+	wcn36xx_dxe_reset(wcn);
+
 	wcn36xx_dxe_ch_free_skbs(wcn, &wcn->dxe_rx_l_ch);
 	wcn36xx_dxe_ch_free_skbs(wcn, &wcn->dxe_rx_h_ch);
 
-- 
2.33.0


  parent reply	other threads:[~2021-10-18 23:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18 23:17 [PATCH v2 0/5] wcn36xx: Fix DMA buffer allocation and free logic Bryan O'Donoghue
2021-10-18 23:17 ` [PATCH v2 1/5] wcn36xx: Fix dxe lock layering violation Bryan O'Donoghue
2021-10-25 13:31   ` Kalle Valo
2021-10-18 23:17 ` [PATCH v2 2/5] wcn36xx: Fix DMA channel enable/disable cycle Bryan O'Donoghue
2021-10-18 23:17 ` [PATCH v2 3/5] wcn36xx: Release DMA channel descriptor allocations Bryan O'Donoghue
2021-10-18 23:17 ` [PATCH v2 4/5] wcn36xx: Functionally decompose DXE reset Bryan O'Donoghue
2021-10-18 23:17 ` Bryan O'Donoghue [this message]
2021-10-19 15:59 ` [PATCH v2 0/5] wcn36xx: Fix DMA buffer allocation and free logic Jeff Johnson

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=20211018231722.873525-6-bryan.odonoghue@linaro.org \
    --to=bryan.odonoghue@linaro.org \
    --cc=benl@squareup.com \
    --cc=daniel.thompson@linaro.org \
    --cc=johannes@sipsolutions.net \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=loic.poulain@linaro.org \
    --cc=wcn36xx@lists.infradead.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 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).