OSDN Git Service

net: ipa: do not cache channel state
authorAlex Elder <elder@linaro.org>
Thu, 30 Apr 2020 22:13:23 +0000 (17:13 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 May 2020 22:53:33 +0000 (15:53 -0700)
commita2003b303875b41542bad1c2e81800fdd4c27c29
tree0dd8c52a05de8e8e1a5bfc276e834138d4594621
parentaba7924fa5a490d6c586b9cd7d0f78f872a40d1d
net: ipa: do not cache channel state

It is possible for a GSI channel's state to be changed as a result
of an action by a different execution environment.  Specifically,
the modem is able to issue a GSI generic command that causes a state
change on a GSI channel associated with the AP.

A channel's state only needs to be known when a channel is allocated
or deallocaed, started or stopped, or reset.  So there is little
value in caching the state anyway.

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: David S. Miller <davem@davemloft.net>
drivers/net/ipa/gsi.c
drivers/net/ipa/gsi.h