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>
This commit is contained in:
Alex Elder
2020-04-30 17:13:23 -05:00
committed by David S. Miller
parent aba7924fa5
commit a2003b3038
2 changed files with 55 additions and 35 deletions

View File

@@ -113,8 +113,7 @@ struct gsi_channel {
u16 tre_count;
u16 event_count;
struct completion completion; /* signals channel state changes */
enum gsi_channel_state state;
struct completion completion; /* signals channel command completion */
struct gsi_ring tre_ring;
u32 evt_ring_id;