diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2006-10-20 17:02:25 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2006-10-20 17:02:25 +0000 |
commit | 545aae114b48a08d38b0b01118c1fb180691c89d (patch) | |
tree | 165dd78174a0f272e28cb991b6b09f674fe4334d /sys/dev | |
parent | bc84703e9f93bdc102d3416a6939ea7e4a505b0e (diff) |
remove some NetBSD code.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/ne2000.c | 38 | ||||
-rw-r--r-- | sys/dev/isa/if_ec.c | 14 | ||||
-rw-r--r-- | sys/dev/isa/if_ne_isa.c | 9 | ||||
-rw-r--r-- | sys/dev/isa/if_ne_isapnp.c | 13 | ||||
-rw-r--r-- | sys/dev/isa/if_we.c | 18 | ||||
-rw-r--r-- | sys/dev/pci/if_ne_pci.c | 9 |
6 files changed, 6 insertions, 95 deletions
diff --git a/sys/dev/ic/ne2000.c b/sys/dev/ic/ne2000.c index b3749265533..9eb431fe411 100644 --- a/sys/dev/ic/ne2000.c +++ b/sys/dev/ic/ne2000.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ne2000.c,v 1.19 2006/10/20 16:54:01 brad Exp $ */ +/* $OpenBSD: ne2000.c,v 1.20 2006/10/20 17:02:24 brad Exp $ */ /* $NetBSD: ne2000.c,v 1.12 1998/06/10 01:15:50 thorpej Exp $ */ /*- @@ -67,12 +67,8 @@ #include <net/if_types.h> #include <net/if_media.h> -#ifdef __NetBSD__ -#include <net/if_ether.h> -#else #include <netinet/in.h> #include <netinet/if_ether.h> -#endif #include <machine/bus.h> @@ -266,13 +262,8 @@ ne2000_attach(struct ne2000_softc *nsc, u_int8_t *myea) ne2000_readmem(nict, nich, asict, asich, 0, romdata, sizeof(romdata), useword); for (i = 0; i < ETHER_ADDR_LEN; i++) -#ifdef __NetBSD__ - dsc->sc_enaddr[i] = - romdata[i * (useword ? 2 : 1)]; -#else dsc->sc_arpcom.ac_enaddr[i] = romdata[i * (useword ? 2 : 1)]; -#endif } } else bcopy(myea, dsc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN); @@ -553,15 +544,9 @@ ne2000_write_mbuf(struct dp8390_softc *sc, struct mbuf *m, int buf) */ savebyte[1] = *data++; l--; -#ifdef __NetBSD__ - bus_space_write_stream_2(asict, asich, - NE2000_ASIC_DATA, - *(u_int16_t *)savebyte); -#else bus_space_write_raw_multi_2(asict, asich, NE2000_ASIC_DATA, savebyte, 2); -#endif leftover = 0; } else if (ALIGNED_POINTER(data, u_int16_t) == 0) { @@ -580,14 +565,8 @@ ne2000_write_mbuf(struct dp8390_softc *sc, struct mbuf *m, int buf) */ leftover = l & 1; l &= ~1; -#ifdef __NetBSD__ - bus_space_write_multi_stream_2(asict, - asich, NE2000_ASIC_DATA, - (u_int16_t *)data, l >> 1); -#else bus_space_write_raw_multi_2(asict, asich, NE2000_ASIC_DATA, data, l); -#endif data += l; if (leftover) savebyte[0] = *data++; @@ -603,13 +582,8 @@ ne2000_write_mbuf(struct dp8390_softc *sc, struct mbuf *m, int buf) } if (leftover) { savebyte[1] = 0; -#ifdef __NetBSD__ - bus_space_write_stream_2(asict, asich, NE2000_ASIC_DATA, - *(u_int16_t *)savebyte); -#else bus_space_write_raw_multi_2(asict, asich, NE2000_ASIC_DATA, savebyte, 2); -#endif } } NIC_BARRIER(nict, nich); @@ -730,13 +704,8 @@ ne2000_readmem(bus_space_tag_t nict, bus_space_handle_t nich, ASIC_BARRIER(asict, asich); if (useword) -#ifdef __NetBSD__ - bus_space_read_multi_stream_2(asict, asich, NE2000_ASIC_DATA, - (u_int16_t *)dst, amount >> 1); -#else bus_space_read_raw_multi_2(asict, asich, NE2000_ASIC_DATA, dst, amount); -#endif else bus_space_read_multi_1(asict, asich, NE2000_ASIC_DATA, dst, amount); @@ -779,13 +748,8 @@ ne2000_writemem(bus_space_tag_t nict, bus_space_handle_t nich, ASIC_BARRIER(asict, asich); if (useword) -#ifdef __NetBSD__ - bus_space_write_multi_stream_2(asict, asich, NE2000_ASIC_DATA, - (u_int16_t *)src, len >> 1); -#else bus_space_write_raw_multi_2(asict, asich, NE2000_ASIC_DATA, src, len); -#endif else bus_space_write_multi_1(asict, asich, NE2000_ASIC_DATA, src, len); diff --git a/sys/dev/isa/if_ec.c b/sys/dev/isa/if_ec.c index 4ff37cf6260..02dda31b151 100644 --- a/sys/dev/isa/if_ec.c +++ b/sys/dev/isa/if_ec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ec.c,v 1.9 2006/10/20 16:54:01 brad Exp $ */ +/* $OpenBSD: if_ec.c,v 1.10 2006/10/20 17:02:24 brad Exp $ */ /* $NetBSD: if_ec.c,v 1.9 1998/07/05 06:49:12 jonathan Exp $ */ /*- @@ -69,20 +69,12 @@ #include <net/if_types.h> #include <net/if_media.h> -#ifdef __NetBSD__ -#include <net/if_ether.h> -#endif - #ifdef INET #include <netinet/in.h> #include <netinet/in_systm.h> #include <netinet/in_var.h> #include <netinet/ip.h> -#ifdef __NetBSD__ -#include <netinet/if_inarp.h> -#else #include <netinet/if_ether.h> -#endif #endif #if NBPFILTER > 0 @@ -349,11 +341,7 @@ ec_attach(struct device *parent, struct device *self, void *aux) ELINK2_CR_XSEL | ELINK2_CR_EALO); for (i = 0; i < ETHER_ADDR_LEN; i++) -#ifdef __NetBSD__ - sc->sc_enaddr[i] = NIC_GET(nict, nich, i); -#else sc->sc_arpcom.ac_enaddr[i] = NIC_GET(nict, nich, i); -#endif /* * Unmap PROM - select NIC registers. The proper setting of the diff --git a/sys/dev/isa/if_ne_isa.c b/sys/dev/isa/if_ne_isa.c index 25de93b76eb..3f41f4810da 100644 --- a/sys/dev/isa/if_ne_isa.c +++ b/sys/dev/isa/if_ne_isa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ne_isa.c,v 1.11 2006/10/20 16:54:01 brad Exp $ */ +/* $OpenBSD: if_ne_isa.c,v 1.12 2006/10/20 17:02:24 brad Exp $ */ /* $NetBSD: if_ne_isa.c,v 1.6 1998/07/05 06:49:13 jonathan Exp $ */ /*- @@ -52,9 +52,6 @@ #include <net/if.h> #include <net/if_dl.h> -#ifdef __NetBSD__ -#include <net/if_ether.h> -#endif #include <net/if_media.h> #ifdef INET @@ -62,12 +59,8 @@ #include <netinet/in_systm.h> #include <netinet/in_var.h> #include <netinet/ip.h> -#ifdef __NetBSD__ -#include <netinet/if_inarp.h> -#else #include <netinet/if_ether.h> #endif -#endif #if NBPFILTER > 0 #include <net/bpf.h> diff --git a/sys/dev/isa/if_ne_isapnp.c b/sys/dev/isa/if_ne_isapnp.c index 40a6083cbf1..524575b6d57 100644 --- a/sys/dev/isa/if_ne_isapnp.c +++ b/sys/dev/isa/if_ne_isapnp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ne_isapnp.c,v 1.10 2006/10/20 16:54:01 brad Exp $ */ +/* $OpenBSD: if_ne_isapnp.c,v 1.11 2006/10/20 17:02:24 brad Exp $ */ /* $NetBSD: if_ne_isapnp.c,v 1.7 1998/07/23 19:30:45 christos Exp $ */ /*- @@ -52,9 +52,6 @@ #include <net/if.h> #include <net/if_dl.h> -#ifdef __NetBSD__ -#include <net/if_ether.h> -#endif #include <net/if_media.h> #ifdef INET @@ -62,12 +59,8 @@ #include <netinet/in_systm.h> #include <netinet/in_var.h> #include <netinet/ip.h> -#ifdef __NetBSD__ -#include <netinet/if_inarp.h> -#else #include <netinet/if_ether.h> #endif -#endif #if NBPFILTER > 0 #include <net/bpf.h> @@ -88,10 +81,6 @@ #include <dev/isa/isavar.h> #include <dev/isa/isapnpreg.h> -#ifdef __NetBSD__ -#include <dev/isa/isapnpvar.h> -#include <dev/isa/isapnpdevs.h> -#endif static int ne_isapnp_match(struct device *, void *, void *); static void ne_isapnp_attach(struct device *, struct device *, void *); diff --git a/sys/dev/isa/if_we.c b/sys/dev/isa/if_we.c index 37fbe057787..2b63bea3042 100644 --- a/sys/dev/isa/if_we.c +++ b/sys/dev/isa/if_we.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_we.c,v 1.16 2006/10/20 16:54:01 brad Exp $ */ +/* $OpenBSD: if_we.c,v 1.17 2006/10/20 17:02:24 brad Exp $ */ /* $NetBSD: if_we.c,v 1.11 1998/07/05 06:49:14 jonathan Exp $ */ /*- @@ -71,20 +71,12 @@ #include <net/if_types.h> #include <net/if_media.h> -#ifdef __NetBSD__ -#include <net/if_ether.h> -#endif - #ifdef INET #include <netinet/in.h> #include <netinet/in_systm.h> #include <netinet/in_var.h> #include <netinet/ip.h> -#ifdef __NetBSD__ -#include <netinet/if_inarp.h> -#else #include <netinet/if_ether.h> -#endif #endif #if NBPFILTER > 0 @@ -137,13 +129,9 @@ struct cfattach we_isapnp_ca = { }; #endif /* NWE_ISAPNP */ -#ifdef __NetBSD__ -extern struct cfdriver we_cd; -#else struct cfdriver we_cd = { NULL, "we", DV_IFNET }; -#endif const char *we_params(bus_space_tag_t, bus_space_handle_t, u_int8_t *, bus_size_t *, int *, int *); @@ -431,12 +419,8 @@ we_attach(struct device *parent, struct device *self, void *aux) /* Get station address from EEPROM. */ for (i = 0; i < ETHER_ADDR_LEN; i++) -#ifdef __NetBSD__ - sc->sc_enaddr[i] = bus_space_read_1(asict, asich, WE_PROM + i); -#else sc->sc_arpcom.ac_enaddr[i] = bus_space_read_1(asict, asich, WE_PROM + i); -#endif /* * Set upper address bits and 8/16 bit access to shared memory. diff --git a/sys/dev/pci/if_ne_pci.c b/sys/dev/pci/if_ne_pci.c index b2ce0451a16..94858bd5958 100644 --- a/sys/dev/pci/if_ne_pci.c +++ b/sys/dev/pci/if_ne_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ne_pci.c,v 1.15 2006/10/20 16:54:01 brad Exp $ */ +/* $OpenBSD: if_ne_pci.c,v 1.16 2006/10/20 17:02:24 brad Exp $ */ /* $NetBSD: if_ne_pci.c,v 1.8 1998/07/05 00:51:24 jonathan Exp $ */ /*- @@ -48,19 +48,12 @@ #include <sys/device.h> #include <net/if.h> -#ifdef __NetBSD__ -#include <net/if_ether.h> -#endif #include <net/if_media.h> #ifdef INET #include <netinet/in.h> -#ifdef __NetBSD__ -#include <netinet/if_inarp.h> -#else #include <netinet/if_ether.h> #endif -#endif #include <machine/bus.h> #include <machine/intr.h> |