diff options
| author | Pyun YongHyeon <yongari@FreeBSD.org> | 2011-05-06 23:01:29 +0000 |
|---|---|---|
| committer | Pyun YongHyeon <yongari@FreeBSD.org> | 2011-05-06 23:01:29 +0000 |
| commit | 5a13764b11a2610342ced791a997564c6c8b31a5 (patch) | |
| tree | bbfdf853e0c68716e118778b28e0c00bdc0da9fe /sys/dev/xl | |
| parent | 74517b0724fad85cc153119335ae40c3a2d59bc0 (diff) | |
Notes
Diffstat (limited to 'sys/dev/xl')
| -rw-r--r-- | sys/dev/xl/if_xl.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/dev/xl/if_xl.c b/sys/dev/xl/if_xl.c index 15438a59cfc1d..e9384f886a3c9 100644 --- a/sys/dev/xl/if_xl.c +++ b/sys/dev/xl/if_xl.c @@ -1944,7 +1944,7 @@ xl_rxeof(struct xl_softc *sc) struct mbuf *m; struct ifnet *ifp = sc->xl_ifp; struct xl_chain_onefrag *cur_rx; - int total_len = 0; + int total_len; int rx_npkts = 0; u_int32_t rxstat; @@ -1963,6 +1963,7 @@ again: cur_rx = sc->xl_cdata.xl_rx_head; sc->xl_cdata.xl_rx_head = cur_rx->xl_next; total_len = rxstat & XL_RXSTAT_LENMASK; + rx_npkts++; /* * Since we have told the chip to allow large frames, @@ -2047,7 +2048,6 @@ again: XL_UNLOCK(sc); (*ifp->if_input)(ifp, m); XL_LOCK(sc); - rx_npkts++; /* * If we are running from the taskqueue, the interface @@ -2283,11 +2283,7 @@ xl_intr(void *arg) break; if (status & XL_STAT_UP_COMPLETE) { - int curpkts; - - curpkts = ifp->if_ipackets; - xl_rxeof(sc); - if (curpkts == ifp->if_ipackets) { + if (xl_rxeof(sc) == 0) { while (xl_rx_resync(sc)) xl_rxeof(sc); } |
