Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f666675 authored by Daniel Mack's avatar Daniel Mack Committed by Ulf Hansson
Browse files

libertas: call into generic suspend code before turning off power



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: 7444a809 ("libertas: fix suspend and resume for SDIO connected cards")
Signed-off-by: default avatarDaniel Mack <daniel@zonque.org>
Reviewed-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Acked-by: default avatarKalle Valo <kvalo@codeaurora.org>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 41591b38
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1317,6 +1317,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);
		}