aic_isa.c (74370) | aic_isa.c (77844) |
---|---|
1/*- 2 * Copyright (c) 1999 Luoqi Chen. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 1999 Luoqi Chen. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/dev/aic/aic_isa.c 74370 2001-03-16 22:20:19Z ken $ | 26 * $FreeBSD: head/sys/dev/aic/aic_isa.c 77844 2001-06-06 22:32:29Z imp $ |
27 */ 28 29#include <sys/param.h> 30#include <sys/kernel.h> 31#include <sys/module.h> 32#include <sys/bus.h> 33 34#include <machine/bus_pio.h> --- 17 unchanged lines hidden (view full) --- 52static void aic_isa_release_resources __P((device_t)); 53static int aic_isa_probe __P((device_t)); 54static int aic_isa_attach __P((device_t)); 55 56static u_int aic_isa_ports[] = { 0x340, 0x140 }; 57#define AIC_ISA_NUMPORTS (sizeof(aic_isa_ports) / sizeof(aic_isa_ports[0])) 58#define AIC_ISA_PORTSIZE 0x20 59 | 27 */ 28 29#include <sys/param.h> 30#include <sys/kernel.h> 31#include <sys/module.h> 32#include <sys/bus.h> 33 34#include <machine/bus_pio.h> --- 17 unchanged lines hidden (view full) --- 52static void aic_isa_release_resources __P((device_t)); 53static int aic_isa_probe __P((device_t)); 54static int aic_isa_attach __P((device_t)); 55 56static u_int aic_isa_ports[] = { 0x340, 0x140 }; 57#define AIC_ISA_NUMPORTS (sizeof(aic_isa_ports) / sizeof(aic_isa_ports[0])) 58#define AIC_ISA_PORTSIZE 0x20 59 |
60static struct isa_pnp_id aic_ids[] = { 61 { 0x15309004, "Adaptec AHA-1530P" }, 62 { 0x15209004, "Adaptec AHA-1520P" }, 63 { 0 } 64}; 65 |
|
60static int 61aic_isa_alloc_resources(device_t dev) 62{ 63 struct aic_isa_softc *sc = device_get_softc(dev); 64 int rid; 65 66 sc->sc_port = sc->sc_irq = sc->sc_drq = 0; 67 --- 51 unchanged lines hidden (view full) --- 119aic_isa_probe(device_t dev) 120{ 121 struct aic_isa_softc *sc = device_get_softc(dev); 122 struct aic_softc *aic = &sc->sc_aic; 123 int numports, i; 124 u_int port, *ports; 125 u_int8_t porta; 126 | 66static int 67aic_isa_alloc_resources(device_t dev) 68{ 69 struct aic_isa_softc *sc = device_get_softc(dev); 70 int rid; 71 72 sc->sc_port = sc->sc_irq = sc->sc_drq = 0; 73 --- 51 unchanged lines hidden (view full) --- 125aic_isa_probe(device_t dev) 126{ 127 struct aic_isa_softc *sc = device_get_softc(dev); 128 struct aic_softc *aic = &sc->sc_aic; 129 int numports, i; 130 u_int port, *ports; 131 u_int8_t porta; 132 |
127 if (isa_get_vendorid(dev)) | 133 if (ISA_PNP_PROBE(device_get_parent(dev), dev, aic_ids) == ENXIO) |
128 return (ENXIO); 129 130 port = isa_get_port(dev); 131 if (port != -1) { 132 ports = &port; 133 numports = 1; 134 } else { 135 ports = aic_isa_ports; --- 97 unchanged lines hidden --- | 134 return (ENXIO); 135 136 port = isa_get_port(dev); 137 if (port != -1) { 138 ports = &port; 139 numports = 1; 140 } else { 141 ports = aic_isa_ports; --- 97 unchanged lines hidden --- |