freebsd-dev/sys
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
..
amd64 AMD64 pmap: Use howmany() macro 2016-04-24 21:35:01 +00:00
arm Add dtb/zynq to the list of extra modules required by Zedboard 2016-04-26 21:11:52 +00:00
arm64 Disable ACPI on arm64 ad it has only had minimal testing and is causing 2016-04-26 14:21:39 +00:00
boot Refactor DTS files for Zynq-based SoCs 2016-04-26 23:09:47 +00:00
bsm Merge from contrib/openbsm to bring the kernel audit bits up to date with OpenBSM 1.2 alpha 4: 2015-12-20 23:22:04 +00:00
cam cam: unsign some types to match their definitions and avoid overflows. 2016-04-27 15:35:05 +00:00
cddl Increase DTRACE_FUNCNAMELEN from 128 to 192. 2016-04-25 18:44:11 +00:00
compat osd(9): Change array pointer to array pointer type from void* 2016-04-26 19:57:35 +00:00
conf o Add device tree files and kernel configuration files 2016-04-26 13:22:08 +00:00
contrib Zero the newly allocated spinlock. 2016-04-24 01:38:45 +00:00
crypto aesni(4): Initialize error before use 2016-04-20 03:05:32 +00:00
ddb ddb: Make use of our roundup() macro when available. 2016-04-26 01:52:35 +00:00
dev Implement a PCI bus rescan method. 2016-04-27 16:31:12 +00:00
fs msdosfs: Prevent buffer overflow when expanding win95 names 2016-04-26 20:36:32 +00:00
gdb
geom geom: unsign some types to match their definitions and avoid overflows. 2016-04-27 15:10:40 +00:00
gnu Change OpenWRT imported dtsi files 2016-04-20 14:29:03 +00:00
i386 Cleanup redundant parenthesis from existing howmany()/roundup() macro uses. 2016-04-22 16:57:42 +00:00
isa isa/pnp: for pointers replace 0 with NULL. 2016-04-14 17:20:35 +00:00
kern Add a new rescan method to the bus interface. 2016-04-27 16:29:03 +00:00
kgssapi kgssapi: Don't leak memory in error cases 2016-04-26 18:11:45 +00:00
libkern kern: for pointers replace 0 with NULL. 2016-04-15 16:10:11 +00:00
mips Implement a PCI bus rescan method. 2016-04-27 16:31:12 +00:00
modules Add dtb/zynq to generate dtb files for Zynq-based boards 2016-04-26 21:11:01 +00:00
net radix_mpath: Don't derefence a NULL pointer in for loop iteration 2016-04-26 20:27:17 +00:00
net80211 [net80211] add the STBC ioctl support. 2016-04-26 01:29:26 +00:00
netgraph sys: extend use of the howmany() macro when available. 2016-04-26 15:38:17 +00:00
netinet tcp/lro: Fix typo. 2016-04-27 09:40:55 +00:00
netinet6 in_lltable_alloc and in6 copy: Don't leak LLE in error path 2016-04-26 23:13:48 +00:00
netipsec netipsec: Don't leak memory when deep copy fails 2016-04-26 23:23:44 +00:00
netnatm kernel: use our nitems() macro when it is available through param.h. 2016-04-19 23:48:27 +00:00
netpfil Make create_object callback optional and return EOPNOTSUPP when it isn't 2016-04-27 15:28:25 +00:00
netsmb Remove unused SMB_DIALECT_MAX macro. 2016-04-20 21:13:24 +00:00
nfs Do not try to install a default route for each interface found, because 2016-03-27 23:16:37 +00:00
nfsclient
nfsserver
nlm Remove slightly used const values that can be replaced with nitems(). 2016-04-21 15:38:28 +00:00
ofed Fix NOIP kernels to compile. 2016-04-24 15:56:05 +00:00
opencrypto Break up opencrypto/xform.c so it can be reused piecemeal 2015-12-30 22:43:07 +00:00
pc98 Use our nitems() macro when param.h is available. 2016-04-20 15:45:55 +00:00
powerpc Implement a PCI bus rescan method. 2016-04-27 16:31:12 +00:00
riscv Rework the list of all pmaps: embed the list link into pmap. 2016-04-26 14:38:18 +00:00
rpc kgssapi(4): Fix string overrun in Kerberos principal construction 2016-04-20 04:45:23 +00:00
security sys: use our nitems() macro when param.h is available. 2016-04-21 19:40:10 +00:00
sparc64 Implement a PCI bus rescan method. 2016-04-27 16:31:12 +00:00
sys Add a new rescan method to the bus interface. 2016-04-27 16:29:03 +00:00
teken Sync HPA and VPA implementations with CUP. 2015-08-24 07:49:27 +00:00
tests Style 9 changes. 2015-11-12 10:31:14 +00:00
tools Fix MFS builds when both MD_ROOT_SIZE and MFS_IMAGE are specified 2016-02-02 07:02:51 +00:00
ufs Add FEATURE knob for testing for UFS extended attribute kernel support 2016-04-22 08:09:27 +00:00
vm Cleanup redundant parenthesis from existing howmany()/roundup() macro uses. 2016-04-22 16:57:42 +00:00
x86 sys: use our roundup2/rounddown2() macros when param.h is available. 2016-04-21 19:57:40 +00:00
xdr RPC: for pointers replace 0 with NULL. 2016-04-14 17:06:37 +00:00
xen xenbus: add a comment with the names of the generated accessors 2016-01-15 14:34:31 +00:00
Makefile Add riscv to the list of architectures for cscope. 2016-02-29 16:39:27 +00:00