OSDN Git Service

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)
commit3f77c926f649eed686f36a1e6888abb698146a2a
treeb70d4253e7bc006282fdac663be1e9b5e1ae9ce6
parentb1750723c99c5a4d9b452b5e51a9fd3227fceecb
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