if_sn_isa.c revision 54994
154994Simp/* 254994Simp * Copyright (c) 1999 M. Warner Losh 354994Simp * All rights reserved. 454994Simp * 554994Simp * Redistribution and use in source and binary forms, with or without 654994Simp * modification, are permitted provided that the following conditions 754994Simp * are met: 854994Simp * 1. Redistributions of source code must retain the above copyright 954994Simp * notice, this list of conditions and the following disclaimer. 1054994Simp * 2. Redistributions in binary form must reproduce the above copyright 1154994Simp * notice, this list of conditions and the following disclaimer in the 1254994Simp * documentation and/or other materials provided with the distribution. 1354994Simp * 3. All advertising materials mentioning features or use of this software 1454994Simp * must display the following acknowledgement: 1554994Simp * This product includes software developed by Herb Peyerl. 1654994Simp * 4. The name of Herb Peyerl may not be used to endorse or promote products 1754994Simp * derived from this software without specific prior written permission. 1854994Simp * 1954994Simp * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 2054994Simp * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 2154994Simp * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2254994Simp * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2354994Simp * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2454994Simp * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2554994Simp * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2654994Simp * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2754994Simp * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2854994Simp * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2954994Simp * 3054994Simp * $FreeBSD: head/sys/dev/sn/if_sn_isa.c 54994 1999-12-22 08:44:13Z imp $ 3154994Simp */ 3254994Simp 3354994Simp#include <sys/param.h> 3454994Simp#include <sys/systm.h> 3554994Simp#include <sys/kernel.h> 3654994Simp#include <sys/socket.h> 3754994Simp 3854994Simp#include <sys/module.h> 3954994Simp#include <sys/bus.h> 4054994Simp 4154994Simp#include <machine/bus.h> 4254994Simp#include <machine/resource.h> 4354994Simp#include <sys/rman.h> 4454994Simp 4554994Simp#include <net/if.h> 4654994Simp#include <net/if_arp.h> 4754994Simp#include <net/if_media.h> 4854994Simp 4954994Simp#include <machine/clock.h> 5054994Simp 5154994Simp#include <isa/isavar.h> 5254994Simp#include <isa/pnpvar.h> 5354994Simp 5454994Simp#include <dev/sn/if_snreg.h> 5554994Simp#include <dev/sn/if_snvar.h> 5654994Simp 5754994Simpstatic int sn_isa_probe (device_t); 5854994Simpstatic int sn_isa_attach (device_t); 5954994Simp 6054994Simpstatic int 6154994Simpsn_isa_probe (device_t dev) 6254994Simp{ 6354994Simp if (sn_probe(dev, 0) != 0) 6454994Simp return (0); 6554994Simp 6654994Simp return (ENXIO); 6754994Simp} 6854994Simp 6954994Simpstatic int 7054994Simpsn_isa_attach (device_t dev) 7154994Simp{ 7254994Simp return (0); 7354994Simp} 7454994Simp 7554994Simpstatic device_method_t sn_isa_methods[] = { 7654994Simp /* Device interface */ 7754994Simp DEVMETHOD(device_probe, sn_isa_probe), 7854994Simp DEVMETHOD(device_attach, sn_isa_attach), 7954994Simp 8054994Simp { 0, 0 } 8154994Simp}; 8254994Simp 8354994Simpstatic driver_t sn_isa_driver = { 8454994Simp "sn", 8554994Simp sn_isa_methods, 8654994Simp sizeof(struct sn_softc), 8754994Simp}; 8854994Simp 8954994Simpextern devclass_t sn_devclass; 9054994Simp 9154994SimpDRIVER_MODULE(sn, isa, sn_isa_driver, sn_devclass, 0, 0); 92