On Mon, Mar 28, 2011 at 7:21 PM, Chris Ball <cjb@xxxxxxxxxx> wrote: > Hi Grant, > > On Tue, Mar 08 2011, Grant Grundler wrote: >> Save and restore SDHCI interrupt mask during suspend/resume. >> Enables ARM Tegra2 board to suspend/resume. >> >> Signed-off-by: Venkat Rao <vrao@xxxxxxxxxxxx> >> Reviewed-by: Olof Johansson <olofj@xxxxxxxxxxxx> >> Reviewed-by: Grant Grundler <grundler@xxxxxxxxxxxx> >> --- >> Âdrivers/mmc/host/sdhci.c Â| Â Â5 +++++ >> Âinclude/linux/mmc/sdhci.h | Â Â2 ++ >> Â2 files changed, 7 insertions(+), 0 deletions(-) >> >> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c >> index 3c6358f..68d2e36 100644 >> --- a/drivers/mmc/host/sdhci.c >> +++ b/drivers/mmc/host/sdhci.c >> @@ -1654,6 +1654,8 @@ int sdhci_suspend_host(struct sdhci_host *host, pm_message_t state) >> Â Â Â if (mmc->card && (mmc->card->type != MMC_TYPE_SDIO)) >> Â Â Â Â Â Â Â ret = mmc_suspend_host(host->mmc); >> >> + Â Â /* Save the original intmask to restore later */ >> + Â Â host->save_intmask = sdhci_readl(host, SDHCI_INT_ENABLE); >> Â Â Â sdhci_mask_irqs(host, SDHCI_INT_ALL_MASK); >> >> Â Â Â if (host->vmmc) >> @@ -1695,6 +1697,9 @@ int sdhci_resume_host(struct sdhci_host *host) >> >> Â Â Â sdhci_enable_card_detection(host); >> >> + Â Â /* Restore the original intmask */ >> + Â Â sdhci_unmask_irqs(host, host->save_intmask); >> + >> Â Â Â return ret; >> Â} > > I'm okay with the patch in principle, but it doesn't apply to any mainline > kernel as far as I can see -- we've never called sdhci_mask_irqs() in the > suspend path, which is context in this patch. ÂMaybe I'm missing something? Yes. Sorry. /o\ I didn't know this happened. Olof just helped me track down this change from Android tree which was pulled into the chromium.org "kernel-next" tree to support ARM tegra2: http://android.git.kernel.org/?p=kernel/tegra.git;a=commit;h=da2d1c69d66f8a4028b5f93fc972652b79bbb648 Author: Dmitry Shmidt <dimitrysh@xxxxxxxxxx> Date: Thu Aug 12 18:08:40 2010 -0700 mmc: sdhci: Skip mmc suspend/resume ops for SDIO device, enable/disable sdc irq instead of request/free, mask all sdc interrupts on suspend [And given the "subject" of the commit log, neither google nor yahoo could find the link. We had to manually find the commit by traversing android.git.kernel.org. ] > If not, it would be good to know whether the patch is needed on a mainline > kernel, as well as posting a rebased version. After the conversation with Olof and Andrei Warkentin, I'm pretty sure the proposed patch IS needed. I will provide a rebased version. But I first need to talk to Dmitry (cc'd) tomorrow (8pm PST here already) and see if other Adroid changes to drivers/mmc need to be upstreamed or if this one could/should go in alone. my apologies for making this messy, grant -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html