diff options
Diffstat (limited to 'sys/dev/pci/if_lmc_obsd.c')
-rw-r--r-- | sys/dev/pci/if_lmc_obsd.c | 87 |
1 files changed, 4 insertions, 83 deletions
diff --git a/sys/dev/pci/if_lmc_obsd.c b/sys/dev/pci/if_lmc_obsd.c index ab11e24ede2..6b73e56fa24 100644 --- a/sys/dev/pci/if_lmc_obsd.c +++ b/sys/dev/pci/if_lmc_obsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_lmc_obsd.c,v 1.18 2005/11/06 23:27:33 brad Exp $ */ +/* $OpenBSD: if_lmc_obsd.c,v 1.19 2005/11/07 00:29:21 brad Exp $ */ /* $NetBSD: if_lmc_nbsd.c,v 1.1 1999/03/25 03:32:43 explorer Exp $ */ /*- @@ -63,6 +63,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "bpfilter.h" + #include <sys/param.h> #include <sys/systm.h> #include <sys/mbuf.h> @@ -72,102 +74,30 @@ #include <sys/malloc.h> #include <sys/kernel.h> #include <sys/proc.h> /* only for declaration of wakeup() used by vm.h */ -#if defined(__FreeBSD__) -#include <machine/clock.h> -#elif defined(__bsdi__) || defined(__NetBSD__) || defined(__OpenBSD__) #include <sys/device.h> -#endif - -#if defined(__NetBSD__) -#include <dev/pci/pcidevs.h> -#include "rnd.h" -#if NRND > 0 -#include <sys/rnd.h> -#endif -#endif -#if defined(__OpenBSD__) #include <dev/pci/pcidevs.h> -#endif #include <net/if.h> #include <net/if_types.h> #include <net/if_dl.h> #include <net/netisr.h> -#include "bpfilter.h" #if NBPFILTER > 0 #include <net/bpf.h> #endif -#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) #include <net/if_sppp.h> -#endif - -#if defined(__bsdi__) -#if INET -#include <netinet/in.h> -#include <netinet/in_systm.h> -#include <netinet/ip.h> -#endif - -#include <net/netisr.h> -#include <net/if.h> -#include <net/netisr.h> -#include <net/if_types.h> -#include <net/if_p2p.h> -#include <net/if_c_hdlc.h> -#endif - -#if defined(__FreeBSD__) -#include <vm/pmap.h> -#include <pci.h> -#if NPCI > 0 -#include <pci/pcivar.h> -#include <pci/dc21040reg.h> -#define INCLUDE_PATH_PREFIX "pci/" -#endif -#endif /* __FreeBSD__ */ -#if defined(__bsdi__) -#include <i386/pci/ic/dc21040.h> -#include <i386/isa/isa.h> -#include <i386/isa/icu.h> -#include <i386/isa/dma.h> -#include <i386/isa/isavar.h> -#include <i386/pci/pci.h> - -#define INCLUDE_PATH_PREFIX "i386/pci/" -#endif /* __bsdi__ */ - -#if defined(__NetBSD__) || defined(__OpenBSD__) #include <machine/bus.h> -#if defined(__alpha__) && defined(__NetBSD__) -#include <machine/intr.h> -#endif + #include <dev/pci/pcireg.h> #include <dev/pci/pcivar.h> #include <dev/ic/dc21040reg.h> -#define INCLUDE_PATH_PREFIX "dev/pci/" -#endif /* __NetBSD__ */ -/* - * Sigh. Every OS puts these in different places. NetBSD and FreeBSD use - * a C preprocessor that allows this hack, but BSDI does not. Grr. - */ -#if defined(__NetBSD__) || defined(__FreeBSD__) -#include INCLUDE_PATH_PREFIX "if_lmc_types.h" -#include INCLUDE_PATH_PREFIX "if_lmcioctl.h" -#include INCLUDE_PATH_PREFIX "if_lmcvar.h" -#elif defined(__OpenBSD__) #include <dev/pci/if_lmc_types.h> #include <dev/pci/if_lmcioctl.h> #include <dev/pci/if_lmcvar.h> -#else /* BSDI */ -#include "i386/pci/if_lmctypes.h" -#include "i386/pci/if_lmcioctl.h" -#include "i386/pci/if_lmcvar.h" -#endif /* * This file is INCLUDED (gross, I know, but...) @@ -300,15 +230,11 @@ lmc_pci_attach(struct device * const parent, bus_space_handle_t ioh, memh; int ioh_valid, memh_valid; -#if defined(__NetBSD__) || defined(__OpenBSD__) - ioh_valid = (pci_mapreg_map(pa, PCI_CBIO, PCI_MAPREG_TYPE_IO, 0, &iot, &ioh, NULL, NULL, 0) == 0); memh_valid = (pci_mapreg_map(pa, PCI_CBMA, PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0, &memt, &memh, NULL, NULL, 0) == 0); -#endif - if (memh_valid) { sc->lmc_bustag = memt; @@ -363,13 +289,8 @@ lmc_pci_attach(struct device * const parent, } intrstr = pci_intr_string(pa->pa_pc, intrhandle); -#if defined(__OpenBSD__) sc->lmc_ih = pci_intr_establish(pa->pa_pc, intrhandle, IPL_NET, intr_rtn, sc, self->dv_xname); -#else - sc->lmc_ih = pci_intr_establish(pa->pa_pc, intrhandle, IPL_NET, - intr_rtn, sc); -#endif if (sc->lmc_ih == NULL) { printf("%s: couldn't establish interrupt", |