Be sure to actually decrement the "count" parameter for each processed

descriptor so that we return when the threshold has been reached.

Reviewed by:	yongari
MFC after:	1 week
This commit is contained in:
Mark Johnston 2013-06-17 22:59:47 +00:00
parent a8edf79550
commit 0203558fe6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=251872

View File

@ -2478,7 +2478,7 @@ age_rxintr(struct age_softc *sc, int rr_prod, int count)
sc->age_cdata.age_rx_ring_map, BUS_DMASYNC_POSTWRITE);
for (prog = 0; rr_cons != rr_prod; prog++) {
if (count <= 0)
if (count-- <= 0)
break;
rxrd = &sc->age_rdata.age_rr_ring[rr_cons];
nsegs = AGE_RX_NSEGS(le32toh(rxrd->index));