]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipa: clear pending interrupts before enabling
authorAlex Elder <elder@linaro.org>
Tue, 22 Dec 2020 18:00:10 +0000 (12:00 -0600)
committerJakub Kicinski <kuba@kernel.org>
Wed, 23 Dec 2020 20:17:48 +0000 (12:17 -0800)
commit0601e2e13c628757398e41fba9190bf820e1129b
tree5295ed6fc70bd2a176864a7e5057b08f3549bf44
parente1a50a13c67bb02b4a5b8021f1167c620798413b
net: ipa: clear pending interrupts before enabling

We enable the completion interrupt for channel or event ring
commands only when we issue them.  The interrupt is disabled after
the interrupt has fired, or after we have timed out waiting for it.

If we time out, the command could complete after the interrupt has
been disabled, causing a state change in the channel or event ring.
The interrupt associated with that state change would be delivered
the next time the completion interrupt is enabled.

To avoid previous command completions interfering with new commands,
clear all pending completion interrupts before re-enabling them for
a new command.

Fixes: 76b5d7ab0313a ("net: ipa: only enable GSI event control IRQs when needed")
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ipa/gsi.c