Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/tsec/if_tsec.c
Show First 20 Lines • Show All 914 Lines • ▼ Show 20 Lines | if (cmd == POLL_AND_CHECK_STATUS) { | ||||
ie = TSEC_READ(sc, TSEC_REG_IEVENT); | ie = TSEC_READ(sc, TSEC_REG_IEVENT); | ||||
TSEC_WRITE(sc, TSEC_REG_IEVENT, ie); | TSEC_WRITE(sc, TSEC_REG_IEVENT, ie); | ||||
} | } | ||||
tsec_transmit_intr_locked(sc); | tsec_transmit_intr_locked(sc); | ||||
TSEC_GLOBAL_TO_RECEIVE_LOCK(sc); | TSEC_GLOBAL_TO_RECEIVE_LOCK(sc); | ||||
rx_npkts = tsec_receive_intr_locked(sc, count); | rx_npkts = NET_EPOCH_WRAP_RET(tsec_receive_intr_locked, (sc, count)); | ||||
TSEC_RECEIVE_UNLOCK(sc); | TSEC_RECEIVE_UNLOCK(sc); | ||||
return (rx_npkts); | return (rx_npkts); | ||||
} | } | ||||
#endif /* DEVICE_POLLING */ | #endif /* DEVICE_POLLING */ | ||||
static int | static int | ||||
▲ Show 20 Lines • Show All 490 Lines • ▼ Show 20 Lines | #ifdef DEVICE_POLLING | ||||
if (sc->tsec_ifp->if_capenable & IFCAP_POLLING) { | if (sc->tsec_ifp->if_capenable & IFCAP_POLLING) { | ||||
TSEC_RECEIVE_UNLOCK(sc); | TSEC_RECEIVE_UNLOCK(sc); | ||||
return; | return; | ||||
} | } | ||||
#endif | #endif | ||||
/* Confirm the interrupt was received by driver */ | /* Confirm the interrupt was received by driver */ | ||||
TSEC_WRITE(sc, TSEC_REG_IEVENT, TSEC_IEVENT_RXB | TSEC_IEVENT_RXF); | TSEC_WRITE(sc, TSEC_REG_IEVENT, TSEC_IEVENT_RXB | TSEC_IEVENT_RXF); | ||||
tsec_receive_intr_locked(sc, -1); | NET_EPOCH_WRAP(tsec_receive_intr_locked, (sc, -1)); | ||||
TSEC_RECEIVE_UNLOCK(sc); | TSEC_RECEIVE_UNLOCK(sc); | ||||
} | } | ||||
static void | static void | ||||
tsec_transmit_intr_locked(struct tsec_softc *sc) | tsec_transmit_intr_locked(struct tsec_softc *sc) | ||||
{ | { | ||||
struct ifnet *ifp; | struct ifnet *ifp; | ||||
▲ Show 20 Lines • Show All 498 Lines • Show Last 20 Lines |