summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/aic6360.c9
-rw-r--r--sys/dev/isa/aic_isa.c18
2 files changed, 14 insertions, 13 deletions
diff --git a/sys/dev/ic/aic6360.c b/sys/dev/ic/aic6360.c
index 5ba8250e08f..060f6afd962 100644
--- a/sys/dev/ic/aic6360.c
+++ b/sys/dev/ic/aic6360.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic6360.c,v 1.1 1998/09/11 07:24:57 fgsch Exp $ */
+/* $OpenBSD: aic6360.c,v 1.2 1998/10/05 07:34:43 fgsch Exp $ */
/* $NetBSD: aic6360.c,v 1.52 1996/12/10 21:27:51 thorpej Exp $ */
#ifdef DDB
@@ -110,7 +110,7 @@
* kernel debugger. If you set AIC_DEBUG to 0 they are not included (the
* kernel uses less memory) but you lose the debugging facilities.
*/
-#define AIC_DEBUG 0
+#define AIC_DEBUG 1
#define AIC_ABORT_TIMEOUT 2000 /* time to wait for abort */
@@ -236,8 +236,7 @@ aic_find(iot, ioh)
;
if (i != STSIZE) {
AIC_START(("STACK futzed at %d.\n", i));
- bus_space_unmap(iot, ioh, AIC_NPORTS);
- return (1);
+ return (0);
}
/* See if we can pull the id string out of the ID register,
@@ -249,7 +248,7 @@ aic_find(iot, ioh)
AIC_START(("chip revision %d\n",
(int)bus_space_read_1(iot, ioh, REV)));
- return (0);
+ return (1);
}
/*
diff --git a/sys/dev/isa/aic_isa.c b/sys/dev/isa/aic_isa.c
index 742e0e5a9ad..812756240bc 100644
--- a/sys/dev/isa/aic_isa.c
+++ b/sys/dev/isa/aic_isa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic_isa.c,v 1.1 1998/09/11 07:42:58 fgsch Exp $ */
+/* $OpenBSD: aic_isa.c,v 1.2 1998/10/05 07:34:43 fgsch Exp $ */
/* $NetBSD: aic6360.c,v 1.52 1996/12/10 21:27:51 thorpej Exp $ */
/*
@@ -98,6 +98,7 @@ aic_isa_probe(parent, match, aux)
struct isa_attach_args *ia = aux;
bus_space_tag_t iot = ia->ia_iot;
bus_space_handle_t ioh;
+ int rv;
#ifdef NEWCONFIG
if (ia->ia_iobase == IOBASEUNK)
@@ -108,8 +109,7 @@ aic_isa_probe(parent, match, aux)
return (0);
AIC_TRACE(("aic: probing for aic-chip at port 0x%x\n", ia->ia_iobase));
- if (aic_find(iot, ioh) != 0)
- return (0);
+ rv = aic_find(iot, ioh);
bus_space_unmap(iot, ioh, AIC_NPORTS);
@@ -135,9 +135,11 @@ aic_isa_probe(parent, match, aux)
ia->ia_drq = sc->sc_drq;
#endif
- ia->ia_msize = 0;
- ia->ia_iosize = AIC_NPORTS;
- return (1);
+ if (rv) {
+ ia->ia_msize = 0;
+ ia->ia_iosize = AIC_NPORTS;
+ }
+ return (rv);
}
/*
@@ -165,9 +167,9 @@ aic_isa_attach(parent, self, aux)
isa_establish(&sc->sc_id, &sc->sc_dev);
#endif
- aicattach(sc);
-
sc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq, IST_EDGE,
IPL_BIO, aicintr, sc, sc->sc_dev.dv_xname);
+
+ aicattach(sc);
}