summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorDoug Rabson <dfr@FreeBSD.org>1999-09-01 20:53:43 +0000
committerDoug Rabson <dfr@FreeBSD.org>1999-09-01 20:53:43 +0000
commit4249382df0511b51db40ad807c99c41f488778ed (patch)
tree7d046520bd727bb9d34c88bead403c9bf7be0738 /sys/dev
parent5d3e37130b5b95d0320701f18a82e42885942446 (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/ata-all.c13
-rw-r--r--sys/dev/pcm/isa/mss.c4
-rw-r--r--sys/dev/sio/sio.c21
-rw-r--r--sys/dev/sound/isa/mss.c4
4 files changed, 31 insertions, 11 deletions
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c
index d0ef616318a5..89213c91ae61 100644
--- a/sys/dev/ata/ata-all.c
+++ b/sys/dev/ata/ata-all.c
@@ -83,6 +83,13 @@ struct ata_softc *atadevices[MAXATA];
static devclass_t ata_devclass;
#if NISA > 0
+static struct isa_pnp_id ata_ids[] = {
+ {0x0006d041, "Generic ESDI/IDE/ATA controller"}, /* PNP0600 */
+ {0x0106d041, "Plus Hardcard II"}, /* PNP0601 */
+ {0x0206d041, "Plus Hardcard IIXL/EZ"}, /* PNP0602 */
+ {0x0306d041, "Generic ATA"}, /* PNP0603 */
+ {0}
+};
static int
ata_isaprobe(device_t dev)
@@ -92,7 +99,11 @@ ata_isaprobe(device_t dev)
int32_t ctlr, res;
int32_t lun;
- /* allocate the port range */
+ /* Check isapnp ids */
+ if (ISA_PNP_PROBE(device_get_parent(dev), dev, ata_ids) == ENXIO)
+ return (ENXIO);
+
+ /* Allocate the port range */
rid = 0;
port = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0, 1, RF_ACTIVE);
if (!port)
diff --git a/sys/dev/pcm/isa/mss.c b/sys/dev/pcm/isa/mss.c
index cc34ddc66b1f..13645d9debe3 100644
--- a/sys/dev/pcm/isa/mss.c
+++ b/sys/dev/pcm/isa/mss.c
@@ -511,9 +511,11 @@ mss_probe(device_t dev)
mss_probe_end:
result = mss_detect(dev, mss);
no:
+ mss_release_resources(mss, dev);
+#if 0
if (setres) ISA_DELETE_RESOURCE(device_get_parent(dev), dev,
SYS_RES_IOPORT, mss->io_rid); /* XXX ? */
- mss_release_resources(mss, dev);
+#endif
return result;
}
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 0cd84baddd4f..503aa3ee0f84 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -577,6 +577,15 @@ card_intr(struct pccard_devinfo *devi)
#define SET_FLAG(dev, bit) isa_set_flags(dev, isa_get_flags(dev) | (bit))
#define CLR_FLAG(dev, bit) isa_set_flags(dev, isa_get_flags(dev) & ~(bit))
+static struct isa_pnp_id sio_ids[] = {
+ {0x0005d041, "Standard PC COM port"}, /* PNP0500 */
+ {0x0105d041, "16550A-compatible COM port"}, /* PNP0501 */
+ {0x0205d041, "Multiport serial device (non-intelligent 16550)"}, /* PNP0502 */
+ {0x1005d041, "Generic IRDA-compatible device"}, /* PNP0510 */
+ {0x1105d041, "Generic IRDA-compatible device"}, /* PNP0511 */
+ {0}
+};
+
static int
sioprobe(dev)
device_t dev;
@@ -596,10 +605,7 @@ sioprobe(dev)
struct resource *port;
/* Check isapnp ids */
- if (isa_get_vendorid(dev)
- && isa_get_compatid(dev) != PNP_EISAID("PNP0500")
- && isa_get_compatid(dev) != PNP_EISAID("PNP0501")
- && isa_get_compatid(dev) != PNP_EISAID("PNP0502"))
+ if (ISA_PNP_PROBE(device_get_parent(dev), dev, sio_ids) == ENXIO)
return (ENXIO);
rid = 0;
@@ -2628,11 +2634,12 @@ static cn_putc_t siocnputc;
#ifdef __i386__
CONS_DRIVER(sio, siocnprobe, siocninit, NULL, siocngetc, siocncheckc, siocnputc);
+#endif
+
/* To get the GDB related variables */
#if DDB > 0
#include <ddb/ddb.h>
#endif
-#endif
static void
siocntxwait(iobase)
@@ -2830,17 +2837,15 @@ siocnprobe(cp)
siocniobase = iobase;
siocnunit = unit;
}
- if (COM_DEBUGGER(flags) && !COM_LLCONSOLE(flags)) {
+ if (COM_DEBUGGER(flags)) {
printf("sio%d: gdb debugging port\n", unit);
siogdbiobase = iobase;
siogdbunit = unit;
-#ifdef __i386__
#if DDB > 0
gdbdev = makedev(CDEV_MAJOR, unit);
gdb_getc = siocngetc;
gdb_putc = siocnputc;
#endif
-#endif
}
}
}
diff --git a/sys/dev/sound/isa/mss.c b/sys/dev/sound/isa/mss.c
index cc34ddc66b1f..13645d9debe3 100644
--- a/sys/dev/sound/isa/mss.c
+++ b/sys/dev/sound/isa/mss.c
@@ -511,9 +511,11 @@ mss_probe(device_t dev)
mss_probe_end:
result = mss_detect(dev, mss);
no:
+ mss_release_resources(mss, dev);
+#if 0
if (setres) ISA_DELETE_RESOURCE(device_get_parent(dev), dev,
SYS_RES_IOPORT, mss->io_rid); /* XXX ? */
- mss_release_resources(mss, dev);
+#endif
return result;
}