mt76: mt7921: fix possible resume failure [update]

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: ffa1bf97425b ("mt76: mt7921: introduce PM support")
Co-developed-by: YN Chen <[email protected]>
Signed-off-by: YN Chen <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Sean Wang
2021-12-16 19:25:16 +01:00
committed by Felix Fietkau
parent 928c4550e4
commit 8d6c68a7d0
+2
View File
@@ -353,6 +353,8 @@ static int mt7921_pci_resume(struct pci_dev *pdev)
mt76_connac_mcu_set_deep_sleep(&dev->mt76, false);
err = mt76_connac_mcu_set_hif_suspend(mdev, false);
if (err)
return err;
pm->suspended = false;