]> git.baikalelectronics.ru Git - kernel.git/commit
mt76: mt7921: fix possible resume failure
authorSean Wang <sean.wang@mediatek.com>
Wed, 15 Dec 2021 21:25:35 +0000 (05:25 +0800)
committerFelix Fietkau <nbd@nbd.name>
Sun, 19 Dec 2021 14:24:04 +0000 (15:24 +0100)
commit014d86e0119ce63120e3ee05ba5800a5d7ebc1b4
tree27570412569fce384e071dc9e6a264e7ced2721f
parent1180fab98f31b2221ad97c567573aec24a8d8cdf
mt76: mt7921: fix possible resume failure

Fix the possible resume failure due to mt76_connac_mcu_set_hif_suspend
timeout.

That is because clearing the flag pm->suspended too early opened up a race
window, where mt7921_poll_tx/rx scheduled a ps_work to put the device in
doze mode, that is unexpected for the device is being resumed from the
suspend state and would make the remaining MCU comamnds in resume handler
failed to execute.

Fixes: fc6acbd9a669 ("mt76: mt7921: introduce PM support")
Co-developed-by: YN Chen <YN.Chen@mediatek.com>
Signed-off-by: YN Chen <YN.Chen@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7921/pci.c