diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-07-07 17:02:08 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-07-07 17:02:08 +0000 |
commit | 6e0fec47cdea6f1c2b3a17b4476dc75817e8ac48 (patch) | |
tree | 5fdf2eae89659d3f7904c22aa90a6a49eaf13f7c /sys/dev | |
parent | 501c90dacc6a330f20bd3c75996ed36053f9e8f6 (diff) |
Sanity
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/isa/aic6360.c | 21 | ||||
-rw-r--r-- | sys/dev/isa/wds.c | 10 |
2 files changed, 16 insertions, 15 deletions
diff --git a/sys/dev/isa/aic6360.c b/sys/dev/isa/aic6360.c index 68a84ce8035..8cbe40e4c92 100644 --- a/sys/dev/isa/aic6360.c +++ b/sys/dev/isa/aic6360.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aic6360.c,v 1.12 1997/07/07 16:19:37 niklas Exp $ */ +/* $OpenBSD: aic6360.c,v 1.13 1997/07/07 17:02:06 niklas Exp $ */ /* $NetBSD: aic6360.c,v 1.46 1996/05/12 23:51:37 mycroft Exp $ */ #define integrate static inline @@ -665,11 +665,11 @@ aicprobe(parent, match, aux) #ifdef NEWCONFIG if (ia->ia_iobase == IOBASEUNK) - return 0; + return (0); #endif if (aic_find(sc, ia) != 0) - return 0; + return (0); #ifdef NEWCONFIG if (ia->ia_irq != IRQUNK) { @@ -677,7 +677,7 @@ aicprobe(parent, match, aux) printf("%s: irq mismatch; ", sc->sc_dev.dv_xname); printf("kernel configured %d != board configured %d\n", ia->ia_irq, sc->sc_irq); - return 0; + return (0); } } else ia->ia_irq = sc->sc_irq; @@ -687,7 +687,7 @@ aicprobe(parent, match, aux) printf("%s: drq mismatch; ", sc->sc_dev.dv_xname); printf("kernel configured %d != board configured %d\n", ia->ia_drq, sc->sc_drq); - return 0; + return (0); } } else ia->ia_drq = sc->sc_drq; @@ -695,7 +695,7 @@ aicprobe(parent, match, aux) ia->ia_msize = 0; ia->ia_iosize = AIC_NPORTS; - return 1; + return (1); } /* @@ -712,7 +712,7 @@ aic_find(sc, ia) int i; if (bus_space_map(iot, ia->ia_iobase, AIC_NPORTS, 0, &ioh)) - return (0); + return (1); /* Remove aic6360 from possible powerdown mode */ bus_space_write_1(iot, ioh, DMACNTRL0, 0); @@ -739,7 +739,7 @@ aic_find(sc, ia) if (i != STSIZE) { AIC_START(("STACK futzed at %d.\n", i)); bus_space_unmap(iot, ioh, AIC_NPORTS); - return ENXIO; + return (1); } /* See if we can pull the id string out of the ID register, @@ -767,7 +767,7 @@ aic_find(sc, ia) sc->sc_maxsync = (9 * 250) / sc->sc_freq; bus_space_unmap(iot, ioh, AIC_NPORTS); - return 0; + return (0); } /* @@ -786,7 +786,8 @@ aicattach(parent, self, aux) AIC_TRACE(("aicattach ")); sc->sc_state = AIC_INIT; - bus_space_map(iot, ia->ia_iobase, AIC_NPORTS, 0, &ioh); + if (bus_space_map(iot, ia->ia_iobase, AIC_NPORTS, 0, &ioh)) + panic("%s: could not map I/O-ports", sc->sc_dev.dv_xname); sc->sc_iot = iot; sc->sc_ioh = ioh; diff --git a/sys/dev/isa/wds.c b/sys/dev/isa/wds.c index 1251f3050e5..a6218c1a618 100644 --- a/sys/dev/isa/wds.c +++ b/sys/dev/isa/wds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wds.c,v 1.11 1996/11/29 22:55:10 niklas Exp $ */ +/* $OpenBSD: wds.c,v 1.12 1997/07/07 17:02:07 niklas Exp $ */ /* $NetBSD: wds.c,v 1.13 1996/11/03 16:20:31 mycroft Exp $ */ #undef WDSDIAG @@ -853,7 +853,7 @@ wds_find(ia, sc) /* XXXXX */ if (bus_space_map(iot, ia->ia_iobase, WDS_IO_PORTS, 0, &ioh)) - return (0); + return (1); /* * Sending a command causes the CMDRDY bit to clear. @@ -864,7 +864,7 @@ wds_find(ia, sc) goto ready; delay(10); } - return 1; + return (1); ready: bus_space_write_1(iot, ioh, WDS_CMD, WDSC_NOOP); @@ -895,7 +895,7 @@ ready: if ((bus_space_read_1(iot, ioh, WDS_STAT) & (WDSS_RDY)) != WDSS_RDY) { printf(" failed\n"); - return 1; + return (1); } printf("\n"); } @@ -912,7 +912,7 @@ ready: } else bus_space_unmap(iot, ioh, WDS_IO_PORTS); - return 0; + return (0); } /* |