[PATCH] mmc: During unsafe resume, select the right volatge forthe card

From: Balaji Rao
Date: Wed Feb 25 2009 - 04:58:57 EST


On Wed, Feb 18, 2009 at 09:25:15PM +0100, Pierre Ossman wrote:
> On Mon, 9 Feb 2009 18:58:08 +0530
> Balaji Rao <balajirrao@xxxxxxxxxxxx> wrote:
>
> > When mmc_power_up is called during unsafe resume, host->ocr should be
> > used instead of host->ocr_avail.
> >
> > Signed-off-by: Balaji Rao <balajirrao@xxxxxxxxxxxx>
> > Cc: Andy Green <andy@xxxxxxxxxxxx>
> > Cc: Pierre Ossman <drzeus-mmc@xxxxxxxxx>
> > ---
>
> Hmm... This is a bit hackish and changes the previously known behaviour
> of mmc_power_up(). We probably need to refactor things and have some
> other explicit call from the resume path.
>

Hi Pierre,

Here's a simpler patch. How does this look ?

Thanks,
Balaji

---
During mmc unsafe resume, choose the right voltage for the card after
powerup.

Although this has not seen to cause trouble, it's the wrong behaviour.

Signed-off-by: Balaji Rao <balajirrao@xxxxxxxxxxxx>
Cc: Andy Green <andy@xxxxxxxxxxxx>
Cc: Pierre Ossman <drzeus-mmc@xxxxxxxxx>

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 3ad7f87..1e8de16 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -881,6 +881,7 @@ int mmc_resume_host(struct mmc_host *host)
mmc_bus_get(host);
if (host->bus_ops && !host->bus_dead) {
mmc_power_up(host);
+ mmc_select_voltage(host, host->ocr);
BUG_ON(!host->bus_ops->resume);
host->bus_ops->resume(host);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/