diff options
author | hm <hm@FreeBSD.org> | 2001-01-15 14:54:43 +0000 |
---|---|---|
committer | hm <hm@FreeBSD.org> | 2001-01-15 14:54:43 +0000 |
commit | a4ef9041cb78f9b9d0641fd751c19b431496cd8e (patch) | |
tree | cc90bbc6f60312809de9f9bd2e361e6365eb7cf2 /sys/i4b/layer1/ifpi | |
parent | 6948230af2a0bf85cd447c1124448c8b3758cee4 (diff) | |
download | FreeBSD-src-a4ef9041cb78f9b9d0641fd751c19b431496cd8e.zip FreeBSD-src-a4ef9041cb78f9b9d0641fd751c19b431496cd8e.tar.gz |
Reenable support for FreeBSD 4.x and possibly the other supported BSD's
Diffstat (limited to 'sys/i4b/layer1/ifpi')
-rw-r--r-- | sys/i4b/layer1/ifpi/i4b_ifpi_pci.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/i4b/layer1/ifpi/i4b_ifpi_pci.c b/sys/i4b/layer1/ifpi/i4b_ifpi_pci.c index 06f8d9d..d14deb4 100644 --- a/sys/i4b/layer1/ifpi/i4b_ifpi_pci.c +++ b/sys/i4b/layer1/ifpi/i4b_ifpi_pci.c @@ -37,7 +37,7 @@ * * $FreeBSD$ * - * last edit-date: [Fri Jun 2 13:58:02 2000] + * last edit-date: [Fri Jan 12 17:01:26 2001] * *---------------------------------------------------------------------------*/ @@ -648,6 +648,7 @@ avma1pp_attach_avma1pp(device_t dev) /* init the ISAC */ ifpi_isac_init(sc); +#if defined (__FreeBSD__) && __FreeBSD__ > 4 /* Init the channel mutexes */ chan = &sc->sc_chan[HSCX_CH_A]; mtx_init(&chan->rx_queue.ifq_mtx, "i4b_avma1pp_rx", MTX_DEF); @@ -655,6 +656,7 @@ avma1pp_attach_avma1pp(device_t dev) chan = &sc->sc_chan[HSCX_CH_B]; mtx_init(&chan->rx_queue.ifq_mtx, "i4b_avma1pp_rx", MTX_DEF); mtx_init(&chan->tx_queue.ifq_mtx, "i4b_avma1pp_tx", MTX_DEF); +#endif /* init the "HSCX" */ avma1pp_bchannel_setup(sc->sc_unit, HSCX_CH_A, BPROT_NONE, 0); @@ -872,8 +874,18 @@ avma1pp_hscx_intr(int h_chan, u_int stat, struct l1_softc *sc) /* move rx'd data to rx queue */ +#if defined (__FreeBSD__) && __FreeBSD__ > 4 (void) IF_HANDOFF(&chan->rx_queue, chan->in_mbuf, NULL); - +#else + if(!(IF_QFULL(&chan->rx_queue))) + { + IF_ENQUEUE(&chan->rx_queue, chan->in_mbuf); + } + else + { + i4b_Bfreembuf(chan->in_mbuf); + } +#endif /* signal upper layer that data are available */ (*chan->isic_drvr_linktab->bch_rx_data_ready)(chan->isic_drvr_linktab->unit); |