diff mbox series

[net-next,7/9] net: ipa: don't disable IEOB interrupt during suspend

Message ID 20210129202019.2099259-8-elder@linaro.org
State New
Headers show
Series net: ipa: don't disable NAPI in suspend | expand

Commit Message

Alex Elder Jan. 29, 2021, 8:20 p.m. UTC
No completion interrupts will occur while an endpoint is suspended,
or when a channel has been stopped for suspend.  So there's no need
to disable the interrupt during suspend and re-enable it when
resuming.

We'll enable the interrupt when we first start the channel, and
disable it again only when it's "really" stopped.

Signed-off-by: Alex Elder <elder@linaro.org>

---
 drivers/net/ipa/gsi.c | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

-- 
2.27.0
diff mbox series

Patch

diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c
index 70647e8450845..74d1dd04ad6e9 100644
--- a/drivers/net/ipa/gsi.c
+++ b/drivers/net/ipa/gsi.c
@@ -959,30 +959,16 @@  void gsi_channel_reset(struct gsi *gsi, u32 channel_id, bool doorbell)
 int gsi_channel_suspend(struct gsi *gsi, u32 channel_id, bool stop)
 {
 	struct gsi_channel *channel = &gsi->channel[channel_id];
-	int ret;
 
-	/* No completions when suspended; disable interrupt if successful */
-	ret = __gsi_channel_stop(channel, stop);
-	if (!ret)
-		gsi_irq_ieob_disable_one(gsi, channel->evt_ring_id);
-
-	return ret;
+	return __gsi_channel_stop(channel, stop);
 }
 
 /* Resume a suspended channel (starting will be requested if STOPPED) */
 int gsi_channel_resume(struct gsi *gsi, u32 channel_id, bool start)
 {
 	struct gsi_channel *channel = &gsi->channel[channel_id];
-	int ret;
 
-	/* Re-enable the completion interrupt */
-	gsi_irq_ieob_enable_one(gsi, channel->evt_ring_id);
-
-	ret = __gsi_channel_start(channel, start);
-	if (ret)
-		gsi_irq_ieob_disable_one(gsi, channel->evt_ring_id);
-
-	return ret;
+	return __gsi_channel_start(channel, start);
 }
 
 /**