Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d1a6333 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

ibm/emac: use napi_complete_done()



Use napi_complete_done() instead of __napi_complete()

We plan to remove __napi_complete() to reduce NAPI complexity.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0eb7b85c
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -421,20 +421,20 @@ static int mal_poll(struct napi_struct *napi, int budget)
		int n;
		if (unlikely(test_bit(MAL_COMMAC_POLL_DISABLED, &mc->flags)))
			continue;
		n = mc->ops->poll_rx(mc->dev, budget);
		n = mc->ops->poll_rx(mc->dev, budget - received);
		if (n) {
			received += n;
			budget -= n;
			if (budget <= 0)
				goto more_work; // XXX What if this is the last one ?
			if (received >= budget)
				return budget;
		}
	}

	if (napi_complete_done(napi, received)) {
		/* We need to disable IRQs to protect from RXDE IRQ here */
		spin_lock_irqsave(&mal->lock, flags);
	__napi_complete(napi);
		mal_enable_eob_irq(mal);
		spin_unlock_irqrestore(&mal->lock, flags);
	}

	/* Check for "rotting" packet(s) */
	list_for_each(l, &mal->poll_list) {