linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Elder <elder@linaro.org>
To: davem@davemloft.net
Cc: evgreen@chromium.org, subashab@codeaurora.org,
	cpratapa@codeaurora.org, bjorn.andersson@linaro.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH net-next 3/5] net: ipa: don't retry in ipa_endpoint_stop()
Date: Mon,  4 May 2020 18:53:43 -0500	[thread overview]
Message-ID: <20200504235345.17118-4-elder@linaro.org> (raw)
In-Reply-To: <20200504235345.17118-1-elder@linaro.org>

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@linaro.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


  parent reply	other threads:[~2020-05-04 23:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 23:53 [PATCH net-next 0/5] net: ipa: kill endpoint stop workaround Alex Elder
2020-05-04 23:53 ` [PATCH net-next 1/5] net: ipa: fix a bug in ipa_endpoint_stop() Alex Elder
2020-05-04 23:53 ` [PATCH net-next 2/5] net: ipa: get rid of workaround " Alex Elder
2020-05-04 23:53 ` Alex Elder [this message]
2020-05-04 23:53 ` [PATCH net-next 4/5] net: ipa: kill ipa_endpoint_stop() Alex Elder
2020-05-04 23:53 ` [PATCH net-next 5/5] net: ipa: kill ipa_cmd_dma_task_32b_addr_add() Alex Elder
2020-05-07  0:42 ` [PATCH net-next 0/5] net: ipa: kill endpoint stop workaround David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200504235345.17118-4-elder@linaro.org \
    --to=elder@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=cpratapa@codeaurora.org \
    --cc=davem@davemloft.net \
    --cc=evgreen@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=subashab@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).