[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200504235345.17118-4-elder@linaro.org>
Date: Mon, 4 May 2020 18:53:43 -0500
From: Alex Elder <elder@...aro.org>
To: davem@...emloft.net
Cc: evgreen@...omium.org, subashab@...eaurora.org,
cpratapa@...eaurora.org, bjorn.andersson@...aro.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH net-next 3/5] net: ipa: don't retry in ipa_endpoint_stop()
The only reason ipa_endpoint_stop() had a retry loop was that the
just-removed workaround required an IPA DMA command to occur between
attempts. The gsi_channel_stop() call that implements the stop does
its own retry loop, to cover a channel's transition from started to
stop-in-progress to stopped state.
Get rid of the unnecessary retry loop in ipa_endpoint_stop().
Signed-off-by: Alex Elder <elder@...aro.org>
---
drivers/net/ipa/ipa_endpoint.c | 17 ++---------------
1 file changed, 2 insertions(+), 15 deletions(-)
diff --git a/drivers/net/ipa/ipa_endpoint.c b/drivers/net/ipa/ipa_endpoint.c
index c20a5a32fbaa..4939fdd3fca0 100644
--- a/drivers/net/ipa/ipa_endpoint.c
+++ b/drivers/net/ipa/ipa_endpoint.c
@@ -32,8 +32,6 @@
/* The amount of RX buffer space consumed by standard skb overhead */
#define IPA_RX_BUFFER_OVERHEAD (PAGE_SIZE - SKB_MAX_ORDER(NET_SKB_PAD, 0))
-#define IPA_ENDPOINT_STOP_RX_RETRIES 10
-
#define IPA_ENDPOINT_RESET_AGGR_RETRY_MAX 3
#define IPA_AGGR_TIME_LIMIT_DEFAULT 1000 /* microseconds */
@@ -1254,20 +1252,9 @@ static void ipa_endpoint_reset(struct ipa_endpoint *endpoint)
*/
int ipa_endpoint_stop(struct ipa_endpoint *endpoint)
{
- u32 retries = IPA_ENDPOINT_STOP_RX_RETRIES;
- int ret;
+ struct gsi *gsi = &endpoint->ipa->gsi;
- do {
- struct gsi *gsi = &endpoint->ipa->gsi;
-
- ret = gsi_channel_stop(gsi, endpoint->channel_id);
- if (ret != -EAGAIN || endpoint->toward_ipa)
- break;
-
- msleep(1);
- } while (retries--);
-
- return retries ? ret : -EIO;
+ return gsi_channel_stop(gsi, endpoint->channel_id);
}
static void ipa_endpoint_program(struct ipa_endpoint *endpoint)
--
2.20.1
Powered by blists - more mailing lists