freebsd-skq/sys/dev
jhb c97e88d8d2 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
..
aac aacraid(4): Sanely copyin userland pointers and ensure that we don't get 2016-04-19 18:27:28 +00:00
aacraid aacraid(4): Fix some mostly trivial buffer overruns 2016-04-26 20:59:21 +00:00
acpi_support
acpica Optionally return the output capabilities list from _OSC. 2016-04-22 17:51:19 +00:00
adb sys: use our roundup2/rounddown2() macros when param.h is available. 2016-04-21 19:57:40 +00:00
adlink
advansys sys: use our nitems() macro when param.h is available. 2016-04-21 19:40:10 +00:00
ae Yet more redundant parenthesis from r298431. 2016-04-21 20:30:38 +00:00
age sys/dev: extend use of the howmany() macro when available. 2016-04-26 15:03:15 +00:00
agp sys: use our roundup2/rounddown2() macros when param.h is available. 2016-04-21 19:57:40 +00:00
aha sys/dev: use our nitems() macro when it is avaliable through param.h. 2016-04-19 23:37:24 +00:00
ahb
ahci Implement Auxiliary register. Add PIM_ATA_EXT flag to flag that a SIM 2016-04-17 05:24:36 +00:00
aic Redundant parenthesis from r298431. 2016-04-21 19:48:28 +00:00
aic7xxx
alc
ale sys/dev: use our nitems() macro when it is avaliable through param.h. 2016-04-19 23:37:24 +00:00
alpm
altera sys/dev: use our nitems() macro when it is avaliable through param.h. 2016-04-19 23:37:24 +00:00
amdpm
amdsbwd Add support for AMD FCH watchdog timers. 2016-03-29 12:19:46 +00:00
amdsmb
amdtemp Add PCI ID for family 10h model 30h to amdtemp(4). 2016-04-19 15:07:04 +00:00
amr sys/dev: extend use of the howmany() macro when available. 2016-04-26 15:03:15 +00:00
an
arcmsr
asmc
ata Implement Auxiliary register. Add PIM_ATA_EXT flag to flag that a SIM 2016-04-17 05:24:36 +00:00
ath [ath] add LDPC capability support and LDPC RX support. 2016-04-26 01:37:03 +00:00
atkbdc sys/dev: use our nitems() macro when it is avaliable through param.h. 2016-04-19 23:37:24 +00:00
auxio
bce sys: use our roundup2/rounddown2() macros when param.h is available. 2016-04-21 19:57:40 +00:00
beri
bfe
bge
bhnd [bhnd] Fix ChipCommon probing. 2016-04-25 16:53:13 +00:00
bktr sys/dev: use our nitems() macro when it is avaliable through param.h. 2016-04-19 23:37:24 +00:00
bm
buslogic
bvm
bwi sys/dev: use our nitems() macro when it is avaliable through param.h. 2016-04-19 23:37:24 +00:00
bwn sys/dev: extend use of the howmany() macro when available. 2016-04-26 15:03:15 +00:00
bxe 1. Removed -Wno-shift-negative-value from Makefile 2016-04-25 18:55:01 +00:00
cadence Refactor DTS files for Zynq-based SoCs 2016-04-26 23:09:47 +00:00
cardbus Implement a PCI bus rescan method. 2016-04-27 16:31:12 +00:00
cas
ce
cesa
cfe
cfi
ciss ciss(4): Fix overrun of array 2016-04-26 22:01:07 +00:00
cm
cmx
coretemp
cp
cpuctl
cpufreq
cs
ct
ctau
cx
cxgb tcp/lro: Use tcp_lro_flush_all in device drivers to avoid code duplication 2016-04-01 06:28:33 +00:00
cxgbe Cleanup redundant parenthesis from existing howmany()/roundup() macro uses. 2016-04-22 16:57:42 +00:00
cy sys/dev: extend use of the howmany() macro when available. 2016-04-26 15:03:15 +00:00
cyapa
dc
dcons
de
digi Yet more redundant parenthesis from r298431. 2016-04-21 20:30:38 +00:00
dpaa Fix SMP booting for PowerPC Book-E 2016-04-19 01:48:18 +00:00
dpms
dpt
drm
drm2 i915kms: Fix memory leak if a CRT is detected 2016-04-20 03:48:57 +00:00
dwc sys/dev: use our nitems() macro when it is avaliable through param.h. 2016-04-19 23:37:24 +00:00
e1000 Correct possible underflow conditions when checking for available space 2016-04-18 20:33:44 +00:00
ed Yet more redundant parenthesis from r298431. 2016-04-21 20:30:38 +00:00
eisa
en sys: use our roundup2/rounddown2() macros when param.h is available. 2016-04-21 19:57:40 +00:00
ep
esp
et
etherswitch Cleanup unnecessary semicolons from the kernel. 2016-04-10 23:07:00 +00:00
ex
exca sys: use our roundup2/rounddown2() macros when param.h is available. 2016-04-21 19:57:40 +00:00
extres Fix a format string when uint64_t is not unsigned long long by casting 2016-04-04 10:03:06 +00:00
fatm sys/dev: extend use of the howmany() macro when available. 2016-04-26 15:03:15 +00:00
fb sys/dev: extend use of the howmany() macro when available. 2016-04-26 15:03:15 +00:00
fdc Adjust the fdc worker thread startup to work when APs are started earlier. 2016-04-21 18:37:36 +00:00
fdt Rename ARM_INTRNG and MIPS_INTRNG to INTRNG. This will help with machine 2016-04-15 16:05:41 +00:00
fe
ffec
filemon Remove unneeded return left from refactoring. 2016-03-25 00:14:56 +00:00
firewire
flash Modify mx25l FDT compatible device handling 2016-04-20 14:33:00 +00:00
fxp
gem
glxiic
glxsb
gpio Fix IIC "how" argument dereferencing on big-endian platforms 2016-04-10 23:17:06 +00:00
gxemul
hatm sys: use our roundup2/rounddown2() macros when param.h is available. 2016-04-21 19:57:40 +00:00
hifn sys/dev: use our nitems() macro when it is avaliable through param.h. 2016-04-19 23:37:24 +00:00
hme
hpt27xx
hptiop
hptmv sys: use our roundup2/rounddown2() macros when param.h is available. 2016-04-21 19:57:40 +00:00
hptnr
hptrr
hwpmc sys: use our nitems() macro when param.h is available. 2016-04-21 19:40:10 +00:00
hyperv hyperv/hn: Add stat for # of chimney sending tries 2016-04-27 06:49:16 +00:00
ic
ichiic Use DELAY() instead of sleeping during boot-time attach. 2016-04-09 20:18:34 +00:00
ichsmb
ichwd Unify ichwd(4) attachment messages in dmesg. 2016-03-24 23:24:00 +00:00
ida
ie Cleanup unnecessary semicolons from the kernel. 2016-04-10 23:07:00 +00:00
if_ndis sys/dev: use our nitems() macro when it is avaliable through param.h. 2016-04-19 23:37:24 +00:00
iicbus Convert Allwinner port to extres clk/hwreset/regulator APIs. 2016-04-06 23:11:03 +00:00
iir
intpm
io
ioat ioat(4): ioat_get_dmaengine(): Add M_WAITOK mode 2016-04-09 13:15:34 +00:00
ipmi Optimize IPMI watchdog patting. 2016-03-22 06:24:52 +00:00
ips
ipw
isci Storage Controller Interface driver - typo in unimplemented macro in 2016-04-06 04:50:28 +00:00
iscsi Fix iSCSI initiator crash that could happen with out-of-memory 2016-03-25 16:01:40 +00:00
iscsi_initiator iscsi_initiator(4): Fix use-after-free, double-free 2016-04-26 21:44:08 +00:00
isl
ismt
isp Simplify memory allocation for NS requests. 2016-04-16 06:36:56 +00:00
ispfw Update 25xx chips firmware from 7.03.00 to 8.03.00. 2016-04-11 10:53:25 +00:00
iwi
iwm iwm(4): Don't dereference potentially NULL pointer before NULL check 2016-04-26 19:06:28 +00:00
iwn [iwn] Don't try to seamlessly recover from a firmware panic; just restart 2016-04-03 23:39:58 +00:00
ixgb
ixgbe Correct possible underflow conditions when checking for available space 2016-04-18 20:33:44 +00:00
ixl ixl(4): replace 0 with NULL for pointers. 2016-04-09 17:37:36 +00:00
jme sys/dev: extend use of the howmany() macro when available. 2016-04-26 15:03:15 +00:00
joy
kbd sys/dev: use our nitems() macro when it is avaliable through param.h. 2016-04-19 23:37:24 +00:00
kbdmux Add option to specify built-in keymap for kbdmux 2016-04-07 20:12:45 +00:00
ksyms
le sys: use our nitems() macro when param.h is available. 2016-04-21 19:40:10 +00:00
led
lge
lmc
malo net80211: enable promiscuous mode state change for non-monitor/ahdemo modes 2016-04-21 05:47:47 +00:00
mbox
mc146818
mca
mcd sys/dev: extend use of the howmany() macro when available. 2016-04-26 15:03:15 +00:00
md
mdio
mem
mfi sys/dev: extend use of the howmany() macro when available. 2016-04-26 15:03:15 +00:00
mge
mii Cleanup unnecessary semicolons from the kernel. 2016-04-10 23:07:00 +00:00
mk48txx
mlx sys/dev: extend use of the howmany() macro when available. 2016-04-26 15:03:15 +00:00
mlx5 tcp/lro: Use tcp_lro_flush_all in device drivers to avoid code duplication 2016-04-01 06:28:33 +00:00
mly
mmc sys/dev: extend use of the howmany() macro when available. 2016-04-26 15:03:15 +00:00
mn Replace 0 with NULL for pointers in misc. device drivers. 2016-04-12 17:23:03 +00:00
mpr sys: use our roundup2/rounddown2() macros when param.h is available. 2016-04-21 19:57:40 +00:00
mps sys: use our roundup2/rounddown2() macros when param.h is available. 2016-04-21 19:57:40 +00:00
mpt Replace 0 with NULL for pointers in misc. device drivers. 2016-04-12 17:23:03 +00:00
mrsas Replace 0 with NULL for pointers in misc. device drivers. 2016-04-12 17:23:03 +00:00
mse
msk
mvs Implement Auxiliary register. Add PIM_ATA_EXT flag to flag that a SIM 2016-04-17 05:24:36 +00:00
mwl net80211: enable promiscuous mode state change for non-monitor/ahdemo modes 2016-04-21 05:47:47 +00:00
mxge sys/dev: use our nitems() macro when it is avaliable through param.h. 2016-04-19 23:37:24 +00:00
my
nand sys/dev: use our nitems() macro when it is avaliable through param.h. 2016-04-19 23:37:24 +00:00
ncr sys/dev: extend use of the howmany() macro when available. 2016-04-26 15:03:15 +00:00
nctgpio nctgpio(4): Don't index past the end of sc->pins array 2016-04-20 01:17:18 +00:00
ncv
netfpga10g/nf10bmac
netmap Plug leak in m_unshare. 2016-03-26 23:39:53 +00:00
nfe sys/dev: use our nitems() macro when it is avaliable through param.h. 2016-04-19 23:37:24 +00:00
nfsmb
nge
nmdm
nsp
ntb
null
nvd
nvme
nvram
nvram2env
nxge Replace 0 with NULL for pointers in misc. device drivers. 2016-04-12 17:23:03 +00:00
oce Cleanup unnecessary semicolons from the kernel. 2016-04-10 23:07:00 +00:00
ofw Reduce OFW PCI code duplication - involves ARM, PPC and SPARC64 2016-03-29 15:19:56 +00:00
otus net80211: replace internal LE_READ_*/LE_WRITE_* macro with system 2016-04-20 18:29:30 +00:00
ow Cleanup unnecessary semicolons from the kernel. 2016-04-10 23:07:00 +00:00
patm sys/dev: extend use of the howmany() macro when available. 2016-04-26 15:03:15 +00:00
pbio
pccard Remove slightly used const values that can be replaced with nitems(). 2016-04-21 15:38:28 +00:00
pccbb sys: use our roundup2/rounddown2() macros when param.h is available. 2016-04-21 19:57:40 +00:00
pcf Cleanup unnecessary semicolons from the kernel. 2016-04-10 23:07:00 +00:00
pci Implement a PCI bus rescan method. 2016-04-27 16:31:12 +00:00
pcn
pdq Cleanup unnecessary semicolons from the kernel. 2016-04-10 23:07:00 +00:00
pms sys: use our roundup2/rounddown2() macros when param.h is available. 2016-04-21 19:57:40 +00:00
powermac_nvram
ppbus
ppc
proto
psci
pst
pty pty(4): Use strlcpy to guarantee destination buffer isn't overrun 2016-04-20 04:50:33 +00:00
puc
qlxgb tcp/lro: Use tcp_lro_flush_all in device drivers to avoid code duplication 2016-04-01 06:28:33 +00:00
qlxgbe Cleanup unnecessary semicolons from the kernel. 2016-04-10 23:07:00 +00:00
qlxge tcp/lro: Use tcp_lro_flush_all in device drivers to avoid code duplication 2016-04-01 06:28:33 +00:00
quicc
ral sys/dev: extend use of the howmany() macro when available. 2016-04-26 15:03:15 +00:00
random dev/random: use our roundup() macro instead of re-implementing it. 2016-04-25 21:14:32 +00:00
rc sys/dev: use our nitems() macro when it is avaliable through param.h. 2016-04-19 23:37:24 +00:00
rccgpio
re sys/dev: use our nitems() macro when it is avaliable through param.h. 2016-04-19 23:37:24 +00:00
rl sys/dev: use our nitems() macro when it is avaliable through param.h. 2016-04-19 23:37:24 +00:00
rndtest sys: use our nitems() macro when param.h is available. 2016-04-21 19:40:10 +00:00
rp
rt Add compat strings used by OpenWRT to some Mediatek/Ralink drivers 2016-04-20 14:47:16 +00:00
rtwn net80211: replace internal LE_READ_*/LE_WRITE_* macro with system 2016-04-20 18:29:30 +00:00
safe
sbni sys/dev: extend use of the howmany() macro when available. 2016-04-26 15:03:15 +00:00
scc
scd sys/dev: extend use of the howmany() macro when available. 2016-04-26 15:03:15 +00:00
sdhci
sec
sf sys/dev: use our nitems() macro when it is avaliable through param.h. 2016-04-19 23:37:24 +00:00
sfxge sys/dev: extend use of the howmany() macro when available. 2016-04-26 15:03:15 +00:00
sge Remove slightly used const values that can be replaced with nitems(). 2016-04-21 15:38:28 +00:00
si
siba sys/dev: extend use of the howmany() macro when available. 2016-04-26 15:03:15 +00:00
siis Implement Auxiliary register. Add PIM_ATA_EXT flag to flag that a SIM 2016-04-17 05:24:36 +00:00
sio sys/dev: use our nitems() macro when it is avaliable through param.h. 2016-04-19 23:37:24 +00:00
sis
sk
smbus
smc
sn
snc
snp
sound emu10kx: Don't iterate beyond array bounds 2016-04-26 18:20:41 +00:00
speaker sys/dev: use our nitems() macro when it is avaliable through param.h. 2016-04-19 23:37:24 +00:00
spibus Fix the parameter type according to method declaration. 2016-04-26 16:02:13 +00:00
ste
stg
stge sys/dev: use our nitems() macro when it is avaliable through param.h. 2016-04-19 23:37:24 +00:00
streams Fix streams and svr4 module dependency. Both modules are complaining about 2016-04-23 20:29:55 +00:00
sym sys/dev: extend use of the howmany() macro when available. 2016-04-26 15:03:15 +00:00
syscons
tdfx Cleanup unnecessary semicolons from the kernel. 2016-04-10 23:07:00 +00:00
terasic
ti sys: use our roundup2/rounddown2() macros when param.h is available. 2016-04-21 19:57:40 +00:00
tl
tpm
trm
tsec
twa
twe
tws
tx
txp
uart Stop including machine/fdt.h from the fdt uart code, it's unneeded. 2016-04-26 13:16:45 +00:00
ubsec
urtwn urtwn: optimize rate lookup in the urtwn_ra_init() 2016-04-21 20:34:38 +00:00
usb sys/dev: extend use of the howmany() macro when available. 2016-04-26 15:03:15 +00:00
utopia
vge
viapm
viawd
videomode
virtio
vkbd sys/dev: use our nitems() macro when it is avaliable through param.h. 2016-04-19 23:37:24 +00:00
vmware/vmxnet3
vnic Fix sending TSO packets larger than single DMA segment on VNIC 2016-04-08 16:14:18 +00:00
vr
vt sys/dev: extend use of the howmany() macro when available. 2016-04-26 15:03:15 +00:00
vte
vx
vxge Replace 0 with NULL for pointers in misc. device drivers. 2016-04-12 17:23:03 +00:00
watchdog
wb
wbwd sys/dev: use our nitems() macro when it is avaliable through param.h. 2016-04-19 23:37:24 +00:00
wds
wi
wl
wpi wpi, iwn: fix check in find_eeprom_channel() 2016-04-03 14:38:26 +00:00
wtap
xe
xen sys/dev: extend use of the howmany() macro when available. 2016-04-26 15:03:15 +00:00
xilinx Assert CS for single transfers. 2016-04-19 15:36:18 +00:00
xl