stm32h7: sdmmc: don't panic on spurious IRQs
rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]>
| Newsgroups | gmane.comp.systems.archos.rockbox.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit c390467d1903c926116a918a09875477d25f19d8 Author: Aidan MacDonald <[email protected]> Date: Fri Feb 6 11:53:20 2026 +0000 stm32h7: sdmmc: don't panic on spurious IRQs When doing I/O, the interrupt can rarely fire with no active command and no status bits set. This is probably because the interrupt is set pending by the NVIC while the handler is already running, so should be harmless. Change-Id: I0c2570abe6e3c85ddbfa2ebe0afcf8677b77408f diff --git a/firmware/target/arm/stm32/sdmmc-stm32h7.c b/firmware/target/arm/stm32/sdmmc-stm32h7.c index 0fdad1156a..b61c778376 100644 --- a/firmware/target/arm/stm32/sdmmc-stm32h7.c +++ b/firmware/target/arm/stm32/sdmmc-stm32h7.c @@ -407,7 +407,12 @@ void stm32h7_sdmmc_irq_handler(struct stm32h7_sdmmc_controller *ctl) uint32_t icr = 0; if (!ctl->cmd_wait) - panicf("sdmmc_irq: not waiting: %08lx", star); + { + if (star != 0) + panicf("sdmmc_irq: not waiting: %08lx", star); + + return; + } /* * Ignore interrupts which we haven't enabled; this is needed -- rockbox-cvs mailing list [email protected] https://lists.haxx.se/mailman/listinfo/rockbox-cvs