From a9d565fcd23943d5d694b99d27cd841cc7423e6a Mon Sep 17 00:00:00 2001 From: Peter Wemm 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 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/dev/ppc/ppc.c') diff --git a/sys/dev/ppc/ppc.c b/sys/dev/ppc/ppc.c index 0ee1eb668dc6..faa0f0a639c0 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. */ -- cgit v1.3