]> www.infradead.org Git - users/dwmw2/linux.git/commit
mmc: mtk-sd: Re-store SDIO IRQs mask at system resume
authorUlf Hansson <ulf.hansson@linaro.org>
Wed, 11 Sep 2019 12:09:20 +0000 (14:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Oct 2019 11:13:57 +0000 (13:13 +0200)
commit9eff1ebe2c90fce4030d1deaef6f1bd433d99eaa
tree6cc6eca01b8404e211c7a5bc8a8b63fec367d211
parentc5f89ff633d2aa2b20072969dcfdf4af960d1eba
mmc: mtk-sd: Re-store SDIO IRQs mask at system resume

[ Upstream commit 1c81d69d4c98aab56c5a7d5a810f84aefdb37e9b ]

In cases when SDIO IRQs have been enabled, runtime suspend is prevented by
the driver. However, this still means msdc_runtime_suspend|resume() gets
called during system suspend/resume, via pm_runtime_force_suspend|resume().

This means during system suspend/resume, the register context of the mtk-sd
device most likely loses its register context, even in cases when SDIO IRQs
have been enabled.

To re-enable the SDIO IRQs during system resume, the mtk-sd driver
currently relies on the mmc core to re-enable the SDIO IRQs when it resumes
the SDIO card, but this isn't the recommended solution. Instead, it's
better to deal with this locally in the mtk-sd driver, so let's do that.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mmc/host/mtk-sd.c