diff options
author | Caleb Connolly <caleb.connolly@linaro.org> | 2023-01-15 18:59:24 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-01-18 04:04:13 +0100 |
commit | 9ec9b2a30853ba843b70ea16f196e5fe3327be5f (patch) | |
tree | 926e438cc748fba2b3ffba10fe6581f0306be8fa /drivers/net/ipa/ipa_interrupt.h | |
parent | net: stmmac: fix invalid call to mdiobus_get_phy() (diff) | |
download | linux-9ec9b2a30853ba843b70ea16f196e5fe3327be5f.tar.xz linux-9ec9b2a30853ba843b70ea16f196e5fe3327be5f.zip |
net: ipa: disable ipa interrupt during suspend
The IPA interrupt can fire when pm_runtime is disabled due to it racing
with the PM suspend/resume code. This causes a splat in the interrupt
handler when it tries to call pm_runtime_get().
Explicitly disable the interrupt in our ->suspend callback, and
re-enable it in ->resume to avoid this. If there is an interrupt pending
it will be handled after resuming. The interrupt is a wake_irq, as a
result even when disabled if it fires it will cause the system to wake
from suspend as well as cancel any suspend transition that may be in
progress. If there is an interrupt pending, the ipa_isr_thread handler
will be called after resuming.
Fixes: 1aac309d3207 ("net: ipa: use autosuspend")
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Link: https://lore.kernel.org/r/20230115175925.465918-1-caleb.connolly@linaro.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ipa/ipa_interrupt.h')
-rw-r--r-- | drivers/net/ipa/ipa_interrupt.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/ipa/ipa_interrupt.h b/drivers/net/ipa/ipa_interrupt.h index f31fd9965fdc..8a1bd5b89393 100644 --- a/drivers/net/ipa/ipa_interrupt.h +++ b/drivers/net/ipa/ipa_interrupt.h @@ -86,6 +86,22 @@ void ipa_interrupt_suspend_clear_all(struct ipa_interrupt *interrupt); void ipa_interrupt_simulate_suspend(struct ipa_interrupt *interrupt); /** + * ipa_interrupt_irq_enable() - Enable IPA interrupts + * @ipa: IPA pointer + * + * This enables the IPA interrupt line + */ +void ipa_interrupt_irq_enable(struct ipa *ipa); + +/** + * ipa_interrupt_irq_disable() - Disable IPA interrupts + * @ipa: IPA pointer + * + * This disables the IPA interrupt line + */ +void ipa_interrupt_irq_disable(struct ipa *ipa); + +/** * ipa_interrupt_config() - Configure the IPA interrupt framework * @ipa: IPA pointer * |