aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Elder <[email protected]>2024-02-23 07:39:30 -0600
committerPaolo Abeni <[email protected]>2024-02-27 11:24:04 +0100
commitf9345952e74a77ba905b5a23252bffde48162ef3 (patch)
tree87dc5b4f1a34169664f596671e5b8f3e7f1bba86
parent423df2e09d3b893ce83bc35ca81657829604968e (diff)
net: ipa: don't bother zeroing an already zero register
In ipa_interrupt_suspend_clear_all(), if the SUSPEND_INFO register read contains no set bits, there's no interrupt condition to clear. Skip the write to the clear register in that case. Signed-off-by: Alex Elder <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
-rw-r--r--drivers/net/ipa/ipa_interrupt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ipa/ipa_interrupt.c b/drivers/net/ipa/ipa_interrupt.c
index 501962cc4e90..4d80bf77a532 100644
--- a/drivers/net/ipa/ipa_interrupt.c
+++ b/drivers/net/ipa/ipa_interrupt.c
@@ -59,7 +59,7 @@ static void ipa_interrupt_suspend_clear_all(struct ipa_interrupt *interrupt)
val = ioread32(ipa->reg_virt + reg_n_offset(reg, unit));
/* SUSPEND interrupt status isn't cleared on IPA version 3.0 */
- if (ipa->version == IPA_VERSION_3_0)
+ if (!val || ipa->version == IPA_VERSION_3_0)
continue;
reg = ipa_reg(ipa, IRQ_SUSPEND_CLR);