diff options
-rw-r--r-- | sys/arch/i386/conf/GENERIC | 3 | ||||
-rw-r--r-- | sys/arch/i386/conf/RAMDISK | 3 | ||||
-rw-r--r-- | sys/dev/isa/aha.c | 36 | ||||
-rw-r--r-- | sys/dev/isa/files.isa | 6 | ||||
-rw-r--r-- | sys/dev/isa/files.isapnp | 4 |
5 files changed, 40 insertions, 12 deletions
diff --git a/sys/arch/i386/conf/GENERIC b/sys/arch/i386/conf/GENERIC index 86e71f4cc80..7226888f2c4 100644 --- a/sys/arch/i386/conf/GENERIC +++ b/sys/arch/i386/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.93 1998/11/28 01:29:16 deraadt Exp $ +# $OpenBSD: GENERIC,v 1.94 1998/12/27 09:41:57 deraadt Exp $ # $NetBSD: GENERIC,v 1.48 1996/05/20 18:17:23 mrg Exp $ # # GENERIC -- everything that's currently supported @@ -104,6 +104,7 @@ bt2 at isa? port ? irq ? scsibus* at bt? aha0 at isa? port 0x330 irq ? drq ? # Adaptec 154[02] SCSI controllers aha1 at isa? port 0x334 irq ? drq ? # Adaptec 154[02] SCSI controllers +aha* at isapnp? scsibus* at aha? ahb* at eisa? slot ? # Adaptec 174[024] SCSI controllers scsibus* at ahb? diff --git a/sys/arch/i386/conf/RAMDISK b/sys/arch/i386/conf/RAMDISK index 0b9da771005..8adc9cb8532 100644 --- a/sys/arch/i386/conf/RAMDISK +++ b/sys/arch/i386/conf/RAMDISK @@ -1,4 +1,4 @@ -# $OpenBSD: RAMDISK,v 1.53 1998/12/27 09:40:26 deraadt Exp $ +# $OpenBSD: RAMDISK,v 1.54 1998/12/27 09:41:57 deraadt Exp $ # from: OpenBSD: INST,v 1.19 1996/11/05 03:49:13 tholo Exp # # Install kernels no longer support X. @@ -111,6 +111,7 @@ bt1 at isa? port 0x334 irq ? drq ? # BusLogic [57]4X SCSI controllers scsibus* at bt? aha0 at isa? port 0x330 irq ? drq ? # Adaptec 154[02] SCSI controllers aha1 at isa? port 0x334 irq ? drq ? # Adaptec 154[02] SCSI controllers +aha* at isapnp? scsibus* at aha? ahb* at eisa? slot ? # Adaptec 174[024] SCSI controllers scsibus* at ahb? diff --git a/sys/dev/isa/aha.c b/sys/dev/isa/aha.c index 1cec44c76c1..22ab12b8b7a 100644 --- a/sys/dev/isa/aha.c +++ b/sys/dev/isa/aha.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aha.c,v 1.31 1998/08/13 04:36:50 downsj Exp $ */ +/* $OpenBSD: aha.c,v 1.32 1998/12/27 09:41:56 deraadt Exp $ */ /* $NetBSD: aha.c,v 1.11 1996/05/12 23:51:23 mycroft Exp $ */ #undef AHADIAG @@ -147,7 +147,7 @@ void aha_queue_ccb __P((struct aha_softc *, struct aha_ccb *)); void aha_collect_mbo __P((struct aha_softc *)); void aha_start_ccbs __P((struct aha_softc *)); void aha_done __P((struct aha_softc *, struct aha_ccb *)); -int aha_find __P((struct isa_attach_args *, struct aha_softc *)); +int aha_find __P((struct isa_attach_args *, struct aha_softc *, int)); void aha_init __P((struct aha_softc *)); void aha_inquire_setup_information __P((struct aha_softc *)); void ahaminphys __P((struct buf *)); @@ -170,10 +170,15 @@ struct scsi_device aha_dev = { NULL, /* Use default 'done' routine */ }; +int aha_isapnp_probe __P((struct device *, void *, void *)); int ahaprobe __P((struct device *, void *, void *)); void ahaattach __P((struct device *, struct device *, void *)); -struct cfattach aha_ca = { +struct cfattach aha_isapnp_ca = { + sizeof(struct aha_softc), aha_isapnp_probe, ahaattach +}; + +struct cfattach aha_isa_ca = { sizeof(struct aha_softc), ahaprobe, ahaattach }; @@ -318,6 +323,15 @@ aha_cmd(iobase, sc, icnt, ibuf, ocnt, obuf) return 0; } +int +aha_isapnp_probe(parent, match, aux) + struct device *parent; + void *match, *aux; +{ + return 1; +} + + /* * Check if the device can be found at the port given * and if so, set it up ready for further work @@ -345,7 +359,7 @@ ahaprobe(parent, match, aux) #endif /* See if there is a unit at this location. */ - if (aha_find(ia, NULL) != 0) + if (aha_find(ia, NULL, 0) != 0) return 0; ia->ia_msize = 0; @@ -364,8 +378,11 @@ ahaattach(parent, self, aux) { struct isa_attach_args *ia = aux; struct aha_softc *sc = (void *)self; + int isapnp = !strcmp(parent->dv_cfdata->cf_driver->cd_name, "isapnp"); - if (aha_find(ia, sc) != 0) + if (isapnp) + ia->ia_iobase = ia->ipa_io[0].base; + if (aha_find(ia, sc, isapnp) != 0) panic("ahaattach: aha_find of %s failed", self->dv_xname); sc->sc_iobase = ia->ia_iobase; @@ -869,9 +886,10 @@ aha_done(sc, ccb) * Find the board and find its irq/drq */ int -aha_find(ia, sc) +aha_find(ia, sc, isapnp) struct isa_attach_args *ia; struct aha_softc *sc; + int isapnp; { int iobase = ia->ia_iobase; int i; @@ -930,6 +948,8 @@ aha_find(ia, sc) config.reply.chan); return 1; } + if (isapnp) + irq = ia->ia_irq; switch (config.reply.intr) { case INT9: @@ -955,6 +975,8 @@ aha_find(ia, sc) config.reply.intr); return EIO; } + if (isapnp) + drq = ia->ia_drq; if (sc != NULL) { /* who are we on the scsi bus? */ @@ -964,6 +986,8 @@ aha_find(ia, sc) sc->sc_irq = irq; sc->sc_drq = drq; } else { + if (isapnp) + return (0); if (ia->ia_irq == IRQUNK) ia->ia_irq = irq; else if (ia->ia_irq != irq) diff --git a/sys/dev/isa/files.isa b/sys/dev/isa/files.isa index 5df61fa8fc3..62da4a6e5a1 100644 --- a/sys/dev/isa/files.isa +++ b/sys/dev/isa/files.isa @@ -1,4 +1,4 @@ -# $OpenBSD: files.isa,v 1.47 1998/11/28 01:29:05 deraadt Exp $ +# $OpenBSD: files.isa,v 1.48 1998/12/27 09:41:56 deraadt Exp $ # $NetBSD: files.isa,v 1.21 1996/05/16 03:45:55 mycroft Exp $ # # Config.new file and device description for machine-independent ISA code. @@ -80,8 +80,8 @@ file dev/isa/aic_isa.c aic_isa # Adaptec AHA-154x family device aha: scsi, isa_dma -attach aha at isa -file dev/isa/aha.c aha needs-count +attach aha at isa with aha_isa +file dev/isa/aha.c aha needs-flag # Seagate ST0[12] ICs device sea: scsi diff --git a/sys/dev/isa/files.isapnp b/sys/dev/isa/files.isapnp index 056584eb61b..44e77d3b81f 100644 --- a/sys/dev/isa/files.isapnp +++ b/sys/dev/isa/files.isapnp @@ -1,4 +1,4 @@ -# $OpenBSD: files.isapnp,v 1.10 1998/11/28 01:29:05 deraadt Exp $ +# $OpenBSD: files.isapnp,v 1.11 1998/12/27 09:41:56 deraadt Exp $ # $NetBSD: files.isapnp,v 1.7 1997/10/16 17:16:36 matt Exp $ # # Config file and device description for machine-independent ISAPnP code. @@ -21,6 +21,8 @@ file dev/isa/isapnpres.c isapnp attach wdc at isapnp with wdc_isapnp +attach aha at isapnp with aha_isapnp + attach sb at isapnp with sb_isapnp file dev/isa/sb_isapnp.c sb & (sb_isa | sb_isapnp) needs-flag |