diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-02-27 21:19:41 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-02-27 21:19:41 +0000 |
commit | a8c27f461f2da22691d78dd05aae528c95913945 (patch) | |
tree | bd3a05c8b754664f626d71c5d7a2bf9df1c8d53f /sys/dev/pci | |
parent | c403174e504b79911db37974e399576c3cedb86d (diff) |
Cut away some dead wood.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_cas.c | 21 | ||||
-rw-r--r-- | sys/dev/pci/if_casvar.h | 47 |
2 files changed, 5 insertions, 63 deletions
diff --git a/sys/dev/pci/if_cas.c b/sys/dev/pci/if_cas.c index 30d7dd79da4..bc578ca9afc 100644 --- a/sys/dev/pci/if_cas.c +++ b/sys/dev/pci/if_cas.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cas.c,v 1.3 2007/02/26 21:48:32 kettenis Exp $ */ +/* $OpenBSD: if_cas.c,v 1.4 2007/02/27 21:19:40 kettenis Exp $ */ /* * @@ -95,6 +95,7 @@ struct cfattach cas_ca = { sizeof(struct cas_softc), cas_match, cas_attach }; +void cas_config(struct cas_softc *); void cas_start(struct ifnet *); void cas_stop(struct ifnet *, int); int cas_ioctl(struct ifnet *, u_long, caddr_t); @@ -129,11 +130,11 @@ void cas_pcs_writereg(struct device *, int, int, int); int cas_mediachange(struct ifnet *); void cas_mediastatus(struct ifnet *, struct ifmediareq *); -struct mbuf *cas_get(struct cas_softc *, int, int); int cas_eint(struct cas_softc *, u_int); int cas_rint(struct cas_softc *); int cas_tint(struct cas_softc *, u_int32_t); int cas_pint(struct cas_softc *); +int cas_intr(void *); #ifdef CAS_DEBUG #define DPRINTF(sc, x) if ((sc)->sc_arpcom.ac_if.if_flags & IFF_DEBUG) \ @@ -394,7 +395,6 @@ cas_config(struct cas_softc *sc) goto fail_5; } - if ((error = bus_dmamap_load(sc->sc_dmatag, sc->sc_rxsoft[i].rxs_dmamap, kva, PAGE_SIZE, NULL, BUS_DMA_NOWAIT)) != 0) { @@ -402,7 +402,6 @@ cas_config(struct cas_softc *sc) "error = %d\n", sc->sc_dev.dv_xname, i, error); goto fail_5; } - sc->sc_rxsoft[i].rxs_mbuf = NULL; } /* @@ -640,19 +639,7 @@ cas_reset(struct cas_softc *sc) void cas_rxdrain(struct cas_softc *sc) { - struct cas_rxsoft *rxs; - int i; - - for (i = 0; i < CAS_NRXDESC; i++) { - rxs = &sc->sc_rxsoft[i]; - if (rxs->rxs_mbuf != NULL) { - bus_dmamap_sync(sc->sc_dmatag, rxs->rxs_dmamap, 0, - rxs->rxs_dmamap->dm_mapsize, BUS_DMASYNC_POSTREAD); - bus_dmamap_unload(sc->sc_dmatag, rxs->rxs_dmamap); - m_freem(rxs->rxs_mbuf); - rxs->rxs_mbuf = NULL; - } - } + /* Nothing to do yet. */ } /* diff --git a/sys/dev/pci/if_casvar.h b/sys/dev/pci/if_casvar.h index 07af295ad71..fbc1e07ce71 100644 --- a/sys/dev/pci/if_casvar.h +++ b/sys/dev/pci/if_casvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_casvar.h,v 1.2 2007/02/25 21:54:52 kettenis Exp $ */ +/* $OpenBSD: if_casvar.h,v 1.3 2007/02/27 21:19:40 kettenis Exp $ */ /* * @@ -102,33 +102,11 @@ struct cas_control_data { * Software state for receive jobs. */ struct cas_rxsoft { - struct mbuf *rxs_mbuf; /* head of our mbuf chain */ bus_dmamap_t rxs_dmamap; /* our DMA map */ bus_dma_segment_t rxs_dmaseg; /* our DMA segment */ caddr_t rxs_kva; }; - -/* - * Table which describes the transmit threshold mode. We generally - * start at index 0. Whenever we get a transmit underrun, we increment - * our index, falling back if we encounter the NULL terminator. - */ -struct cas_txthresh_tab { - u_int32_t txth_opmode; /* OPMODE bits */ - const char *txth_name; /* name of mode */ -}; - -/* - * Some misc. statics, useful for debugging. - */ -struct cas_stats { - u_long ts_tx_uf; /* transmit underflow errors */ - u_long ts_tx_to; /* transmit jabber timeouts */ - u_long ts_tx_ec; /* excessive collision count */ - u_long ts_tx_lc; /* late collision count */ -}; - /* * Software state per device. */ @@ -152,11 +130,6 @@ struct cas_softc { int sc_mif_config; /* Selected MII reg setting */ - void *sc_sdhook; /* shutdown hook */ - void *sc_powerhook; /* power management hook */ - - struct cas_stats sc_stats; /* debugging stats */ - /* * Ring buffer DMA stuff. */ @@ -181,14 +154,6 @@ struct cas_softc { #define sc_rxdescs sc_control_data->ccd_rxdescs #define sc_rxcomps sc_control_data->ccd_rxcomps - int sc_txfree; /* number of free Tx descriptors */ - int sc_txnext; /* next ready Tx descriptor */ - - u_int32_t sc_tdctl_ch; /* conditional desc chaining */ - u_int32_t sc_tdctl_er; /* conditional desc end-of-ring */ - - u_int32_t sc_setup_fsls; /* FS|LS on setup descriptor */ - int sc_rxptr; /* next ready RX descriptor/descsoft */ int sc_rxfifosize; int sc_rxdptr; @@ -262,14 +227,4 @@ do { \ CAS_CDRXSYNC((sc), (d), BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); \ } while (0) -#ifdef _KERNEL -int cas_mediachange(struct ifnet *); -void cas_mediastatus(struct ifnet *, struct ifmediareq *); - -void cas_config(struct cas_softc *); -void cas_reset(struct cas_softc *); -int cas_intr(void *); -#endif /* _KERNEL */ - - #endif |