net: ipa: only enable GSI IEOB IRQs when needed
authorAlex Elder <elder@linaro.org>
Thu, 5 Nov 2020 18:14:04 +0000 (12:14 -0600)
committerJakub Kicinski <kuba@kernel.org>
Sat, 7 Nov 2020 23:39:17 +0000 (15:39 -0800)
commit06c8632833c289ad660ba6699f34e9c8820d3358
tree3388e91805598771c216a7445f68068804b4cb3f
parentd6c9e3f506ae8f96727017d1747887aab4e68605
net: ipa: only enable GSI IEOB IRQs when needed

A GSI channel must be started in order to use it to perform a
transfer data (or command) transaction.  And the only time we'll see
an IEOB interrupt is if we send a transaction to a started channel.
Therefore we do not need to have the IEOB interrupt type enabled
until at least one channel has been started.  And once the last
started channel has been stopped, we can disable the IEOB interrupt
type again.

We already enable the IEOB interrupt for a particular channel only
when it is started.  Extend that by having the IEOB interrupt *type*
be enabled only when at least one channel is in STARTED state.

Disallow all channels from triggering the IEOB interrupt in
gsi_irq_setup().  We only enable an channel's interrupt when
needed, so there is no longer any need to zero the channel mask
in gsi_irq_disable().

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ipa/gsi.c