wifi: wilc1000: Do not operate uninitialized hardware during suspend/resume
BugLink: https://bugs.launchpad.net/bugs/2097301 [ Upstream commit b0dc7018477e8fbb7e40c908c29cf663d06b17a7 ] In case the hardware is not initialized, do not operate it during suspend/resume cycle, the hardware is already off so there is no reason to access it. In fact, wilc_sdio_enable_interrupt() in the resume callback does interfere with the same call when initializing the hardware after resume and makes such initialization after resume fail. Fix this by not operating uninitialized hardware during suspend/resume. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20240821183639.163187-1-marex@denx.de Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Manuel Diewald <manuel.diewald@canonical.com> Signed-off-by: Koichiro Den <koichiro.den@canonical.com>
This commit is contained in:
committed by
Mehmet Basaran
parent
9995f64778
commit
d485d671aa
@@ -232,6 +232,10 @@ static int wilc_sdio_suspend(struct device *dev)
|
||||
int ret;
|
||||
|
||||
dev_info(dev, "sdio suspend\n");
|
||||
|
||||
if (!wilc->initialized)
|
||||
return 0;
|
||||
|
||||
chip_wakeup(wilc);
|
||||
|
||||
if (!IS_ERR(wilc->rtc_clk))
|
||||
@@ -948,6 +952,10 @@ static int wilc_sdio_resume(struct device *dev)
|
||||
struct wilc *wilc = sdio_get_drvdata(func);
|
||||
|
||||
dev_info(dev, "sdio resume\n");
|
||||
|
||||
if (!wilc->initialized)
|
||||
return 0;
|
||||
|
||||
sdio_release_host(func);
|
||||
chip_wakeup(wilc);
|
||||
wilc_sdio_init(wilc, true);
|
||||
|
||||
Reference in New Issue
Block a user