PNP BIOS devices are fundamentally different than ISA PNP devices.

These devices should be probed first because they are at fixed
locations and cannot be turned off.  ISA PNP devices, on the other
hand, can be turned off and often can be flexible in the resources
they use.  Probe them last, as always.
This commit is contained in:
Warner Losh 2004-12-07 05:30:02 +00:00
parent c10bac25f6
commit 993fd0c509
4 changed files with 12 additions and 11 deletions

View file

@ -148,7 +148,7 @@ es1888_identify(driver_t *driver, device_t parent)
/*
* Create the device and program its resources.
*/
dev = BUS_ADD_CHILD(parent, ISA_ORDER_PNP, NULL, -1);
dev = BUS_ADD_CHILD(parent, ISA_ORDER_PNPBIOS, NULL, -1);
bus_set_resource(dev, SYS_RES_IOPORT, 0, 0x220, 0x10);
bus_set_resource(dev, SYS_RES_IRQ, 0, 5, 1);
bus_set_resource(dev, SYS_RES_DRQ, 0, 1, 1);

View file

@ -611,7 +611,7 @@ pnpbios_identify(driver_t *driver, device_t parent)
continue;
/* Add the device and parse its resources */
dev = BUS_ADD_CHILD(parent, ISA_ORDER_PNP, NULL, -1);
dev = BUS_ADD_CHILD(parent, ISA_ORDER_PNPBIOS, NULL, -1);
isa_set_vendorid(dev, pd->devid);
isa_set_logicalid(dev, pd->devid);
/*

View file

@ -39,15 +39,16 @@ typedef void isa_config_cb(void *arg, struct isa_config *config, int enable);
#ifdef _KERNEL
/*
* ISA devices are partially ordered to ensure that devices which are
* sensitive to other driver probe routines are probed first. Plug and
* Play devices are added after devices with speculative probes so that
* the legacy hardware can claim resources allowing the Plug and Play
* hardware to choose different resources.
* ISA devices are partially ordered. This is to ensure that hardwired
* devices the BIOS tells us are there appear first, then speculative
* devices that are sensitive to the probe order, then devices that
* are hinted to be there, then the most flexible devices which support
* the ISA bus PNP standard.
*/
#define ISA_ORDER_SENSITIVE 0 /* legacy sensitive hardware */
#define ISA_ORDER_SPECULATIVE 1 /* legacy non-sensitive hardware */
#define ISA_ORDER_PNP 2 /* plug-and-play hardware */
#define ISA_ORDER_PNPBIOS 10 /* plug-and-play BIOS inflexible hardware */
#define ISA_ORDER_SENSITIVE 20 /* legacy sensitive hardware */
#define ISA_ORDER_SPECULATIVE 30 /* legacy non-sensitive hardware */
#define ISA_ORDER_PNP 40 /* plug-and-play hardware */
/*
* Limits on resources that we can manage

View file

@ -217,7 +217,7 @@ isa_setup_children(device_t dev, phandle_t parent)
continue;
}
if ((cdev = BUS_ADD_CHILD(dev, ISA_ORDER_PNP, NULL, -1)) ==
if ((cdev = BUS_ADD_CHILD(dev, ISA_ORDER_PNPBIOS, NULL, -1)) ==
NULL)
panic("isa_setup_children: BUS_ADD_CHILD failed");
isa_set_logicalid(cdev, pnp_map[i].id);