aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ipa
diff options
context:
space:
mode:
authorAlex Elder2022-02-03 11:09:23 -0600
committerDavid S. Miller2022-02-04 10:16:08 +0000
commitd0ac30e74ea096d2e2fd4e6ebce1113b8b8e8ada (patch)
tree1f1ae01948e1f4e78183a4ee6183ba0bd9347e43 /drivers/net/ipa
parent6a606b90153b821915daade0b8f253d01d443d75 (diff)
net: ipa: don't use replenish_backlog
Rather than determining when to stop replenishing using the replenish backlog, just stop when we have exhausted all available transactions. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipa')
-rw-r--r--drivers/net/ipa/ipa_endpoint.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ipa/ipa_endpoint.c b/drivers/net/ipa/ipa_endpoint.c
index f5367b902c27..fba8728ce12e 100644
--- a/drivers/net/ipa/ipa_endpoint.c
+++ b/drivers/net/ipa/ipa_endpoint.c
@@ -1087,11 +1087,8 @@ static void ipa_endpoint_replenish(struct ipa_endpoint *endpoint)
if (test_and_set_bit(IPA_REPLENISH_ACTIVE, endpoint->replenish_flags))
return;
- while (atomic_dec_not_zero(&endpoint->replenish_backlog)) {
- trans = ipa_endpoint_trans_alloc(endpoint, 1);
- if (!trans)
- break;
-
+ while ((trans = ipa_endpoint_trans_alloc(endpoint, 1))) {
+ WARN_ON(!atomic_dec_not_zero(&endpoint->replenish_backlog));
if (ipa_endpoint_replenish_one(endpoint, trans))
goto try_again_later;