[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTi=iC1uKyToEXrroOj+JxQ2mW97WRVEXjv+9oQEa@mail.gmail.com>
Date: Sat, 23 Oct 2010 12:09:01 +0200
From: Ohad Ben-Cohen <ohad@...ery.com>
To: Maxim Levitsky <maximlevitsky@...il.com>
Cc: linux-mmc@...r.kernel.org, Sven Neumann <s.neumann@...mfeld.com>,
Chris Ball <cjb@...top.org>, Nicolas Pitre <nico@...xnic.net>,
libertas-dev@...ts.infradead.org,
"Rafael J. Wysocki" <rjw@...k.pl>, Daniel Mack <daniel@...aq.de>,
Colin Cross <ccross@...roid.com>,
Greg Kroah-Hartman <gregkh@...e.de>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
stable@...nel.org
Subject: Re: [PATCH] sdio: fix suspend/resume regression
Hi Maxim,
On Fri, Oct 22, 2010 at 1:47 AM, Maxim Levitsky <maximlevitsky@...il.com> wrote:
> On Wed, 2010-10-13 at 09:31 +0200, Ohad Ben-Cohen wrote:
>> Fix SDIO suspend/resume regression introduced by
>> 4c2ef25fe0b847d2ae818f74758ddb0be1c27d8e "mmc: fix all hangs related to
>> mmc/sd card insert/removal during suspend/resume":
...
>> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
>> index c94565d..515ff39 100644
>> --- a/drivers/mmc/core/core.c
>> +++ b/drivers/mmc/core/core.c
>> @@ -1682,6 +1682,19 @@ int mmc_suspend_host(struct mmc_host *host)
>> if (host->bus_ops && !host->bus_dead) {
>> if (host->bus_ops->suspend)
>> err = host->bus_ops->suspend(host);
>> + if (err == -ENOSYS || !host->bus_ops->resume) {
> This reintroduces the bug I fixed.
>
> if the CONFIG_MMC_UNSAFE_RESUME isn't set (and that is default
> unfortunately), the host->bus_ops->resume will be NULL (see core/mmc.c
> mmc_ops), and therefore card will be removed, that will trigger a block
> device removal, sync, and deadlock).
Have you reproduced this or is it just a general concern ?
I'm asking this because if CONFIG_MMC_UNSAFE_RESUME isn't set, then
mmc_pm_notify() will remove the card and detach the bus.
As a result, host->bus_ops will be unset, and host->bus_dead will be set.
In this case, mmc_suspend_host() should skip the code you are concerned about.
Regards,
Ohad.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists