Skip to content

Commit

Permalink
net: ipa: don't retry in ipa_endpoint_stop()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alex Elder authored and David S. Miller committed May 7, 2020
1 parent c72ddf0 commit 9928fcc
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions drivers/net/ipa/ipa_endpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down Expand Up @@ -1282,20 +1280,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;

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--);
struct gsi *gsi = &endpoint->ipa->gsi;

return retries ? ret : -EIO;
return gsi_channel_stop(gsi, endpoint->channel_id);
}

static void ipa_endpoint_program(struct ipa_endpoint *endpoint)
Expand Down

0 comments on commit 9928fcc

Please sign in to comment.