On 30 May 2011 15:26, Daniel Drake <[email protected]> wrote:
> Hi,
>
> The libertas_sdio driver has a suspend routine which returns -ENOSYS
> when the card should effectively be removed and powered during
> suspend, to be re-probed during resume.
>
> This is broken in linus master.

Actually, it only breaks when I enable runtime PM via the patch we are
discussing in the other thread.

Here is the call trace:

mmc_suspend_host
mmc_sdio_remove
sdio_remove_func
device_del
sdio_bus_remove

In sdio_bus_remove, we hit:

        /* Make sure card is powered before invoking ->remove() */
        if (func->card->host->caps & MMC_CAP_POWER_OFF_CARD) {
                ret = pm_runtime_get_sync(dev);
                if (ret < 0)
                        goto out;
        }

pm_runtime_get_sync returns -11, therefore we skip the following
drv->remove call, causing this confusion. -11 is EAGAIN

Digging further, in the pm_runtime_get_sync() call we reach
rpm_resume() in drivers/base/power where we hit:

        else if (dev->power.disable_depth > 0)
                retval = -EAGAIN;

Not sure what this means. Any thoughts?

Thanks,
Daniel
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to