[PATCH] mt76: mt7663s: fix resume failure
sean.wang at mediatek.com
sean.wang at mediatek.com
Thu Aug 13 17:49:47 EDT 2020
From: Sean Wang <sean.wang at mediatek.com>
MT7663s have to rely on MMC_PM_KEEP_POWER in pm_flags for to avoid SDIO
power is being shut off.
To fix sdio access failure like "mt7663s mmc1:0001:1: sdio write failed:
-22" for the first sdio command to access the bus in the resume handler.
Fixes: a66cbdd6573d ("mt76: mt7615: introduce mt7663s support")
Co-developed-by: YN Chen <YN.Chen at mediatek.com>
Signed-off-by: YN Chen <YN.Chen at mediatek.com>
Signed-off-by: Sean Wang <sean.wang at mediatek.com>
---
drivers/net/wireless/mediatek/mt76/mt7615/sdio.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/sdio.c b/drivers/net/wireless/mediatek/mt76/mt7615/sdio.c
index b018a9675c1a..56f65345d048 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/sdio.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/sdio.c
@@ -424,6 +424,8 @@ static int mt7663s_suspend(struct device *dev)
return err;
}
+ sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER);
+
mt76s_stop_txrx(&mdev->mt76);
return mt7615_mcu_set_fw_ctrl(mdev);
--
2.25.1
More information about the Linux-mediatek
mailing list