]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipa: do not cache event ring state
authorAlex Elder <elder@linaro.org>
Fri, 5 Feb 2021 22:10:56 +0000 (16:10 -0600)
committerJakub Kicinski <kuba@kernel.org>
Sat, 6 Feb 2021 22:57:17 +0000 (14:57 -0800)
commit248fb1332e0f4c1918beed8d1006763282d5c71c
treeb70d4253e7bc006282fdac663be1e9b5e1ae9ce6
parent06dd8b07885161b02c742bdb3e2c741138678c6d
net: ipa: do not cache event ring state

An event ring's state only needs to be known when it is allocated,
reset, or deallocated.  We check an event ring's state both before
and after performing an event ring control command that changes
its state.  These are only issued at startup and shutdown, so there
is very little value in caching the state.

Stop recording a copy of the channel's last known state, and instead
fetch the true state from hardware whenever it's needed.  In such
cases, *do* record the state in a local variable, in case an error
message reports it (so the value reported is the value seen).

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