cns3xxx: fix RX softIRQ loop

Already reschedule when 1 or more frames came in.

Checking for a full queue could produce a re-schedule loop as
the checked RX ring location could contain undefined values
depending on activity in previous loops.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
This commit is contained in:
Koen Vandeputte 2016-06-16 13:48:39 +02:00 committed by John Crispin
parent 137b1ac5e8
commit f532191c1c

View file

@ -717,8 +717,8 @@ static int eth_poll(struct napi_struct *napi, int budget)
enable_irq(sw->rx_irq);
budget = 0;
/* if rx descriptors are full schedule another poll */
if (rx_ring->desc[(i-1) & (RX_DESCS-1)].cown)
/* If 1 or more frames came in during IRQ enable, re-schedule */
if (rx_ring->desc[i].cown)
eth_schedule_poll(sw);
}