2017-08-31 23:44:20

by Eric Bentley

[permalink] [raw]
Subject: [PATCH] Correctly fail to suspend when SDIO does not support power on suspend

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 <[email protected]>
---
=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














=


2017-08-31 23:49:45

by Steve deRosier

[permalink] [raw]
Subject: Re: [PATCH] Correctly fail to suspend when SDIO does not support power on suspend

On Thu, Aug 31, 2017 at 4:44 PM, Eric Bentley
<[email protected]> wrote:
> - if (sdio_set_host_pm_flags(sdiodev->func[1], sdio_flags))
> + if (sdio_set_host_pm_flags(sdiodev->func[1], sdio_flags)) (

Hi Eric,

Shouldn't that be a '{' instead of '('? Maybe I'm missing some
context, but that doesn't look compilable.

:)

- Steve