Patch "wifi: mt76: mt7921e: stop chip reset worker in unregister hook" has been added to the 6.3-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    wifi: mt76: mt7921e: stop chip reset worker in unregister hook

to the 6.3-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     wifi-mt76-mt7921e-stop-chip-reset-worker-in-unregist.patch
and it can be found in the queue-6.3 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e9130d12052dbef76fefcc085c595cbbb5f955dd
Author: Quan Zhou <quan.zhou@xxxxxxxxxxxx>
Date:   Thu Apr 13 05:11:14 2023 +0800

    wifi: mt76: mt7921e: stop chip reset worker in unregister hook
    
    [ Upstream commit 3d78c46423c6567ed25ca033e086865b1b4d5ae1 ]
    
    If the chip reset worker is triggered during the remove process, the chip
    DMA may not be properly pushed back to the idle state. This can lead to
    corruption of the DMA flow due to the chip reset. Therefore, it is
    necessary to stop the chip reset before the DMA is finalized.
    
    To avoid resetting the chip after the reset worker is cancelled, use
    __mt7921_mcu_drv_pmctrl() instead of mt7921_mcu_drv_pmctrl(). It is safe to
    ignore the pm mutex because the pm worker and wake worker have already been
    cancelled.
    
    Fixes: 033ae79b3830 ("mt76: mt7921: refactor init.c to be bus independent")
    Co-developed-by: Sean Wang <sean.wang@xxxxxxxxxxxx>
    Signed-off-by: Sean Wang <sean.wang@xxxxxxxxxxxx>
    Co-developed-by: Deren Wu <deren.wu@xxxxxxxxxxxx>
    Signed-off-by: Deren Wu <deren.wu@xxxxxxxxxxxx>
    Co-developed-by: Wang Zhao <wang.zhao@xxxxxxxxxxxx>
    Signed-off-by: Wang Zhao <wang.zhao@xxxxxxxxxxxx>
    Signed-off-by: Quan Zhou <quan.zhou@xxxxxxxxxxxx>
    Signed-off-by: Felix Fietkau <nbd@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/pci.c b/drivers/net/wireless/mediatek/mt76/mt7921/pci.c
index bda92d8359692..aa4ecf008a3c9 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/pci.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/pci.c
@@ -115,9 +115,10 @@ static void mt7921e_unregister_device(struct mt7921_dev *dev)
 		napi_disable(&dev->mt76.napi[i]);
 	cancel_delayed_work_sync(&pm->ps_work);
 	cancel_work_sync(&pm->wake_work);
+	cancel_work_sync(&dev->reset_work);
 
 	mt7921_tx_token_put(dev);
-	mt7921_mcu_drv_pmctrl(dev);
+	__mt7921_mcu_drv_pmctrl(dev);
 	mt7921_dma_cleanup(dev);
 	mt7921_wfsys_reset(dev);
 	skb_queue_purge(&dev->mt76.mcu.res_q);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux