mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
42dbeaee02
- Make the pci devclass a global variable. - Add child devices in pci_attach() instead of pci_probe(). Change pci_probe() to just check for a valid bus number from the associated bridge and return -1000 if successful. This allows subclasses of the PCI bus driver to override the generic driver. - Move the code to load the vendor data into its own public function. Really though, doing this at attach is just plain wrong. This should really be done in the module load routine instead. As a side effect, the 'busno' variable in pci_attach() is now no longer static (minor bug that was harmless so far.) - Change pci_add_children() to take an extra argument that is the size of the device info structure passed to pci_read_device() and make it public so subclasses of the PCI bus can call it in their attach routines. - Move the bits to attach a probed PCI child to a PCI bus into a global pci_add_child() function. This will allow subclasses that can detect a PCI device not found in the normal PCI probe to add those devices in their own attach routine. (I have seen this in the ACPI tree on my laptop for example.) As a side effect, change the static function pci_add_resources() to get the busno, slot, and func from the passed in dinfo structure instead of requiring them as function arguments. Tested on: i386, alpha, ia64, sparc64 |
||
---|---|---|
.. | ||
eisa_pci.c | ||
fixup_pci.c | ||
ignore_pci.c | ||
isa_pci.c | ||
pci_if.m | ||
pci_pci.c | ||
pci_private.h | ||
pci_user.c | ||
pci.c | ||
pcib_if.m | ||
pcireg.h | ||
pcivar.h |