diff options
Diffstat (limited to 'sys/dev/vge/if_vge.c')
-rw-r--r-- | sys/dev/vge/if_vge.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/dev/vge/if_vge.c b/sys/dev/vge/if_vge.c index 5a56eb1..b9eaeaa 100644 --- a/sys/dev/vge/if_vge.c +++ b/sys/dev/vge/if_vge.c @@ -156,7 +156,7 @@ static int vge_tx_list_init (struct vge_softc *); static __inline void vge_fixup_rx (struct mbuf *); #endif -static void vge_rxeof (struct vge_softc *); +static int vge_rxeof (struct vge_softc *); static void vge_txeof (struct vge_softc *); static void vge_intr (void *); static void vge_tick (void *); @@ -1295,7 +1295,7 @@ vge_fixup_rx(m) * RX handler. We support the reception of jumbo frames that have * been fragmented across multiple 2K mbuf cluster buffers. */ -static void +static int vge_rxeof(sc) struct vge_softc *sc; { @@ -1482,7 +1482,7 @@ vge_rxeof(sc) CSR_WRITE_2(sc, VGE_RXDESC_RESIDUECNT, lim); - return; + return (lim); } static void @@ -1582,17 +1582,18 @@ vge_tick(xsc) } #ifdef DEVICE_POLLING -static void +static int vge_poll (struct ifnet *ifp, enum poll_cmd cmd, int count) { struct vge_softc *sc = ifp->if_softc; + int rx_npkts = 0; VGE_LOCK(sc); if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) goto done; sc->rxcycles = count; - vge_rxeof(sc); + rx_npkts = vge_rxeof(sc); vge_txeof(sc); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) @@ -1623,6 +1624,7 @@ vge_poll (struct ifnet *ifp, enum poll_cmd cmd, int count) } done: VGE_UNLOCK(sc); + return (rx_npkts); } #endif /* DEVICE_POLLING */ |