diff options
author | wpaul <wpaul@FreeBSD.org> | 2000-11-07 00:56:14 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2000-11-07 00:56:14 +0000 |
commit | dfc4fbb6390884a9469d4625edbcfaefbb391d48 (patch) | |
tree | 93959c73409b5d4fd0368c541f757cf24fac6af4 /sys/dev/vx/if_vx_eisa.c | |
parent | 7bb34d92a0a71be5494882d50b6fb8207f0b9f5d (diff) | |
download | FreeBSD-src-dfc4fbb6390884a9469d4625edbcfaefbb391d48.zip FreeBSD-src-dfc4fbb6390884a9469d4625edbcfaefbb391d48.tar.gz |
Update the vortex driver so that it no longer needs the PCI compat
interface. In addition to using newbus, it also uses bus_space rather
than inb/outb to make it MI. The grody static softc allocation stuff
has been removed as well.
Diffstat (limited to 'sys/dev/vx/if_vx_eisa.c')
-rw-r--r-- | sys/dev/vx/if_vx_eisa.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/dev/vx/if_vx_eisa.c b/sys/dev/vx/if_vx_eisa.c index 134c360..b231243 100644 --- a/sys/dev/vx/if_vx_eisa.c +++ b/sys/dev/vx/if_vx_eisa.c @@ -111,7 +111,6 @@ static int vx_eisa_attach(device_t dev) { struct vx_softc *sc; - int unit = device_get_unit(dev); struct resource *io = 0; struct resource *eisa_io = 0; struct resource *irq = 0; @@ -139,29 +138,32 @@ vx_eisa_attach(device_t dev) goto bad; } - if ((sc = vxalloc(unit)) == NULL) - goto bad; + sc = device_get_softc(dev); - sc->vx_io_addr = rman_get_start(io); + sc->vx_res = io; + sc->vx_bhandle = rman_get_bushandle(io); + sc->vx_btag = rman_get_bustag(io); rid = 0; irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0, 1, RF_ACTIVE); if (!irq) { device_printf(dev, "No irq?!\n"); - vxfree(sc); goto bad; } + sc->vx_irq = irq; + /* Now the registers are availible through the lower ioport */ vxattach(sc); if (bus_setup_intr(dev, irq, INTR_TYPE_NET, vxintr, sc, &ih)) { - vxfree(sc); goto bad; } + sc->vx_intrhand = ih; + return 0; bad: |