Commit d0ac30e7 authored by Alex Elder's avatar Alex Elder Committed by David S. Miller
Browse files

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: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6a606b90
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -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;