1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00
freebsd/sys/dev/pci
John Baldwin 42dbeaee02 Various changes to make it easier to subclass the PCI bus device.
- 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
2002-08-26 15:23:52 +00:00
..
eisa_pci.c
fixup_pci.c
ignore_pci.c
isa_pci.c
pci_if.m
pci_pci.c Fix an edge case wrt membase, but more changes needed 2002-04-13 05:52:35 +00:00
pci_private.h Various changes to make it easier to subclass the PCI bus device. 2002-08-26 15:23:52 +00:00
pci_user.c Simple p_ucred -> td_ucred changes to start using the per-thread ucred 2002-02-27 18:32:23 +00:00
pci.c Various changes to make it easier to subclass the PCI bus device. 2002-08-26 15:23:52 +00:00
pcib_if.m
pcireg.h Add some PCI-X register definitions. 2002-06-05 22:25:51 +00:00
pcivar.h style(9) nit. 2002-08-19 22:51:23 +00:00