diff options
author | yongari <yongari@FreeBSD.org> | 2008-07-28 02:37:15 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2008-07-28 02:37:15 +0000 |
commit | d499ae85228790db40a63455c62071c7505a6f34 (patch) | |
tree | c5057ccaee42cc7cfdccc58f3df08d09bb8419a6 /sys/dev | |
parent | bcd09d8c858aeed6161450a2b75037304d25ae33 (diff) | |
download | FreeBSD-src-d499ae85228790db40a63455c62071c7505a6f34.zip FreeBSD-src-d499ae85228790db40a63455c62071c7505a6f34.tar.gz |
Fix buffer discard index.
While I'm here dicard all buffers if errored frame is part of
multi-segmented frames.
Pointed out by: sephe
Reviewd by: sephe
MFC after: 3 days
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/jme/if_jme.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/jme/if_jme.c b/sys/dev/jme/if_jme.c index 25e5528..0c483c1 100644 --- a/sys/dev/jme/if_jme.c +++ b/sys/dev/jme/if_jme.c @@ -2346,7 +2346,10 @@ jme_rxeof(struct jme_softc *sc) if (jme_newbuf(sc, rxd) != 0) { ifp->if_iqdrops++; /* Reuse buffer. */ - jme_discard_rxbuf(sc, sc->jme_cdata.jme_rx_cons); + for (; count < nsegs; count++) { + jme_discard_rxbuf(sc, cons); + JME_DESC_INC(cons, JME_RX_RING_CNT); + } if (sc->jme_cdata.jme_rxhead != NULL) { m_freem(sc->jme_cdata.jme_rxhead); JME_RXCHAIN_RESET(sc); |