Skip to content

Commit

Permalink
libertas: call into generic suspend code before turning off power
Browse files Browse the repository at this point in the history
commit 4f66667 upstream.

When powering down a SDIO connected card during suspend, make sure to call
into the generic lbs_suspend() function before pulling the plug. This will
make sure the card is successfully deregistered from the system to avoid
communication to the card starving out.

Fixes: 7444a80 ("libertas: fix suspend and resume for SDIO connected cards")
Signed-off-by: Daniel Mack <daniel@zonque.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
  • Loading branch information
zonque authored and bwhacks committed Dec 16, 2018
1 parent 739f44a commit 727e211
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/wireless/libertas/if_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1369,6 +1369,10 @@ static int if_sdio_suspend(struct device *dev)
if (priv->wol_criteria == EHS_REMOVE_WAKEUP) {
dev_info(dev, "Suspend without wake params -- powering down card\n");
if (priv->fw_ready) {
ret = lbs_suspend(priv);
if (ret)
return ret;

priv->power_up_on_resume = true;
if_sdio_power_off(card);
}
Expand Down

0 comments on commit 727e211

Please sign in to comment.