diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-05-20 04:22:18 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-05-20 04:22:18 +0000 |
commit | 9aab032bb6259fe17aef092a2c20152fc214a7c0 (patch) | |
tree | 17697d198b64a9da1897e134f8ea0f6372105368 | |
parent | 4d97d480aef4421f7fc662f6a2cb110020c0fa36 (diff) |
an@isapnp w/ the isa card millert gave me shitloads of metric ages ago
-rw-r--r-- | sys/arch/i386/conf/GENERIC | 3 | ||||
-rw-r--r-- | sys/dev/isa/files.isapnp | 5 | ||||
-rw-r--r-- | sys/dev/isa/if_an_isapnp.c | 89 | ||||
-rw-r--r-- | sys/dev/isa/pnpdevs | 3 |
4 files changed, 97 insertions, 3 deletions
diff --git a/sys/arch/i386/conf/GENERIC b/sys/arch/i386/conf/GENERIC index 1769538d06f..3fb2d3f3279 100644 --- a/sys/arch/i386/conf/GENERIC +++ b/sys/arch/i386/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.338 2003/05/20 03:40:57 tedu Exp $ +# $OpenBSD: GENERIC,v 1.339 2003/05/20 04:22:17 mickey Exp $ # $NetBSD: GENERIC,v 1.48 1996/05/20 18:17:23 mrg Exp $ # # GENERIC -- everything that's currently supported @@ -389,6 +389,7 @@ wi* at pci? dev ? function ? # WaveLAN IEEE 802.11DS wi* at pcmcia? function ? # WaveLAN IEEE 802.11DS #awi* at pcmcia? function ? # Bay Networks IEEE 802.11FH an* at pci? dev ? function ? # Aironet IEEE 802.11DS +an* at isapnp? # Aironet IEEE 802.11DS an* at pcmcia? function ? # Aironet IEEE 802.11DS #cnw* at pcmcia? function ? # Xircom Netwave ray* at pcmcia? function ? # Raylink Aviator2.4/Pro 802.11FH diff --git a/sys/dev/isa/files.isapnp b/sys/dev/isa/files.isapnp index f2797823959..7c69361ad32 100644 --- a/sys/dev/isa/files.isapnp +++ b/sys/dev/isa/files.isapnp @@ -1,4 +1,4 @@ -# $OpenBSD: files.isapnp,v 1.26 2002/11/28 23:24:53 mickey Exp $ +# $OpenBSD: files.isapnp,v 1.27 2003/05/20 04:22:17 mickey Exp $ # $NetBSD: files.isapnp,v 1.7 1997/10/16 17:16:36 matt Exp $ # # Config file and device description for machine-independent ISAPnP code. @@ -42,6 +42,9 @@ attach gus at isapnp with gus_isapnp file dev/isa/gus_isapnp.c gus_isapnp needs-flag +attach an at isapnp with an_isapnp +file dev/isa/if_an_isapnp.c an_isapnp + attach le at isapnp with le_isapnp file dev/isa/if_le_isapnp.c le_isapnp diff --git a/sys/dev/isa/if_an_isapnp.c b/sys/dev/isa/if_an_isapnp.c new file mode 100644 index 00000000000..aee9fd66387 --- /dev/null +++ b/sys/dev/isa/if_an_isapnp.c @@ -0,0 +1,89 @@ +/* $OpenBSD: if_an_isapnp.c,v 1.1 2003/05/20 04:22:17 mickey Exp $ */ + +/* + * Copyright (c) 2003 Michael Shalayeff + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Michael Shalayeff. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include <sys/param.h> +#include <sys/systm.h> +#include <sys/device.h> +#include <sys/timeout.h> +#include <sys/socket.h> + +#include <net/if.h> +#include <net/if_dl.h> +#include <net/if_media.h> + +#include <netinet/in.h> +#include <netinet/if_ether.h> + +#include <machine/bus.h> +#include <machine/intr.h> + +#include <dev/isa/isavar.h> + +#include <dev/ic/anvar.h> +#include <dev/ic/anreg.h> + +int an_isapnp_match(struct device *, void *, void *); +void an_isapnp_attach(struct device *, struct device *, void *); + +struct cfattach an_isapnp_ca = { + sizeof(struct an_softc), an_isapnp_match, an_isapnp_attach +}; + +int +an_isapnp_match(parent, match, aux) + struct device *parent; + void *match, *aux; +{ + /* XXX This should be more intelligent */ + return 1; +} + +void +an_isapnp_attach(parent, self, aux) + struct device *parent, *self; + void *aux; +{ + struct an_softc *sc = (void *)self; + struct isa_attach_args *ia = aux; + + sc->an_btag = ia->ia_iot; + sc->an_bhandle = ia->ipa_io[0].h; + + sc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq, IST_EDGE, + IPL_NET, an_intr, sc, sc->sc_dev.dv_xname); + + printf(":"); + + /* Should look at ia->ia_devident... */ + an_attach(sc); +} diff --git a/sys/dev/isa/pnpdevs b/sys/dev/isa/pnpdevs index e79933a920f..3d5dd8db6b2 100644 --- a/sys/dev/isa/pnpdevs +++ b/sys/dev/isa/pnpdevs @@ -1,4 +1,4 @@ -# $OpenBSD: pnpdevs,v 1.108 2002/09/03 16:30:55 mickey Exp $ +# $OpenBSD: pnpdevs,v 1.109 2003/05/20 04:22:17 mickey Exp $ # # NOTE: All `com' devices also need pccom identifiers. @@ -423,6 +423,7 @@ ne @@@1980 # OvisLink LE-8019R we SMC8416 # SMC EtherEZ ef TCM5051 # 3Com Fast EtherLink ISA #ne AXE2201 # Ethernet PnP ISA Card /S (PNP80D6) +an AWL4800 # Aironet 4800 joy @P@0001 # Avance Sound Chip joy @P@1001 # ALS100+ |