wifi: mt76: mt7921s: fix potential hung tasks during chip recovery
authorLeon Yen <leon.yen@mediatek.com>
Thu, 7 Mar 2024 09:46:32 +0000 (17:46 +0800)
committerFelix Fietkau <nbd@nbd.name>
Thu, 2 May 2024 10:44:51 +0000 (12:44 +0200)
commitecf0b2b8a37c8464186620bef37812a117ff6366
tree6fb03b203f4e339683e7f38a84fffc1c215189f7
parent4a40fcbfe3ab4846670b59b81c914ed7e7dac2b3
wifi: mt76: mt7921s: fix potential hung tasks during chip recovery

During chip recovery (e.g. chip reset), there is a possible situation that
kernel worker reset_work is holding the lock and waiting for kernel thread
stat_worker to be parked, while stat_worker is waiting for the release of
the same lock.
It causes a deadlock resulting in the dumping of hung tasks messages and
possible rebooting of the device.

This patch prevents the execution of stat_worker during the chip recovery.

Signed-off-by: Leon Yen <leon.yen@mediatek.com>
Signed-off-by: Ming Yen Hsieh <MingYen.Hsieh@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7921/mac.c
drivers/net/wireless/mediatek/mt76/mt7921/pci_mac.c
drivers/net/wireless/mediatek/mt76/mt7921/sdio_mac.c
drivers/net/wireless/mediatek/mt76/sdio.c