summaryrefslogtreecommitdiffstats
path: root/sys/isa/ppc.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2000-01-14 05:03:23 +0000
committerpeter <peter@FreeBSD.org>2000-01-14 05:03:23 +0000
commit2196bee6e9ecd81b3a9082420b701d56ff3c3e26 (patch)
treee98ef1cf4a6d933ddcb9f7abcbb6f04de43df12c /sys/isa/ppc.c
parent53da3b72da26956d772ca95e56fc21d1ab6ef8a5 (diff)
downloadFreeBSD-src-2196bee6e9ecd81b3a9082420b701d56ff3c3e26.zip
FreeBSD-src-2196bee6e9ecd81b3a9082420b701d56ff3c3e26.tar.gz
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.
Diffstat (limited to 'sys/isa/ppc.c')
-rw-r--r--sys/isa/ppc.c7
1 files changed, 4 insertions, 3 deletions
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.
*/
OpenPOWER on IntegriCloud