freebsd-dev/sys/sparc64/pci
John Baldwin 3d0338a092 Implement a PCI bus rescan method.
Rescanning a PCI bus uses the following steps:
- Fetch the current set of child devices and save it in the 'devlist'
  array.
- Allocate a parallel array 'unchanged' initalized with NULL pointers.
- Scan the bus checking each slot (and each function on slots with a
  multifunction device).
- If a valid function is found, look for a matching device in the 'devlist'
  array.  If a device is found, save the pointer in the 'unchanged' array.
  If a device is not found, add a new device.
- After the scan has finished, walk the 'devlist' array deleting any
  devices that do not have a matching pointer in the 'unchanged' array.
- Finally, fetch an updated set of child devices and explicitly attach any
  devices that are not present in the 'unchanged' array.

This builds on the previous changes to move subclass data management into
pci_alloc_devinfo(), pci_child_added(), and bus_child_deleted().

Subclasses of the PCI bus use custom rescan logic explicitly override the
rescan method to disable rescans.

Differential Revision:	https://reviews.freebsd.org/D6018
2016-04-27 16:31:12 +00:00
..
apb.c Use uintmax_t (typedef'd to rman_res_t type) for rman ranges. 2016-03-18 01:28:41 +00:00
fire.c As <machine/pmap.h> is included from <vm/pmap.h>, there is no need to 2016-02-22 09:02:20 +00:00
firereg.h - Factor out the common and generic parts of the sparc64 host-PCI-bridge 2015-09-12 22:49:32 +00:00
firevar.h - Factor out the common and generic parts of the sparc64 host-PCI-bridge 2015-09-12 22:49:32 +00:00
ofw_pci_if.m
ofw_pci.c Convert rman to use rman_res_t instead of u_long 2016-01-27 02:23:54 +00:00
ofw_pci.h - Factor out the common and generic parts of the sparc64 host-PCI-bridge 2015-09-12 22:49:32 +00:00
ofw_pcib_subr.c
ofw_pcib_subr.h
ofw_pcib.c
ofw_pcibus.c Implement a PCI bus rescan method. 2016-04-27 16:31:12 +00:00
psycho.c Convert rman to use rman_res_t instead of u_long 2016-01-27 02:23:54 +00:00
psychoreg.h - Factor out the common and generic parts of the sparc64 host-PCI-bridge 2015-09-12 22:49:32 +00:00
psychovar.h - Factor out the common and generic parts of the sparc64 host-PCI-bridge 2015-09-12 22:49:32 +00:00
sbbc.c Convert rman to use rman_res_t instead of u_long 2016-01-27 02:23:54 +00:00
schizo.c Convert rman to use rman_res_t instead of u_long 2016-01-27 02:23:54 +00:00
schizoreg.h - Factor out the common and generic parts of the sparc64 host-PCI-bridge 2015-09-12 22:49:32 +00:00
schizovar.h - Factor out the common and generic parts of the sparc64 host-PCI-bridge 2015-09-12 22:49:32 +00:00