how to use WOL with libertas SDIO

Chris Ball cjb at laptop.org
Tue Dec 6 11:45:17 EST 2011


Hi Sven,

On Tue, Dec 06 2011, Sven Neumann wrote:
> Now when I send the device to sleep the MMC layer tells me that it can't
> keep the card alive while the host is suspended:
>
> [   76.400019] PM: Syncing filesystems ... done.
> [   76.468400] Freezing user space processes ... (elapsed 0.01 seconds) done.
> [ 76.488405] Freezing remaining freezable tasks ... (elapsed 0.01
> seconds) done.
> [   76.512795] libertas_sdio mmc0:0001:1: mmc0:0001:1: suspend: PM flags = 0x0
> [ 76.519841] libertas_sdio mmc0:0001:1: mmc0:0001:1: cannot remain
> alive while host is suspended
> [   76.586655] mmc0: card 0001 removed
> [   76.590907] PM: suspend of devices complete after 81.339 msecs
> [   76.598207] PM: late suspend of devices complete after 1.370 msecs
>
> Can I somehow persuade it to do what I want?

You're just missing the "pm_caps" flags on your SDIO host controller,
which libertas checks for before trying to keep the card alive.  You need:

        .pm_caps        = MMC_PM_KEEP_POWER | MMC_PM_WAKE_SDIO_IRQ,

to avoid:

        mmc_pm_flag_t flags = sdio_get_host_pm_caps(func);
        ...
        if (!(flags & MMC_PM_KEEP_POWER)) {
                dev_err(dev, "%s: cannot remain alive while host is suspended\n",
                        sdio_func_id(func));
                return -ENOSYS;
        }                                                }
                                                
- Chris.
-- 
Chris Ball   <cjb at laptop.org>   <http://printf.net/>
One Laptop Per Child



More information about the libertas-dev mailing list