freebsd-dev/sys/dev
John Baldwin 42a346fa63 For some buses, devices may have active resources assigned even though they
are not allocated by the device driver.  These resources should still appear
allocated from the system's perspective so that their assigned ranges are
not reused by other resource requests.  The PCI bus driver has used a hack
to effect this for a while now where it uses rman_set_device() to assign
devices to the PCI bus when they are first encountered and later assigns
them to the actual device when a driver allocates a BAR.  A few downsides of
this approach is that it results in somewhat confusing devinfo -r output as
well as not being very easily portable to other bus drivers.

This commit adds generic support for "reserved" resources to the resource
list API used by many bus drivers to manage the resources of child devices.
A resource may be reserved via resource_list_reserve().  This will allocate
the resource from the bus' parent without activating it.
resource_list_alloc() recognizes an attempt to allocate a reserved resource.
When this happens it activates the resource (if requested) and then returns
the reserved resource.  Similarly, when a reserved resource is released via
resource_list_release(), it is deactivated (if it is active) and the
resource is then marked reserved again, but is left allocated from the
bus' parent.  To completely remove a reserved resource, a bus driver may
use resource_list_unreserve().  A bus driver may use resource_list_busy()
to determine if a reserved resource is allocated by a child device or if
it can be unreserved.

The PCI bus driver has been changed to use this framework instead of
abusing rman_set_device() to keep track of reserved vs allocated resources.

Submitted by:	imp (an older version many moons ago)
MFC after:	1 month
2009-12-09 21:52:53 +00:00
..
aac - Try pre-allocating all FIBs upfront. Previously we tried pre-allocating 2009-12-08 05:35:51 +00:00
acpi_support - Numerous whitespace and style fixes. 2009-10-29 18:03:16 +00:00
acpica Merge ACPICA 20091112. 2009-11-16 21:47:12 +00:00
adb Add support for interpreting taps on ADB touchpads as a button click. 2009-11-28 17:48:25 +00:00
adlink
advansys Separate the parallel scsi knowledge out of the core of the XPT, and 2009-07-10 08:18:08 +00:00
ae Fix multicast handling. All Atheros controllers use big-endian form 2009-09-29 23:03:16 +00:00
age Fix multicast handling. All Atheros controllers use big-endian form 2009-09-29 23:03:16 +00:00
agp Add pci id's for Intel G41 chipset 2009-10-11 01:51:35 +00:00
aha
ahb
ahci Add Asynchronous Notification support for controllers without SNTF 2009-12-06 23:56:54 +00:00
aic Snip redundant assignment. 2009-05-13 22:31:25 +00:00
aic7xxx Add sysctls in ahd(4) in order to keep track of different classes of 2009-11-13 22:57:20 +00:00
alc Fix multicast handling. All Atheros controllers use big-endian form 2009-09-29 23:03:16 +00:00
ale Fix multicast handling. All Atheros controllers use big-endian form 2009-09-29 23:03:16 +00:00
amd Separate the parallel scsi knowledge out of the core of the XPT, and 2009-07-10 08:18:08 +00:00
amdsbwd amdsbwd: new driver for AMD SB600/SB7xx watchdog timer 2009-11-30 11:44:03 +00:00
amdtemp Restore (undocumented) support for early revisions and add more comments. 2009-09-14 23:08:19 +00:00
amr Remove spurious ) 2009-10-28 15:22:58 +00:00
an - For 350 chips, don't set various INTR bits in TX control word; turning INTR 2009-11-24 16:57:35 +00:00
arcmsr Initialize the whole message unit's DMA buffer to zero, this fixes a panic 2009-11-09 07:28:29 +00:00
asmc Use %zu for size_t. 2009-09-14 21:33:00 +00:00
asr Unmark the ASR Compat IOCTLs as BURN_BRIDGES, per scottl@ 2009-05-09 17:47:42 +00:00
ata MFp4: 2009-12-06 00:10:13 +00:00
ath Add WorldB SKU. 2009-11-18 18:48:18 +00:00
atkbdc Rewrite x86bios and update its dependent drivers. 2009-10-19 20:58:10 +00:00
auxio
bce - Introduce new option BCE_JUMBO_HDRSPLIT that allows user to enable header 2009-10-21 12:47:09 +00:00
bfe Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ 2009-06-26 11:45:06 +00:00
bge Create sysctl node(dev.bge.%d.focred_collapse) instead of 2009-12-08 17:54:23 +00:00
bktr Temporarily revert the new-bus locking for 8.0 release. It will be 2009-08-20 19:17:53 +00:00
bm Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ 2009-06-26 11:45:06 +00:00
buslogic
bwi More consistent whitespace. 2009-11-11 20:29:40 +00:00
cardbus Minorly improved debugging. Use the DEVPRINTF macro and report the 2009-03-13 05:31:27 +00:00
cas Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ 2009-06-26 11:45:06 +00:00
ce Always use a private timer instead of if_watchdog and if_timer to drive 2009-11-17 16:43:02 +00:00
cfe Last minute TTY API change: remove mutex argument from tty_alloc(). 2009-05-29 06:41:23 +00:00
cfi Move from using devclass_find_free_unit(cfi_diskclass, 0) to -1, since 2009-06-10 17:41:24 +00:00
ciss Sync driver with Yahoo: 2009-09-16 23:27:14 +00:00
cm - Add a private timer to drive the transmit watchdog instead of using 2009-11-19 22:06:40 +00:00
cmx
coretemp Change 'dev.cpu.N.temperature', sysctl I (degC) to IK (Kelvin). 2009-09-06 12:01:29 +00:00
cp Always use a private timer instead of if_watchdog and if_timer to drive 2009-11-17 16:43:02 +00:00
cpuctl - Add support to atomically set/clear individual bits of a MSR register 2009-06-30 12:35:47 +00:00
cpufreq
cs Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ 2009-06-26 11:45:06 +00:00
ct
ctau Always use a private timer instead of if_watchdog and if_timer to drive 2009-11-17 16:43:02 +00:00
cx Always use a private timer instead of if_watchdog and if_timer to drive 2009-11-17 16:43:02 +00:00
cxgb T3 firmware 7.8.0 for cxgb(4) 2009-12-01 22:23:15 +00:00
cy
dc Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ 2009-06-26 11:45:06 +00:00
dcons Last minute TTY API change: remove mutex argument from tty_alloc(). 2009-05-29 06:41:23 +00:00
de Use a private timer to run the statistics timer instead of (ab)using 2009-11-17 14:13:30 +00:00
digi Remove unused files from the digi(4) driver. 2009-01-16 14:45:48 +00:00
dpms - Remove a redundant check for dpms(4). 2009-11-12 18:16:35 +00:00
dpt
drm Fix botched git -> svn merge. 2009-10-30 18:30:13 +00:00
e1000 Remove phantom line of code that somehow slipped 2009-12-08 18:54:37 +00:00
ed Use a private callout timer to drive the transmit watchdog instead of using 2009-11-17 14:23:09 +00:00
eisa strict kobj signatures: fix assortment of bus_read_ivar impls 2009-06-11 17:06:58 +00:00
en
ep - Add a private timer to drive the transmit watchdog instead of using 2009-11-19 22:06:40 +00:00
esp
et Only Tx checksum offloading is supported now. Remove experimental 2009-11-20 20:43:16 +00:00
ex Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ 2009-06-26 11:45:06 +00:00
exca __LP64__ is what's defined, not _LP64_, according to the manual (and 2009-03-09 13:29:13 +00:00
fatm - Add a private timer to drive the transmit watchdog instead of using 2009-11-19 22:06:40 +00:00
fb - Remove a redundant check for dpms(4). 2009-11-12 18:16:35 +00:00
fdc Make isa_dma functions MPSAFE by introducing its own private lock. These 2009-11-09 20:29:10 +00:00
fe Fix comment typo. 2009-11-25 13:31:17 +00:00
firewire Revert previous commit and add myself to the list of people who should 2009-09-08 13:19:05 +00:00
flash - Remove nonexistent header file from includes list 2009-05-13 18:31:28 +00:00
fxp It seems some 82559ER controllers do not support Rx checksum 2009-09-28 19:40:16 +00:00
gem Work around a quirk with the G5 Xserve, which has a fake GMAC controller 2009-10-18 17:11:16 +00:00
glxsb
hatm Free pointer from getenv() when done with it. 2009-11-30 18:26:46 +00:00
hifn shutdown returns an int 2009-02-05 19:37:49 +00:00
hme Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ 2009-06-26 11:45:06 +00:00
hptiop Revert previous commit and add myself to the list of people who should 2009-09-08 13:19:05 +00:00
hptmv MFp4: 2009-06-24 20:43:51 +00:00
hptrr Introduce hw.hptrr.attach_generic loader tunable to deny hptrr driver 2009-11-08 11:33:51 +00:00
hwpmc Use a better check for a valid kernel stack address when capturing 2009-12-03 14:59:42 +00:00
ic add %b formats for various registers 2009-06-21 19:17:22 +00:00
ichsmb ichsmb: drop default attachment to generic smbus hardware 2009-12-04 05:45:46 +00:00
ichwd ichwd: don't attach to isa pnp device(s) by accident 2009-11-07 11:41:23 +00:00
ida
ie Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ 2009-06-26 11:45:06 +00:00
ieee488 Make isa_dma functions MPSAFE by introducing its own private lock. These 2009-11-09 20:29:10 +00:00
if_ndis ndis_scan_results() can sleep if the scan results are not ready when 2009-12-02 16:26:18 +00:00
iicbus - Rename ds1672 and ds133x devices to "ds1672_rtc" and "ds133x_rtc" 2009-04-21 22:48:12 +00:00
iir Include <sys/sysctl.h>, to get the declarations of ostype and 2009-12-02 20:24:37 +00:00
io
ipmi Import ACPICA 20090521. 2009-06-05 18:44:36 +00:00
ips Check pointer for NULL before dereferencing it, not after. 2009-10-21 15:04:50 +00:00
ipw For ic_opmode switch cases, provide a default label with a printf saying 2009-07-10 15:28:33 +00:00
iscsi/initiator Fix iSCSI initiator and vpo driver operation, broken by CAM changes. 2009-08-18 08:46:54 +00:00
isp Fix cases where we've managed to get a Loop UP event prior to initializing 2009-12-04 03:34:12 +00:00
ispfw Add 8Gb card firmware. Update some 2Gb and 4Gb f/w sets. 2009-08-01 00:57:34 +00:00
iwi For ic_opmode switch cases, provide a default label with a printf saying 2009-07-10 15:28:33 +00:00
iwn Updates to the iwn driver: 2009-10-24 09:55:11 +00:00
ixgb - Use callout_init_mtx() instead of callout_init(..., CALLOUT_MPSAFE). 2009-11-19 18:37:55 +00:00
ixgbe Update driver to Intel version 2.0.7: 2009-12-07 21:30:54 +00:00
jme Remove unnecessary device reinitialization. 2009-09-28 19:33:52 +00:00
joy Use si_drv1 to store joy(4)'s softc. 2009-04-14 11:23:09 +00:00
kbd Use an unsigned integer for storing the key code. 2009-09-22 11:29:11 +00:00
kbdmux Use proper types in kbdmux_kbd_getc(): 2009-06-08 20:24:29 +00:00
ksyms strict kobj signatures: linker_if fixes 2009-06-11 17:05:45 +00:00
le Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ 2009-06-26 11:45:06 +00:00
led
lge - Hook into the existing stat timer to drive the transmit watchdog instead 2009-11-19 22:14:23 +00:00
lindev lindev(4) [1] is supposed to be a collection of linux-specific pseudo 2009-09-26 12:45:28 +00:00
lmc This driver has two modes, a netgraph mode and an ifnet mode. In the 2009-11-19 18:21:51 +00:00
malo - Add a private timer to drive the transmit watchdog instead of using 2009-11-19 22:06:40 +00:00
mc146818
mca strict kobj signatures: fix assortment of bus_read_ivar impls 2009-06-11 17:06:58 +00:00
mcd
md Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
mem
mfi Revert r200231. It was already taken cared by jhb long ago. 2009-12-07 21:24:07 +00:00
mge Introduce MII_ADDR_BASE option on ARM, which allows to override the default 2009-08-25 09:47:12 +00:00
mii Add BCM5761 PHY id. 2009-11-02 18:15:11 +00:00
mk48txx
mlx Temporarily revert the new-bus locking for 8.0 release. It will be 2009-08-20 19:17:53 +00:00
mly Convert mlx(4) and mly(4) to si_drv1 instead of dev2unit(). 2009-04-18 07:36:38 +00:00
mmc Temporarily revert the new-bus locking for 8.0 release. It will be 2009-08-20 19:17:53 +00:00
mn
mpt Use callout_init_mtx on FreeBSD versions recent enough. This closes 2009-10-20 02:35:12 +00:00
mse Make mse(4) use si_drv1, instead of using unit numbers. 2009-04-20 15:15:24 +00:00
msk It seems generation of link state change of e1000phy(4) is not 2009-11-17 18:19:45 +00:00
mwl - Add a private timer to drive the transmit watchdog instead of using 2009-11-19 22:06:40 +00:00
mxge Make mxge do a better job recovering from NIC h/w faults 2009-10-20 18:58:28 +00:00
my - This driver used the if_watchdog timer both as a watchdog on transmit and 2009-11-19 18:43:43 +00:00
ncv strict kobj sigs: fix assortment of device_detach and device_shutdown impls 2009-06-11 17:14:28 +00:00
nfe Take a step towards removing if_watchdog/if_timer. Don't explicitly set 2009-11-06 14:55:01 +00:00
nge Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ 2009-06-26 11:45:06 +00:00
nmdm - Remove an unnecessary memory barrier from an atomic op. 2009-06-09 13:33:03 +00:00
nsp strict kobj sigs: fix assortment of device_detach and device_shutdown impls 2009-06-11 17:14:28 +00:00
null Remove unneeded minor numbers from /dev/null and /dev/zero. 2009-09-06 09:59:02 +00:00
nve - Hook into the existing stat timer to drive the transmit watchdog instead 2009-11-19 22:14:23 +00:00
nvram
nxge Fix compile after previous "harmless" commit. 2009-11-19 21:47:54 +00:00
ofw Missed style fixes. 2009-06-14 00:15:26 +00:00
patm Take a step towards removing if_watchdog/if_timer. Don't explicitly set 2009-11-06 14:55:01 +00:00
pbio
pccard Another PC Card that needs the CIS strings for the Surecom EP-427X, 2009-04-24 17:27:45 +00:00
pccbb Temporarily revert the new-bus locking for 8.0 release. It will be 2009-08-20 19:17:53 +00:00
pcf strict kobj signatures: fix iicbus_write impl in dev/pcf 2009-06-11 17:15:44 +00:00
pci For some buses, devices may have active resources assigned even though they 2009-12-09 21:52:53 +00:00
pcn - Hook into the existing stat timer to drive the transmit watchdog instead 2009-11-19 22:14:23 +00:00
pdq Several fixes to these drivers. Note that these two drivers are actually 2009-11-19 19:25:47 +00:00
powermac_nvram Use si_drv1 instead of dev2unit() in powermac_nvram. 2009-04-14 13:18:39 +00:00
ppbus Check pointer for NULL before dereferencing it, not after. 2009-10-22 06:51:29 +00:00
ppc Added entries for Lava SP-PCI (1 serial + 1 parallel) PCI card. The 2009-02-11 00:08:03 +00:00
pst Temporarily revert the new-bus locking for 8.0 release. It will be 2009-08-20 19:17:53 +00:00
pty Move ptmx into pty(4). 2009-09-06 10:27:45 +00:00
puc Add support for the NetMos NM9865 family of Serial/Parallel ports. 2009-12-07 20:05:02 +00:00
quicc
ral Implementation of the upcoming Wireless Mesh standard, 802.11s, on the 2009-07-11 15:02:45 +00:00
random There is rubbish here 2009-05-25 22:50:11 +00:00
rc
re Move interface reinitialization down after disabling WOL in resume 2009-11-19 23:14:40 +00:00
rndtest
rp These checks against BUSY aren't needed: the newbus layer does this 2009-09-05 08:38:25 +00:00
safe shutdown returns an int 2009-02-05 19:37:49 +00:00
sbni
scc Make iclear return int, since that matches all function definitions of it. 2009-02-05 19:32:34 +00:00
scd
sdhci Add support for interruptless kernel dumping. 2009-02-17 19:12:15 +00:00
sec Fix Book-E/MPC85XX build. Some prototypes were wrong and got revealed with 2009-06-13 08:57:04 +00:00
sf Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ 2009-06-26 11:45:06 +00:00
si Last minute TTY API change: remove mutex argument from tty_alloc(). 2009-05-29 06:41:23 +00:00
siba
siis Increase Max Read Request Size for PCIe chips from 512 to 1024 bytes. 2009-12-09 13:10:10 +00:00
sio remove now-redunant cardbus attachment. 2009-03-09 13:23:54 +00:00
sis Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ 2009-06-26 11:45:06 +00:00
sk Take a step towards removing if_watchdog/if_timer. Don't explicitly set 2009-11-06 14:55:01 +00:00
smbus Make generic_intr routines match prototype. 2009-03-09 13:30:00 +00:00
smc strict kobj signatures: fix assortment of miibus_writereg impls 2009-06-11 17:14:54 +00:00
sn - Add a private timer to drive the transmit watchdog instead of using 2009-11-19 22:06:40 +00:00
snc Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ 2009-06-26 11:45:06 +00:00
snp Add ttydisc_rint_simple(). 2009-08-23 08:04:40 +00:00
sound Add two Cirrus Logic codec IDs. 2009-11-26 20:25:57 +00:00
speaker Change the type of uio_resid member of struct uio from int to ssize_t. 2009-06-25 18:46:30 +00:00
spibus strict kobj signatures: fix assortment of bus_read_ivar impls 2009-06-11 17:06:58 +00:00
ste - Add a private timer to drive the transmit watchdog instead of using 2009-11-19 22:06:40 +00:00
stg strict kobj sigs: fix assortment of device_detach and device_shutdown impls 2009-06-11 17:14:28 +00:00
stge Take a step towards removing if_watchdog/if_timer. Don't explicitly set 2009-11-06 14:55:01 +00:00
streams The streams ptm code is pretty awful and likely incorrect. I don't know 2009-02-16 20:12:28 +00:00
sym While certain supported Symbios/LSI SCSI chips (532c896, 53c1000, 53c1010) 2009-10-31 17:06:36 +00:00
syscons Include <sys/ttydefaults.h>, instead of doing it through <sys/termios.h>. 2009-11-28 16:25:55 +00:00
tdfx Let tdfx(4) use si_drv1 instead of using dev2unit(). 2009-04-14 11:57:26 +00:00
ti - Add a private timer to drive the transmit watchdog instead of using 2009-11-19 22:06:40 +00:00
tl - Hook into the existing stat timer to drive the transmit watchdog instead 2009-11-19 22:14:23 +00:00
trm Separate the parallel scsi knowledge out of the core of the XPT, and 2009-07-10 08:18:08 +00:00
tsec tsec: Use IFQ_DRV macros for managing interface packet queue. 2009-11-20 13:28:06 +00:00
twa Change the command argument to ioctl routines to u_long to avoid 2009-09-22 16:28:07 +00:00
twe Change the command argument to ioctl routines to u_long to avoid 2009-09-22 16:28:07 +00:00
tx Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ 2009-06-26 11:45:06 +00:00
txp Make sure rx descriptor ring align on 16 bytes. I guess the 2009-08-31 22:09:48 +00:00
uart Add ID for NetMos NM9820 Serial Port chip, found on CardBus serial adapter. 2009-12-08 14:55:07 +00:00
ubsec strict kobj sigs: fix assortment of device_detach and device_shutdown impls 2009-06-11 17:14:28 +00:00
usb Fix hardware issue with FTDI chips: avoid sending a zero length packet due to 2009-12-09 20:28:33 +00:00
utopia
vge Several fixes to this driver: 2009-11-19 19:35:15 +00:00
vkbd
vr Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ 2009-06-26 11:45:06 +00:00
vx - Add a private timer to drive the transmit watchdog instead of using 2009-11-19 22:06:40 +00:00
watchdog
wb - Hook into the existing stat timer to drive the transmit watchdog instead 2009-11-19 22:14:23 +00:00
wds
wi Revert previous commit and add myself to the list of people who should 2009-09-08 13:19:05 +00:00
wl These drivers only set if_timer but never set if_watchdog. Just remove 2009-11-19 18:11:23 +00:00
wpi Properly turn off debugging 2009-11-08 02:33:33 +00:00
xe Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ 2009-06-26 11:45:06 +00:00
xen Add media ioctl support and link notifications so that devd will attempt 2009-12-01 17:29:25 +00:00
xl Make xl(4) build with Tx checksum offload. 2009-07-09 01:58:59 +00:00