Skip to content

Commit

Permalink
libertas sdio: fix suspend when interface is down
Browse files Browse the repository at this point in the history
When the interface is down, the hardware is powered off.
However, the suspend handler currently tries to send host sleep commands
(when wakeup params are set) in this configuration, causing a system hang
when going into suspend (the commands will never complete).

Avoid this by detecting this situation and simply returning from
the suspend handler without doing anything special.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Daniel Drake authored and John W. Linville committed Sep 5, 2012
1 parent efd5d6b commit f107238
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/wireless/libertas/if_sdio.c
Original file line number Diff line number Diff line change
@@ -1326,6 +1326,11 @@ static int if_sdio_suspend(struct device *dev)

mmc_pm_flag_t flags = sdio_get_host_pm_caps(func);

/* If we're powered off anyway, just let the mmc layer remove the
* card. */
if (!lbs_iface_active(card->priv))
return -ENOSYS;

dev_info(dev, "%s: suspend: PM flags = 0x%x\n",
sdio_func_id(func), flags);

0 comments on commit f107238

Please sign in to comment.