From: Matt Fleming <matt@console-pimps.org>
To: Daniel Drake <dsd@laptop.org>
Cc: linux-mmc@vger.kernel.org
Subject: Re: crash in mmc subsystem during suspend
Date: Sat, 21 Nov 2009 12:31:49 +0000 [thread overview]
Message-ID: <20091121123149.GA18478@console-pimps.org> (raw)
In-Reply-To: <1258729858.2235.29.camel@localhost.localdomain>
On Fri, Nov 20, 2009 at 03:10:58PM +0000, Daniel Drake wrote:
> On Fri, 2009-11-20 at 08:51 +0000, Daniel Drake wrote:
> > We're busy testing the suspend/resume functionality on the new OLPC
> > XO-1.5 laptop. This uses a SD card as its primary disk, which is on a
> > SDHCI controller on the VIA VX855 chipset. We are running Linux v2.6.31
> >
> > We are occasionally encountering a crash from below mmc_rescan() during
> > suspend:
>
> OK, I just realised that our kernel includes various non-upstream
> patches (yet), some of which are executing during suspend/resume and may
> be a contributing factor to this problem.
> (the patches allow us to retain power to our SDIO wifi card during
> suspend)
>
> Nevertheless, any help on our battle to stable suspend/resume and the
> other bits we're working on is always appreciated. :)
>
> Daniel
>
>
Fancy giving this patch a try? I think it's just a case of removing too
many funcs in the error path.
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index cdb845b..cdec9c8 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -516,7 +516,8 @@ int mmc_attach_sdio(struct mmc_host *host, u32 ocr)
* The number of functions on the card is encoded inside
* the ocr.
*/
- card->sdio_funcs = funcs = (ocr & 0x70000000) >> 28;
+ funcs = (ocr & 0x70000000) >> 28;
+ card->sdio_funcs = 0;
/*
* If needed, disconnect card detection pull-up resistor.
@@ -528,7 +529,7 @@ int mmc_attach_sdio(struct mmc_host *host, u32 ocr)
/*
* Initialize (but don't add) all present functions.
*/
- for (i = 0;i < funcs;i++) {
+ for (i = 0;i < funcs;i++,card->sdio_funcs++) {
err = sdio_init_func(host->card, i + 1);
if (err)
goto remove;
next prev parent reply other threads:[~2009-11-21 12:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-20 8:51 crash in mmc subsystem during suspend Daniel Drake
2009-11-20 15:10 ` Daniel Drake
2009-11-21 12:31 ` Matt Fleming [this message]
2009-12-01 12:49 ` Daniel Drake
2009-12-01 13:40 ` Matt Fleming
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091121123149.GA18478@console-pimps.org \
--to=matt@console-pimps.org \
--cc=dsd@laptop.org \
--cc=linux-mmc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.