version 1.17.6.4, 2016/07/09 20:24:55 |
version 1.17.6.5, 2017/02/05 13:40:17 |
Line 246 smap_attach(struct device *parent, struc |
|
Line 246 smap_attach(struct device *parent, struc |
|
} |
} |
|
|
if_attach(ifp); |
if_attach(ifp); |
|
if_deferred_start_init(ifp, NULL); |
ether_ifattach(ifp, emac3->eaddr); |
ether_ifattach(ifp, emac3->eaddr); |
|
|
spd_intr_establish(SPD_NIC, smap_intr, sc); |
spd_intr_establish(SPD_NIC, smap_intr, sc); |
Line 321 smap_intr(void *arg) |
|
Line 322 smap_intr(void *arg) |
|
|
|
/* if transmission is pending, start here */ |
/* if transmission is pending, start here */ |
ifp = &sc->ethercom.ec_if; |
ifp = &sc->ethercom.ec_if; |
if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) |
if_schedule_deferred_start(ifp); |
smap_start(ifp); |
|
rnd_add_uint32(&sc->rnd_source, cause | sc->tx_fifo_ptr << 16); |
rnd_add_uint32(&sc->rnd_source, cause | sc->tx_fifo_ptr << 16); |
|
|
return (1); |
return (1); |
Line 394 smap_rxeof(void *arg) |
|
Line 394 smap_rxeof(void *arg) |
|
memcpy(mtod(m, void *), (void *)sc->rx_buf, sz); |
memcpy(mtod(m, void *), (void *)sc->rx_buf, sz); |
|
|
next_packet: |
next_packet: |
ifp->if_ipackets++; |
|
|
|
_reg_write_1(SMAP_RXFIFO_FRAME_DEC_REG8, 1); |
_reg_write_1(SMAP_RXFIFO_FRAME_DEC_REG8, 1); |
|
|
/* free descriptor */ |
/* free descriptor */ |
Line 404 smap_rxeof(void *arg) |
|
Line 402 smap_rxeof(void *arg) |
|
d->stat = SMAP_RXDESC_EMPTY; |
d->stat = SMAP_RXDESC_EMPTY; |
_wbflush(); |
_wbflush(); |
|
|
if (m != NULL) { |
if (m != NULL) |
if (ifp->if_bpf) |
|
bpf_mtap(ifp, m); |
|
if_percpuq_enqueue(ifp->if_percpuq, m); |
if_percpuq_enqueue(ifp->if_percpuq, m); |
} |
|
} |
} |
sc->rx_done_index = i; |
sc->rx_done_index = i; |
|
|