Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/rt/if_rt.c
Show First 20 Lines • Show All 1,695 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
/* | /* | ||||
* rt_rx_done_task - run RX task | * rt_rx_done_task - run RX task | ||||
*/ | */ | ||||
static void | static void | ||||
rt_rx_done_task(void *context, int pending) | rt_rx_done_task(void *context, int pending) | ||||
{ | { | ||||
struct epoch_tracker et; | |||||
struct rt_softc *sc; | struct rt_softc *sc; | ||||
struct ifnet *ifp; | struct ifnet *ifp; | ||||
int again; | int again; | ||||
sc = context; | sc = context; | ||||
ifp = sc->ifp; | ifp = sc->ifp; | ||||
RT_DPRINTF(sc, RT_DEBUG_RX, "Rx done task\n"); | RT_DPRINTF(sc, RT_DEBUG_RX, "Rx done task\n"); | ||||
if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) | if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) | ||||
return; | return; | ||||
sc->intr_pending_mask &= ~sc->int_rx_done_mask; | sc->intr_pending_mask &= ~sc->int_rx_done_mask; | ||||
NET_EPOCH_ENTER(et); | |||||
again = rt_rx_eof(sc, &sc->rx_ring[0], sc->rx_process_limit); | again = rt_rx_eof(sc, &sc->rx_ring[0], sc->rx_process_limit); | ||||
NET_EPOCH_EXIT(et); | |||||
RT_SOFTC_LOCK(sc); | RT_SOFTC_LOCK(sc); | ||||
if ((sc->intr_pending_mask & sc->int_rx_done_mask) || again) { | if ((sc->intr_pending_mask & sc->int_rx_done_mask) || again) { | ||||
RT_DPRINTF(sc, RT_DEBUG_RX, | RT_DPRINTF(sc, RT_DEBUG_RX, | ||||
"Rx done task: scheduling again\n"); | "Rx done task: scheduling again\n"); | ||||
taskqueue_enqueue(sc->taskqueue, &sc->rx_done_task); | taskqueue_enqueue(sc->taskqueue, &sc->rx_done_task); | ||||
} else { | } else { | ||||
▲ Show 20 Lines • Show All 1,224 Lines • Show Last 20 Lines |