diff options
author | Alex Elder | 2021-08-03 09:00:58 -0500 |
---|---|---|
committer | David S. Miller | 2021-08-04 10:12:05 +0100 |
commit | decfef0fa6b21508657a6e54a01508196988bc95 (patch) | |
tree | a1864b4d88da0d9d371b78b3d7595a073556a9cb /drivers/net/ipa/gsi.c | |
parent | 93bbcfee0575e5f6526a5bbf213b205eeae60c59 (diff) |
net: ipa: use gsi->version for channel suspend/resume
The GSI layer has the IPA version now, so there's no need for
version-specific flags to be passed from IPA. One instance of
this is in gsi_channel_suspend() and gsi_channel_resume(), which
indicate whether or not the endpoint suspend is implemented by
GSI stopping the channel. We can make that determination based
on gsi->version, eliminating the need for a Boolean flag in those
functions.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipa/gsi.c')
-rw-r--r-- | drivers/net/ipa/gsi.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index 3de67ba066a6..e143deddb7c0 100644 --- a/drivers/net/ipa/gsi.c +++ b/drivers/net/ipa/gsi.c @@ -1026,13 +1026,14 @@ void gsi_channel_reset(struct gsi *gsi, u32 channel_id, bool doorbell) mutex_unlock(&gsi->mutex); } -/* Stop a STARTED channel for suspend (using stop if requested) */ -int gsi_channel_suspend(struct gsi *gsi, u32 channel_id, bool stop) +/* Stop a started channel for suspend */ +int gsi_channel_suspend(struct gsi *gsi, u32 channel_id) { struct gsi_channel *channel = &gsi->channel[channel_id]; int ret; - ret = __gsi_channel_stop(channel, stop); + /* Prior to IPA v4.0 suspend/resume is not implemented by GSI */ + ret = __gsi_channel_stop(channel, gsi->version >= IPA_VERSION_4_0); if (ret) return ret; @@ -1042,12 +1043,13 @@ int gsi_channel_suspend(struct gsi *gsi, u32 channel_id, bool stop) return 0; } -/* Resume a suspended channel (starting will be requested if STOPPED) */ -int gsi_channel_resume(struct gsi *gsi, u32 channel_id, bool start) +/* Resume a suspended channel (starting if stopped) */ +int gsi_channel_resume(struct gsi *gsi, u32 channel_id) { struct gsi_channel *channel = &gsi->channel[channel_id]; - return __gsi_channel_start(channel, start); + /* Prior to IPA v4.0 suspend/resume is not implemented by GSI */ + return __gsi_channel_start(channel, gsi->version >= IPA_VERSION_4_0); } /** |