summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/eisa_pci.c
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>2000-12-13 01:25:11 +0000
committermsmith <msmith@FreeBSD.org>2000-12-13 01:25:11 +0000
commitc3cf005c4b085a81c7bb2627adf508c5190d8cab (patch)
tree3f030fd8a5d573bf680f20b56768905d9219b747 /sys/dev/pci/eisa_pci.c
parent2d05523ae7df796c5a923944286943dc1cbaf76c (diff)
downloadFreeBSD-src-c3cf005c4b085a81c7bb2627adf508c5190d8cab.zip
FreeBSD-src-c3cf005c4b085a81c7bb2627adf508c5190d8cab.tar.gz
Next round of PCI subsystem updates:
- Break out the /dev/pci driver into a separate file. - Kill the COMPAT_OLDPCI support. - Make the EISA bridge attach a bit more like the old code; explicitly check for the existence of eisa0/isa0 and only attach if they don't already exist. Only make one bus_generic_attach() pass over the bridge, once both busses are attached. Note that the stupid Intel bridge's class is entirely unpredictable. - Add prototypes and re-layout the core PCI modules in line with current coding standards (not a major whitespace change, just moving the module data to the top of the file). - Remove redundant type-2 bridge support from the core PCI code; the PCI-CardBus code does this itself internally. Remove the now entirely redundant header-class-specific support, as well as the secondary and subordinate bus number fields. These are bridge attributes now. - Add support for PCI Extended Capabilities. - Add support for PCI Power Management. The interface currently allows a driver to query and set the power state of a device. - Add helper functions to allow drivers to enable/disable busmastering and the decoding of I/O and memory ranges. - Use PCI_SLOTMAX and PCI_FUNCMAX rather than magic numbers in some places. - Make the PCI-PCI bridge code a little more paranoid about valid I/O and memory decodes. - Add some more PCI register definitions for the command and status registers. Correct another bogus definition for type-1 bridges.
Diffstat (limited to 'sys/dev/pci/eisa_pci.c')
-rw-r--r--sys/dev/pci/eisa_pci.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/sys/dev/pci/eisa_pci.c b/sys/dev/pci/eisa_pci.c
index b44f572..6572801 100644
--- a/sys/dev/pci/eisa_pci.c
+++ b/sys/dev/pci/eisa_pci.c
@@ -90,7 +90,7 @@ eisab_probe(device_t dev)
* Some bridges don't correctly report their class.
*/
switch (pci_get_devid(dev)) {
- case 0x04828086: /* reports PCI-HOST class (!) */
+ case 0x04828086: /* may show up as PCI-HOST or 0:0 */
matched = 1;
break;
default:
@@ -107,21 +107,20 @@ eisab_probe(device_t dev)
static int
eisab_attach(device_t dev)
{
- device_t child;
-
/*
* Attach an EISA bus. Note that we can only have one EISA bus.
*/
- child = device_add_child(dev, "eisa", 0);
- if (child != NULL)
- bus_generic_attach(dev);
+ if (!devclass_get_device(devclass_find("eisa"), 0))
+ device_add_child(dev, "eisa", -1);
/*
- * Attach an ISA bus as well (should this be a child of EISA?)
+ * Attach an ISA bus as well, since the EISA bus may have ISA
+ * cards installed, and we may have no EISA support in the system.
*/
- child = device_add_child(dev, "isa", 0);
- if (child != NULL)
- bus_generic_attach(dev);
+ if (!devclass_get_device(devclass_find("isa"), 0))
+ device_add_child(dev, "isa", -1);
+
+ bus_generic_attach(dev);
return(0);
}
OpenPOWER on IntegriCloud