]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit5ae8ab2729318a92977bf079cbf1e5804b3edb14
tree3388e91805598771c216a7445f68068804b4cb3f
parent1492793ae00dff78285c07fe7c6012e9ac58eb28
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