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
This commit is contained in:
Pyun YongHyeon 2008-07-28 02:37:15 +00:00
parent 62187b4142
commit 43742818e3

View File

@ -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);