diff options
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/if_de.c | 29 | ||||
-rw-r--r-- | sys/pci/if_devar.h | 12 |
2 files changed, 9 insertions, 32 deletions
diff --git a/sys/pci/if_de.c b/sys/pci/if_de.c index 2fdf901..0ea5813 100644 --- a/sys/pci/if_de.c +++ b/sys/pci/if_de.c @@ -1,5 +1,5 @@ /* $NetBSD: if_de.c,v 1.86 1999/06/01 19:17:59 thorpej Exp $ */ -/* $Id: if_de.c,v 1.108 1999/07/06 19:23:23 des Exp $ */ +/* $Id: if_de.c,v 1.109 1999/08/09 12:29:29 peter Exp $ */ /*- * Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com) @@ -58,19 +58,9 @@ #endif #if defined(__FreeBSD__) -/* In case somebody is trying to run this on an older 2.2 or 3.0 */ -#ifndef __FreeBSD_version /* defined in sys/param.h on current code */ -#if __FreeBSD__ >= 3 -#define __FreeBSD_version 300000 -#else -#define __FreeBSD_version 200000 -#endif -#endif -#if __FreeBSD_version >= 300000 #include "opt_inet.h" #include "opt_ipx.h" #endif -#endif #if defined(__NetBSD__) #include "rnd.h" @@ -3113,7 +3103,7 @@ static void tulip_addr_filter( tulip_softc_t * const sc) { -#if defined(__FreeBSD__) && __FreeBSD_version >= 300000 +#if defined(__FreeBSD__) struct ifmultiaddr *ifma; u_char *addrp; #else @@ -3131,7 +3121,7 @@ tulip_addr_filter( sc->tulip_flags |= TULIP_ALLMULTI ; #endif -#if defined(__FreeBSD__) && __FreeBSD_version >= 300000 +#if defined(__FreeBSD__) multicnt = 0; for (ifma = sc->tulip_if.if_multiaddrs.lh_first; ifma != NULL; ifma = ifma->ifma_link.le_next) { @@ -3165,7 +3155,7 @@ tulip_addr_filter( */ bzero(sc->tulip_setupdata, sizeof(sc->tulip_setupdata)); -#if defined(__FreeBSD__) && __FreeBSD_version >= 300000 +#if defined(__FreeBSD__) for (ifma = sc->tulip_if.if_multiaddrs.lh_first; ifma != NULL; ifma = ifma->ifma_link.le_next) { @@ -3231,7 +3221,7 @@ tulip_addr_filter( /* * Else can get perfect filtering for 16 addresses. */ -#if defined(__FreeBSD__) && __FreeBSD_version >= 300000 +#if defined(__FreeBSD__) for (ifma = sc->tulip_if.if_multiaddrs.lh_first; ifma != NULL; ifma = ifma->ifma_link.le_next) { if (ifma->ifma_addr->sa_family != AF_LINK) @@ -4874,7 +4864,7 @@ tulip_ifioctl( /* * Update multicast listeners */ -#if defined(__FreeBSD__) && __FreeBSD_version >= 300000 +#if defined(__FreeBSD__) tulip_addr_filter(sc); /* reset multicast filtering */ tulip_init(sc); error = 0; @@ -5185,7 +5175,7 @@ tulip_attach( TULIP_ETHER_IFATTACH(sc); #else if_attach(ifp); -#if defined(__FreeBSD__) && __FreeBSD_version >= 300000 +#if defined(__FreeBSD__) ifp->if_snd.ifq_maxlen = ifqmaxlen; #endif #if defined(__NetBSD__) || (defined(__FreeBSD__) && BSD >= 199506) @@ -5653,13 +5643,8 @@ tulip_pci_attach( tulip_softc_t *sc; #define PCI_CONF_WRITE(r, v) pci_conf_write(config_id, (r), (v)) #define PCI_CONF_READ(r) pci_conf_read(config_id, (r)) -#if __FreeBSD_version >= 300000 #define PCI_GETBUSDEVINFO(sc) ((void)((sc)->tulip_pci_busno = (config_id->bus), /* XXX */ \ (sc)->tulip_pci_devno = (config_id->slot))) /* XXX */ -#else -#define PCI_GETBUSDEVINFO(sc) ((void)((sc)->tulip_pci_busno = ((config_id.cfg1 >> 16) & 0xFF), /* XXX */ \ - (sc)->tulip_pci_devno = ((config_id.cfg1 >> 11) & 0x1F))) /* XXX */ -#endif #endif #if defined(__bsdi__) tulip_softc_t * const sc = (tulip_softc_t *) self; diff --git a/sys/pci/if_devar.h b/sys/pci/if_devar.h index 6708e37..1af0fa9 100644 --- a/sys/pci/if_devar.h +++ b/sys/pci/if_devar.h @@ -1,5 +1,5 @@ /* $NetBSD: if_devar.h,v 1.32 1999/04/01 14:55:25 tsubai Exp $ */ -/* $Id: if_devar.h,v 1.14 1999/07/06 19:23:25 des Exp $ */ +/* $Id: if_devar.h,v 1.15 1999/08/08 19:56:06 peter Exp $ */ /*- * Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com) @@ -62,12 +62,8 @@ typedef bus_addr_t tulip_csrptr_t; #define TULIP_PCI_CSRSIZE 8 #define TULIP_PCI_CSROFFSET 0 -#if !defined(__FreeBSD__) || __FreeBSD_version < 300000 -typedef u_long uintptr_t; -#endif - #if !defined(__NetBSD__) -#if defined(__FreeBSD__) && __FreeBSD_version >= 300000 +#if defined(__FreeBSD__) typedef pci_port_t tulip_csrptr_t; #else typedef u_int16_t tulip_csrptr_t; @@ -951,11 +947,7 @@ static void tulip_softintr(void); #if defined(__FreeBSD__) typedef void ifnet_ret_t; -#if __FreeBSD_version >= 300000 typedef u_long ioctl_cmd_t; -#else -typedef int ioctl_cmd_t; -#endif #if defined(TULIP_HDR_DATA) static tulip_softc_t *tulips[TULIP_MAX_DEVICES]; #endif |