aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/ipa/gsi.h
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2020-04-30 17:13:23 -0500
committerDavid S. Miller <davem@davemloft.net>2020-05-01 15:53:33 -0700
commita2003b303875b41542bad1c2e81800fdd4c27c29 (patch)
tree0dd8c52a05de8e8e1a5bfc276e834138d4594621 /drivers/net/ipa/gsi.h
parentnet: ipa: pass channel pointer to gsi_channel_state() (diff)
downloadwireguard-linux-a2003b303875b41542bad1c2e81800fdd4c27c29.tar.xz
wireguard-linux-a2003b303875b41542bad1c2e81800fdd4c27c29.zip
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>
Diffstat (limited to 'drivers/net/ipa/gsi.h')
-rw-r--r--drivers/net/ipa/gsi.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ipa/gsi.h b/drivers/net/ipa/gsi.h
index 0698ff1ae7a6..19471017fadf 100644
--- a/drivers/net/ipa/gsi.h
+++ b/drivers/net/ipa/gsi.h
@@ -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;