From 2196bee6e9ecd81b3a9082420b701d56ff3c3e26 Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 14 Jan 2000 05:03:23 +0000 Subject: Don't do device_set_desc() until after checking for PnP probes. Otherwise things like sound cards can get called "Parallel port". A note to the unwary; the isa-pnp devices in the system are probed like PCI - each device ID is passed to *all* isa probe routines to find the best match. If the driver is not prepared to deal with this, it must abort in this scenario or it will try and claim all PnP devices. --- sys/dev/ppc/ppc.c | 7 ++++--- sys/i386/isa/ppc.c | 7 ++++--- sys/isa/ppc.c | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/sys/dev/ppc/ppc.c b/sys/dev/ppc/ppc.c index 0ee1eb6..faa0f0a 100644 --- a/sys/dev/ppc/ppc.c +++ b/sys/dev/ppc/ppc.c @@ -1701,14 +1701,15 @@ ppc_probe(device_t dev) device_t parent; int port; - device_set_desc(dev, "Parallel port"); - - /* XXX shall be connected to pnpbios - from Peter Wemm */ + /* If we are a PNP device, abort. Otherwise we attach to *everthing* */ if (isa_get_logicalid(dev)) return ENXIO; parent = device_get_parent(dev); + /* XXX shall be set after detection */ + device_set_desc(dev, "Parallel port"); + /* * Allocate the ppc_data structure. */ diff --git a/sys/i386/isa/ppc.c b/sys/i386/isa/ppc.c index 0ee1eb6..faa0f0a 100644 --- a/sys/i386/isa/ppc.c +++ b/sys/i386/isa/ppc.c @@ -1701,14 +1701,15 @@ ppc_probe(device_t dev) device_t parent; int port; - device_set_desc(dev, "Parallel port"); - - /* XXX shall be connected to pnpbios - from Peter Wemm */ + /* If we are a PNP device, abort. Otherwise we attach to *everthing* */ if (isa_get_logicalid(dev)) return ENXIO; parent = device_get_parent(dev); + /* XXX shall be set after detection */ + device_set_desc(dev, "Parallel port"); + /* * Allocate the ppc_data structure. */ diff --git a/sys/isa/ppc.c b/sys/isa/ppc.c index 0ee1eb6..faa0f0a 100644 --- a/sys/isa/ppc.c +++ b/sys/isa/ppc.c @@ -1701,14 +1701,15 @@ ppc_probe(device_t dev) device_t parent; int port; - device_set_desc(dev, "Parallel port"); - - /* XXX shall be connected to pnpbios - from Peter Wemm */ + /* If we are a PNP device, abort. Otherwise we attach to *everthing* */ if (isa_get_logicalid(dev)) return ENXIO; parent = device_get_parent(dev); + /* XXX shall be set after detection */ + device_set_desc(dev, "Parallel port"); + /* * Allocate the ppc_data structure. */ -- cgit v1.1