mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-21 09:23:51 +00:00
ibm emac: Don't call napi_complete if napi_reschedule failed
This patch fixes a bug which would trigger the BUG_ON() at net/core/dev.c:4156. It was found that this was due to continuing processing in the current poll call even when the call to napi_reschedule failed, indicating the device was already on the polling list. This resulted in an extra call to napi_complete which triggered the BUG_ON(). This patch ensures that we only contine processing rotting packets in the current mal_poll call if we are not already on the polling list. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ec9debbd9a
commit
b4dfd326c2
@ -442,15 +442,11 @@ static int mal_poll(struct napi_struct *napi, int budget)
|
|||||||
if (unlikely(mc->ops->peek_rx(mc->dev) ||
|
if (unlikely(mc->ops->peek_rx(mc->dev) ||
|
||||||
test_bit(MAL_COMMAC_RX_STOPPED, &mc->flags))) {
|
test_bit(MAL_COMMAC_RX_STOPPED, &mc->flags))) {
|
||||||
MAL_DBG2(mal, "rotting packet" NL);
|
MAL_DBG2(mal, "rotting packet" NL);
|
||||||
if (napi_reschedule(napi))
|
if (!napi_reschedule(napi))
|
||||||
mal_disable_eob_irq(mal);
|
|
||||||
else
|
|
||||||
MAL_DBG2(mal, "already in poll list" NL);
|
|
||||||
|
|
||||||
if (budget > 0)
|
|
||||||
goto again;
|
|
||||||
else
|
|
||||||
goto more_work;
|
goto more_work;
|
||||||
|
|
||||||
|
mal_disable_eob_irq(mal);
|
||||||
|
goto again;
|
||||||
}
|
}
|
||||||
mc->ops->poll_tx(mc->dev);
|
mc->ops->poll_tx(mc->dev);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user