[RFC,PATCHv3 3/3] mmc: sdhci: handle wake-up from runtime_pm

2011-03-01 Thread Pierre Tardy
When sdhci is runtime_suspended, it can still receive a wake-up because of card insertion. The wake-up will then be signaled by an interrupt which cannot be serviced immediatly, as the device is powered off, and register are not accessibles. We cannot call pm_runtime_get_sync() in irq context as

Re: [linux-pm] [RFC, PATCHv3 3/3] mmc: sdhci: handle wake-up from runtime_pm

2011-03-01 Thread Alan Stern
On Tue, 1 Mar 2011, Pierre Tardy wrote: When sdhci is runtime_suspended, it can still receive a wake-up because of card insertion. The wake-up will then be signaled by an interrupt which cannot be serviced immediatly, as the device is powered off, and register are not accessibles. We

Re: [linux-pm] [RFC, PATCHv3 3/3] mmc: sdhci: handle wake-up from runtime_pm

2011-03-01 Thread Pierre Tardy
+     if (pm_runtime_suspended()) { +             host-waking_up = 1; +             /* Note that we disable temporarly the interrupt until we do the +              * resume. If we don't then we'll get constantly interrupted +              * until we actually resume. +              * +    

Re: [linux-pm] [RFC, PATCHv3 3/3] mmc: sdhci: handle wake-up from runtime_pm

2011-03-01 Thread Alan Stern
On Tue, 1 Mar 2011, Pierre Tardy wrote: +     if (pm_runtime_suspended()) { +             host-waking_up = 1; +             /* Note that we disable temporarly the interrupt until we do the +              * resume. If we don't then we'll get constantly interrupted +              *

Re: [linux-pm] [RFC, PATCHv3 3/3] mmc: sdhci: handle wake-up from runtime_pm

2011-03-01 Thread Pierre Tardy
On Tue, Mar 1, 2011 at 9:27 PM, Alan Stern st...@rowland.harvard.edu wrote: On Tue, 1 Mar 2011, Pierre Tardy wrote: +     if (pm_runtime_suspended()) { +             host-waking_up = 1; +             /* Note that we disable temporarly the interrupt until we do the +              *