RE: [PATCH v2 4/5] mmc: sdhci-esdhc-imx: disable irq during suspend to fix unhandled interrupt

From: Luke Wang (OSS)

Date: Fri Jun 26 2026 - 02:06:24 EST




> -----Original Message-----
> From: Frank Li (OSS) <frank.li@xxxxxxxxxxx>
> Sent: Friday, June 26, 2026 12:38 AM
> To: Luke Wang (OSS) <ziniu.wang_1@xxxxxxxxxxx>
> Cc: adrian.hunter@xxxxxxxxx; ulfh@xxxxxxxxxx; Bough Chen
> <haibo.chen@xxxxxxx>; Frank Li <frank.li@xxxxxxx>;
> s.hauer@xxxxxxxxxxxxxx; kernel@xxxxxxxxxxxxxx; festevam@xxxxxxxxx;
> imx@xxxxxxxxxxxxxxx; linux-mmc@xxxxxxxxxxxxxxx; dl-S32 <S32@xxxxxxx>;
> linux-arm-kernel@xxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH v2 4/5] mmc: sdhci-esdhc-imx: disable irq during
> suspend to fix unhandled interrupt
>
> On Thu, Jun 25, 2026 at 06:59:33PM +0800, ziniu.wang_1@xxxxxxxxxxx
> wrote:
> > From: Luke Wang <ziniu.wang_1@xxxxxxx>
> >
> > When using WIFI out-of-band wakeup, an "irq xxx: nobody cared" warning
> > occurs. This happens because the usdhc interrupt is not disabled during
> > system suspend when device_may_wakeup() returns false.
> >
> > The sequence of events leading to this issue:
> > 1. System enters suspend without disabling usdhc interrupt
> > (because device_may_wakeup() returns false for usdhc device)
> > 2. WIFI out-of-band wakeup triggers system resume via GPIO interrupt
> > 3. WIFI sends a Card interrupt before usdhc has fully resumed
> > 4. usdhc is still in runtime suspend state and cannot handle the
> > interrupt properly
> > 5. The unhandled interrupt triggers "nobody cared" warning
> >
> > Fix this by unconditionally disabling the usdhc interrupt during suspend
> > and re-enabling it during resume, regardless of the wakeup capability.
> > This ensures no interrupts are processed during the suspend/resume
> > transition.
>
> Does it impact the case if WIFI don't use out-of-band wakeup?

It doesn't impact other cases.

Thanks,
Luke

>
> Frank
> >
> > Fixes: 676a83855614 ("mmc: host: sdhci-esdhc-imx: refactor the system PM
> logic")
> > Signed-off-by: Luke Wang <ziniu.wang_1@xxxxxxx>
> > ---
> > drivers/mmc/host/sdhci-esdhc-imx.c | 11 ++++++-----
> > 1 file changed, 6 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-
> esdhc-imx.c
> > index 7fcaecdd4ec6..c4a22e42628e 100644
> > --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> > +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> > @@ -2076,9 +2076,10 @@ static int sdhci_esdhc_suspend(struct device
> *dev)
> > if (mmc_card_keep_power(host->mmc) &&
> esdhc_is_usdhc(imx_data))
> > sdhc_esdhc_tuning_save(host);
> >
> > + /* The irqs of imx are not shared. It is safe to disable */
> > + disable_irq(host->irq);
> > +
> > if (device_may_wakeup(dev)) {
> > - /* The irqs of imx are not shared. It is safe to disable */
> > - disable_irq(host->irq);
> > ret = sdhci_enable_irq_wakeups(host);
> > if (!ret)
> > dev_warn(dev, "Failed to enable irq wakeup\n");
> > @@ -2129,10 +2130,10 @@ static int sdhci_esdhc_resume(struct device
> *dev)
> > /* re-initialize hw state in case it's lost in low power mode */
> > sdhci_esdhc_imx_hwinit(host);
> >
> > - if (host->irq_wake_enabled) {
> > + if (host->irq_wake_enabled)
> > sdhci_disable_irq_wakeups(host);
> > - enable_irq(host->irq);
> > - }
> > +
> > + enable_irq(host->irq);
> >
> > /*
> > * restore the saved tuning delay value for the device which keep
> > --
> > 2.34.1
> >
> >