Skip to contentSkip to conversation

ath10k: Register shutdown handler

PATCH In review Rakesh Pillai 2 participants 3 messages Jun 26, 2020 – Aug 18, 2020 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath10k: Register shutdown handler

As a part of device shutdown the smmu driver will be stopped and henceforth any IOVA address translation will not be done. The wlan driver, being one of the smmu driver consumer, should stop all the dma related activity as a part of shutdown, and thereby ensuring that no dma activity is done once the smmu driver shuts down.

During the device shutdown, the smmu calls shutdown for all its consumers in order to indicate them to stop all their dma activities.

Register the shutdown handler to stop the wlan driver and avoid any dma operations.

Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1

---
 drivers/net/wireless/ath/ath10k/snoc.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/net/wireless/ath/ath10k/snoc.c +9 -0
index 354d49b..645ed5f 100644
@@ -1772,9 +1772,18 @@ static int ath10k_snoc_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static void ath10k_snoc_shutdown(struct platform_device *pdev)
+{
+	struct ath10k *ar = platform_get_drvdata(pdev);
+
+	ath10k_dbg(ar, ATH10K_DBG_SNOC, "snoc shutdown\n");
+	ath10k_snoc_remove(pdev);
+}
+
 static struct platform_driver ath10k_snoc_driver = {
 	.probe  = ath10k_snoc_probe,
 	.remove = ath10k_snoc_remove,
+	.shutdown =  ath10k_snoc_shutdown,
 	.driver = {
 		.name   = "ath10k_snoc",
 		.of_match_table = ath10k_snoc_dt_match,
Signature · 1 line
2.7.4
#1 lore raw
Quoted 12 lines · Rakesh Pillai

As a part of device shutdown the smmu driver will be stopped and henceforth any IOVA address translation will not be done. The wlan driver, being one of the smmu driver consumer, should stop all the dma related activity as a part of shutdown, and thereby ensuring that no dma activity is done once the smmu driver shuts down.

During the device shutdown, the smmu calls shutdown for all its consumers in order to indicate them to stop all their dma activities.

Quoted 7 lines

Register the shutdown handler to stop the wlan driver and avoid any dma operations.

Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1

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

caf275463d37 ath10k: Register shutdown handler

Signature · 9 lines
https://patchwork.kernel.org/patch/11628291/

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


_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k
#2 lore raw
In reply to Rakesh Pillai
Quoted 12 lines · Rakesh Pillai

As a part of device shutdown the smmu driver will be stopped and henceforth any IOVA address translation will not be done. The wlan driver, being one of the smmu driver consumer, should stop all the dma related activity as a part of shutdown, and thereby ensuring that no dma activity is done once the smmu driver shuts down.

During the device shutdown, the smmu calls shutdown for all its consumers in order to indicate them to stop all their dma activities.

Quoted 7 lines

Register the shutdown handler to stop the wlan driver and avoid any dma operations.

Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1

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

caf275463d37 ath10k: Register shutdown handler

Signature · 3 lines
https://patchwork.kernel.org/patch/11628291/

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