Thread (3 messages) 3 messages, 2 authors, 2017-09-01
STALE3251d

[PATCH] Correctly fail to suspend when SDIO does not support power on suspend

From: Eric Bentley <hidden>
Date: 2017-08-31 23:44:20
Subsystem: the rest · Maintainer: Linus Torvalds

Return error when failing to set power management capabilities flag.=A0 Thi=
s will cause the suspend to fail but the radio
will continue to operate.=A0 Allowing this to fail without reporting error =
will cause the radio to be non-functional on=A0
resume as it will have lost power.

Signed-off-by: Eric Bentley <redacted>
---
=A0drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 4 +++-
=A01 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/dr=
ivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
index 72139b5..2f7d03f 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
@@ -1264,8 +1264,10 @@ static int brcmf_ops_sdio_suspend(struct device *dev=
)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 else
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 sd=
io_flags |=3D MMC_PM_WAKE_SDIO_IRQ;
=A0=A0=A0=A0=A0=A0=A0=A0 }
-=A0=A0=A0=A0=A0=A0 if (sdio_set_host_pm_flags(sdiodev->func[1], sdio_flags=
))
+=A0=A0=A0=A0=A0=A0 if (sdio_set_host_pm_flags(sdiodev->func[1], sdio_flags=
)) (
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 brcmf_err("Failed to set p=
m_flags %x\n", sdio_flags);
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return -EINVAL;
+=A0=A0=A0=A0=A0=A0 }
=A0=A0=A0=A0=A0=A0=A0=A0 return 0;
=A0}
=A0
--=A0
2.6.0.GIT














               =
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help