]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipa: use state to determine event ring command success
authorAlex Elder <elder@linaro.org>
Tue, 22 Dec 2020 18:00:12 +0000 (12:00 -0600)
committerJakub Kicinski <kuba@kernel.org>
Wed, 23 Dec 2020 20:17:48 +0000 (12:17 -0800)
commit4a607da2943a8ebc1b912111c563527ec4ea4261
tree6c22041443915b6f694c275062603eb4d831aa9b
parent2700c8b258e12f1d6ee779ae1b907dd8ed860148
net: ipa: use state to determine event ring command success

This patch implements the same basic fix for event rings as the
previous one does for channels.

The result of issuing an event ring control command should be that
the event ring changes state.  If enabled, a completion interrupt
signals that the event ring state has changed.  This interrupt is
enabled by gsi_evt_ring_command() and disabled again after the
command has completed (or we time out).

There is a window of time during which the command could complete
successfully without interrupting.  This would cause the event ring
to transition to the desired new state.

So whether a event ring command ends via completion interrupt or
timeout, we can consider the command successful if the event ring
has entered the desired state (and a failure if it has not,
regardless of the cause).

Fixes: 48b04f6710b9c ("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