Skip to contentSkip to conversation

mmc: omap_hsmmc: fix wakeirq handling on removal

PATCH In review Andreas Kemnade 3 participants 4 messages Sep 2, 2018 – Sep 4, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: omap_hsmmc: fix wakeirq handling on removal

after unbinding mmc I get things like this:

[  185.294067] mmc1: card 0001 removed
[  185.305206] omap_hsmmc 480b4000.mmc: wake IRQ with no resume: -13

The wakeirq stays in /proc-interrupts

rebinding shows this:

[  289.795959] genirq: Flags mismatch irq 112. 0000200a (480b4000.mmc:wakeup) vs. 0000200a (480b4000.mmc:wakeup)
[  289.808959] omap_hsmmc 480b4000.mmc: Unable to request wake IRQ
[  289.815338] omap_hsmmc 480b4000.mmc: no SDIO IRQ support, falling back to polling

That bug seems to be introduced by switching from devm_request_irq() to generic wakeirq handling.

So let us cleanup at removal.

Fixes 5b83b2234be6 ("mmc: omap_hsmmc: Change wake-up interrupt to use generic wakeirq")
---
 drivers/mmc/host/omap_hsmmc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mmc/host/omap_hsmmc.c +1 -0
index 071693ebfe18..68760d4a5d3d 100644
@@ -2177,6 +2177,7 @@ static int omap_hsmmc_remove(struct platform_device *pdev)
 	dma_release_channel(host->tx_chan);
 	dma_release_channel(host->rx_chan);
 
+	dev_pm_clear_wake_irq(host->dev);
 	pm_runtime_dont_use_autosuspend(host->dev);
 	pm_runtime_put_sync(host->dev);
 	pm_runtime_disable(host->dev);
Signature · 1 line
2.11.0
#1 lore raw
Quoted 11 lines · Andreas Kemnade

after unbinding mmc I get things like this:

[  185.294067] mmc1: card 0001 removed
[  185.305206] omap_hsmmc 480b4000.mmc: wake IRQ with no resume: -13

The wakeirq stays in /proc-interrupts

rebinding shows this:

[  289.795959] genirq: Flags mismatch irq 112. 0000200a (480b4000.mmc:wakeup) vs. 0000200a (480b4000.mmc:wakeup)
[  289.808959] omap_hsmmc 480b4000.mmc: Unable to request wake IRQ
[  289.815338] omap_hsmmc 480b4000.mmc: no SDIO IRQ support, falling back to polling
Quoted 7 lines

That bug seems to be introduced by switching from devm_request_irq() to generic wakeirq handling.

So let us cleanup at removal.

Fixes 5b83b2234be6 ("mmc: omap_hsmmc: Change wake-up interrupt to use generic wakeirq")

Applied for fixes, and added a stable tag, thanks!

Kind regards
Uffe

Quoted 19 lines
---
 drivers/mmc/host/omap_hsmmc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mmc/host/omap_hsmmc.c +1 -1
index 071693ebfe18..68760d4a5d3d 100644
@@ -2177,6 +2177,7 @@ static int omap_hsmmc_remove(struct platform_device *pdev)
        dma_release_channel(host->tx_chan);
        dma_release_channel(host->rx_chan);
 
+       dev_pm_clear_wake_irq(host->dev);
        pm_runtime_dont_use_autosuspend(host->dev);
        pm_runtime_put_sync(host->dev);
        pm_runtime_disable(host->dev);
--

2.11.0

#2 lore raw
Quoted 12 lines · Ulf Hansson
Quoted 11 lines · Andreas Kemnade

after unbinding mmc I get things like this:

[  185.294067] mmc1: card 0001 removed
[  185.305206] omap_hsmmc 480b4000.mmc: wake IRQ with no resume: -13

The wakeirq stays in /proc-interrupts

rebinding shows this:

[  289.795959] genirq: Flags mismatch irq 112. 0000200a (480b4000.mmc:wakeup) vs. 0000200a (480b4000.mmc:wakeup)
[  289.808959] omap_hsmmc 480b4000.mmc: Unable to request wake IRQ
[  289.815338] omap_hsmmc 480b4000.mmc: no SDIO IRQ support, falling back to polling
Quoted 7 lines
Quoted 7 lines

That bug seems to be introduced by switching from devm_request_irq() to generic wakeirq handling.

So let us cleanup at removal.

Fixes 5b83b2234be6 ("mmc: omap_hsmmc: Change wake-up interrupt to use generic wakeirq")

Ooops sorry about that.

Quoted 1 line

Applied for fixes, and added a stable tag, thanks!

OK and thanks for fixing this Andreas!

Regards,

Tony

#3 lore raw
In reply to Ulf Hansson

Hi,

Quoted 15 lines · On Tue, 4 Sep 2018 16:34:56 +0200 Ulf Hansson <[email protected]> wrote:
Quoted 14 lines · Andreas Kemnade

after unbinding mmc I get things like this:

[  185.294067] mmc1: card 0001 removed
[  185.305206] omap_hsmmc 480b4000.mmc: wake IRQ with no resume: -13

The wakeirq stays in /proc-interrupts

rebinding shows this:

[  289.795959] genirq: Flags mismatch irq 112. 0000200a (480b4000.mmc:wakeup) vs. 0000200a (480b4000.mmc:wakeup)
[  289.808959] omap_hsmmc 480b4000.mmc: Unable to request wake IRQ
[  289.815338] omap_hsmmc 480b4000.mmc: no SDIO IRQ support, falling back to polling

That bug seems to be introduced by switching from devm_request_irq() to generic wakeirq handling.

Quoted 7 lines
Quoted 4 lines

So let us cleanup at removal.

Fixes 5b83b2234be6 ("mmc: omap_hsmmc: Change wake-up interrupt to use generic wakeirq")

Applied for fixes, and added a stable tag, thanks!

What also might be critical (still analyzing) of that patch I am fixing is:
It keeps the wakeup irq also enabled when the sdio irq is disabled.

Regards,
Andreas