]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipa: directly disable ipa-setup-ready interrupt
authorAlex Elder <elder@linaro.org>
Tue, 23 Nov 2021 00:15:54 +0000 (18:15 -0600)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Nov 2021 12:06:40 +0000 (12:06 +0000)
commit2056e6e5dfd3d54520e9affafbb9efd1c4146254
treeabd5a748eba0146b0d5b84c768690862ad957133
parentc83965052e02e86d5584a3b612d4a821ec85245e
net: ipa: directly disable ipa-setup-ready interrupt

We currently maintain a "disabled" Boolean flag to determine whether
the "ipa-setup-ready" SMP2P IRQ handler does anything.  That flag
must be accessed under protection of a mutex.

Instead, disable the SMP2P interrupt when requested, which prevents
the interrupt handler from ever being called.  More importantly, it
synchronizes a thread disabling the interrupt with the completion of
the interrupt handler in case they run concurrently.

Use the IPA setup_complete flag rather than the disabled flag in the
handler to determine whether to ignore any interrupts arriving after
the first.

Rename the "disabled" flag to be "setup_disabled", to be specific
about its purpose.

Fixes: 8b29b90afdb0 ("soc: qcom: ipa: AP/modem communications")
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipa/ipa_smp2p.c