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.
This commit is contained in:
Peter Wemm 2000-01-14 05:03:23 +00:00
parent 173cce7c8e
commit a9d565fcd2
3 changed files with 12 additions and 9 deletions

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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.
*/