Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/cp/if_cp.c
Show First 20 Lines • Show All 269 Lines • ▼ Show 20 Lines | static void cp_led_off (void *arg) | ||||
splx (s); | splx (s); | ||||
} | } | ||||
static void cp_intr (void *arg) | static void cp_intr (void *arg) | ||||
{ | { | ||||
bdrv_t *bd = arg; | bdrv_t *bd = arg; | ||||
cp_board_t *b = bd->board; | cp_board_t *b = bd->board; | ||||
#ifndef NETGRAPH | #ifndef NETGRAPH | ||||
struct epoch_tracker et; | |||||
int i; | int i; | ||||
#endif | #endif | ||||
int s = splimp (); | int s = splimp (); | ||||
if (cp_destroy) { | if (cp_destroy) { | ||||
splx (s); | splx (s); | ||||
return; | return; | ||||
} | } | ||||
CP_LOCK (bd); | CP_LOCK (bd); | ||||
Show All 10 Lines | #endif | ||||
cp_interrupt (b); | cp_interrupt (b); | ||||
/* Turn LED off 50 msec later. */ | /* Turn LED off 50 msec later. */ | ||||
callout_reset (&led_timo[b->num], hz/20, cp_led_off, b); | callout_reset (&led_timo[b->num], hz/20, cp_led_off, b); | ||||
CP_UNLOCK (bd); | CP_UNLOCK (bd); | ||||
splx (s); | splx (s); | ||||
#ifndef NETGRAPH | #ifndef NETGRAPH | ||||
NET_EPOCH_ENTER(et); | |||||
/* Pass packets in a lock-free state */ | /* Pass packets in a lock-free state */ | ||||
for (i = 0; i < NCHAN && b->chan[i].type; i++) { | for (i = 0; i < NCHAN && b->chan[i].type; i++) { | ||||
drv_t *d = b->chan[i].sys; | drv_t *d = b->chan[i].sys; | ||||
struct mbuf *m; | struct mbuf *m; | ||||
if (!d || !d->running) | if (!d || !d->running) | ||||
continue; | continue; | ||||
while (_IF_QLEN(&d->queue)) { | while (_IF_QLEN(&d->queue)) { | ||||
IF_DEQUEUE (&d->queue,m); | IF_DEQUEUE (&d->queue,m); | ||||
if (!m) | if (!m) | ||||
continue; | continue; | ||||
sppp_input (d->ifp, m); | sppp_input (d->ifp, m); | ||||
} | } | ||||
} | } | ||||
NET_EPOCH_EXIT(et); | |||||
#endif | #endif | ||||
} | } | ||||
static void | static void | ||||
cp_bus_dmamap_addr (void *arg, bus_dma_segment_t *segs, int nseg, int error) | cp_bus_dmamap_addr (void *arg, bus_dma_segment_t *segs, int nseg, int error) | ||||
{ | { | ||||
unsigned long *addr; | unsigned long *addr; | ||||
▲ Show 20 Lines • Show All 1,945 Lines • Show Last 20 Lines |