* [PATCH] mt76: mt7921: add mt7921_dma_cleanup in mt7921_unregister_device
@ 2021-04-13 8:40 Lorenzo Bianconi
2021-04-13 9:26 ` Felix Fietkau
0 siblings, 1 reply; 2+ messages in thread
From: Lorenzo Bianconi @ 2021-04-13 8:40 UTC (permalink / raw)
To: nbd; +Cc: linux-wireless, lorenzo.bianconi, sean.wang
In order to avoid memory leaks, clean the dma engine unloading the
module
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/mt7921/init.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/init.c b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
index a20a3233fdc6..a1ed3e71b299 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
@@ -290,6 +290,7 @@ void mt7921_unregister_device(struct mt7921_dev *dev)
mt76_unregister_device(&dev->mt76);
mt7921_mcu_exit(dev);
mt7921_tx_token_put(dev);
+ mt7921_dma_cleanup(dev);
tasklet_disable(&dev->irq_tasklet);
mt76_free_device(&dev->mt76);
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mt76: mt7921: add mt7921_dma_cleanup in mt7921_unregister_device
2021-04-13 8:40 [PATCH] mt76: mt7921: add mt7921_dma_cleanup in mt7921_unregister_device Lorenzo Bianconi
@ 2021-04-13 9:26 ` Felix Fietkau
0 siblings, 0 replies; 2+ messages in thread
From: Felix Fietkau @ 2021-04-13 9:26 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: linux-wireless, lorenzo.bianconi, sean.wang
On 2021-04-13 10:40, Lorenzo Bianconi wrote:
> In order to avoid memory leaks, clean the dma engine unloading the
> module
>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Now it is accessing DMA registers after mt7921_mcu_exit has already
called mt7921_wfsys_reset.
Please move the mt7921_mcu_exit call further down.
- Felix
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-13 9:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-13 8:40 [PATCH] mt76: mt7921: add mt7921_dma_cleanup in mt7921_unregister_device Lorenzo Bianconi
2021-04-13 9:26 ` Felix Fietkau
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.