freebsd-dev/sys/mips/nlm
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
..
dev As <machine/param.h> is included from <sys/param.h>, there is no need 2016-02-22 09:04:36 +00:00
hal Whitespace fixes for files in sys/mips/nlm 2015-02-28 00:17:29 +00:00
board_cpld.c Whitespace fixes for files in sys/mips/nlm 2015-02-28 00:17:29 +00:00
board_eeprom.c Whitespace fixes for files in sys/mips/nlm 2015-02-28 00:17:29 +00:00
board.c sys: use our nitems() macro when param.h is available. 2016-04-21 19:40:10 +00:00
board.h Whitespace fixes for files in sys/mips/nlm 2015-02-28 00:17:29 +00:00
bus_space_rmi_pci.c Whitespace fixes for files in sys/mips/nlm 2015-02-28 00:17:29 +00:00
bus_space_rmi.c
clock.h
cms.c As <machine/param.h> is included from <sys/param.h>, there is no need 2016-02-22 09:04:36 +00:00
files.xlp Add subclass of simplebus for Broadcom XLP 2015-02-27 23:33:53 +00:00
interrupt.h Whitespace fixes for files in sys/mips/nlm 2015-02-28 00:17:29 +00:00
intr_machdep.c Whitespace fixes for files in sys/mips/nlm 2015-02-28 00:17:29 +00:00
mpreset.S Whitespace fixes for files in sys/mips/nlm 2015-02-28 00:17:29 +00:00
msgring.h Whitespace fixes for files in sys/mips/nlm 2015-02-28 00:17:29 +00:00
std.xlp
tick.c Whitespace fixes for files in sys/mips/nlm 2015-02-28 00:17:29 +00:00
uart_cpu_xlp.c Whitespace fixes for files in sys/mips/nlm 2015-02-28 00:17:29 +00:00
usb_init.c Whitespace fixes for files in sys/mips/nlm 2015-02-28 00:17:29 +00:00
xlp_machdep.c Remove slightly used const values that can be replaced with nitems(). 2016-04-21 15:38:28 +00:00
xlp_pci.c Implement a PCI bus rescan method. 2016-04-27 16:31:12 +00:00
xlp_simplebus.c mips: for pointers replace 0 with NULL. 2016-04-15 14:26:24 +00:00
xlp.h Whitespace fixes for files in sys/mips/nlm 2015-02-28 00:17:29 +00:00