opnsense-src/sys/dev
John Baldwin e706f7f0c7 Revamp the MSI/MSI-X code a bit to achieve two main goals:
- Simplify the amount of work that has be done for each architecture by
  pushing more of the truly MI code down into the PCI bus driver.
- Don't bind MSI-X indicies to IRQs so that we can allow a driver to map
  multiple MSI-X messages into a single IRQ when handling a message
  shortage.

The changes include:
- Add a new pcib_if method: PCIB_MAP_MSI() which is called by the PCI bus
  to calculate the address and data values for a given MSI/MSI-X IRQ.
  The x86 nexus drivers map this into a call to a new 'msi_map()' function
  in msi.c that does the mapping.
- Retire the pcib_if method PCIB_REMAP_MSIX() and remove the 'index'
  parameter from PCIB_ALLOC_MSIX().  MD code no longer has any knowledge
  of the MSI-X index for a given MSI-X IRQ.
- The PCI bus driver now stores more MSI-X state in a child's ivars.
  Specifically, it now stores an array of IRQs (called "message vectors" in
  the code) that have associated address and data values, and a small
  virtual version of the MSI-X table that specifies the message vector
  that a given MSI-X table entry uses.  Sparse mappings are permitted in
  the virtual table.
- The PCI bus driver now configures the MSI and MSI-X address/data
  registers directly via custom bus_setup_intr() and bus_teardown_intr()
  methods.  pci_setup_intr() invokes PCIB_MAP_MSI() to determine the
  address and data values for a given message as needed.  The MD code
  no longer has to call back down into the PCI bus code to set these
  values from the nexus' bus_setup_intr() handler.
- The PCI bus code provides a callout (pci_remap_msi_irq()) that the MD
  code can call to force the PCI bus to re-invoke PCIB_MAP_MSI() to get
  new values of the address and data fields for a given IRQ.  The x86
  MSI code uses this when an MSI IRQ is moved to a different CPU, requiring
  a new value of the 'address' field.
- The x86 MSI psuedo-driver loses a lot of code, and in fact the separate
  MSI/MSI-X pseudo-PICs are collapsed down into a single MSI PIC driver
  since the only remaining diff between the two is a substring in a
  bootverbose printf.
- The PCI bus driver will now restore MSI-X state (including programming
  entries in the MSI-X table) on device resume.
- The interface for pci_remap_msix() has changed.  Instead of accepting
  indices for the allocated vectors, it accepts a mini-virtual table
  (with a new length parameter).  This table is an array of u_ints, where
  each value specifies which allocated message vector to use for the
  corresponding MSI-X message.  A vector of 0 forces a message to not
  have an associated IRQ.  The device may choose to only use some of the
  IRQs assigned, in which case the unused IRQs must be at the "end" and
  will be released back to the system.  This allows a driver to use the
  same remap table for different shortage values.  For example, if a driver
  wants 4 messages, it can use the same remap table (which only uses the
  first two messages) for the cases when it only gets 2 or 3 messages and
  in the latter case the PCI bus will release the 3rd IRQ back to the
  system.

MFC after:	1 month
2007-05-02 17:50:36 +00:00
..
aac Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will 2007-04-15 08:49:19 +00:00
acpi_support Utilize led_create_state in order to preserve the status of the ThinkLight 2007-04-24 23:09:37 +00:00
acpica Revamp the MSI/MSI-X code a bit to achieve two main goals: 2007-05-02 17:50:36 +00:00
adlink o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
advansys Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will 2007-04-15 08:49:19 +00:00
agp Restore agp aperture size after resume, in case it is modified after boot. 2007-01-06 08:31:31 +00:00
aha Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will 2007-04-15 08:49:19 +00:00
ahb Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will 2007-04-15 08:49:19 +00:00
aic Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will 2007-04-15 08:49:19 +00:00
aic7xxx Up until now, the free SCB pool received only a small initial allocation, 2007-04-19 18:53:52 +00:00
amd Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will 2007-04-15 08:49:19 +00:00
amr Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will 2007-04-15 08:49:19 +00:00
an o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
ar Don't call bus_deactivate_resource() explicitly before calling 2007-03-21 03:38:37 +00:00
arcmsr Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will 2007-04-15 08:49:19 +00:00
arl o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
asr Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will 2007-04-15 08:49:19 +00:00
ata MPSAFE atapi-cam 2007-05-02 15:30:24 +00:00
ath make dev.ath.N.ledpin have an immediate effect 2007-04-23 05:57:06 +00:00
atkbdc o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
auxio - Only touch the LED bit of the (LED) AUXIO register when turning the 2006-01-26 19:04:18 +00:00
awi o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
bce Catch up the rest of the drivers with the ether_vlan_mtap modifications. 2007-03-04 03:38:08 +00:00
bfe o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
bge Reflect MFC of pci_find_extcap(). 2007-05-01 19:18:12 +00:00
bktr o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
buslogic Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will 2007-04-15 08:49:19 +00:00
cardbus Cope gracefully with device_get_children returning an error. 2007-01-19 08:49:28 +00:00
ce Remove ancient preprocessor code. Fix module compilation. 2007-03-25 20:21:31 +00:00
ciss Streamline locking in ciss_free() 2007-05-02 04:44:31 +00:00
cm Don't call bus_deactivate_resource() explicitly before calling 2007-03-21 03:38:37 +00:00
cnw Catchup to filters by piso. 2007-02-23 19:27:49 +00:00
cp Don't call bus_deactivate_resource() explicitly before calling 2007-03-21 03:38:37 +00:00
cpufreq Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
cs o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
ct o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
ctau Don't call bus_deactivate_resource() explicitly before calling 2007-03-21 03:38:37 +00:00
cx Don't call bus_deactivate_resource() explicitly before calling 2007-03-21 03:38:37 +00:00
cxgb Default to using a single queue as this is currently the only way to achieve 2007-04-26 08:38:00 +00:00
cy o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
dc o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
dcons Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
de o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
digi Fix our ioctl(2) implementation when the argument is "int". New 2006-09-27 19:57:02 +00:00
dpt Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will 2007-04-15 08:49:19 +00:00
drm o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
ed Tell a statistic checker that not checking the return value of the probing 2007-04-01 14:15:26 +00:00
eisa Make the eisa probe messages just like all the others in the system. 2005-08-01 07:09:15 +00:00
em Revert previous change and take back a pointy hat. 2007-02-28 09:04:46 +00:00
en o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
ep o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 15:55:37 +00:00
esp Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will 2007-04-15 08:49:19 +00:00
ex s/destory/destroy/ (except for the code in contrib/). 2007-04-16 12:31:35 +00:00
exca - Fix exca_(io|mem)_map() to return proper errno values. 2007-03-23 17:15:07 +00:00
fatm o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
fb Rototill the sparc64 nexus(4) (actually this brings in the code the 2007-03-07 21:13:51 +00:00
fdc Always protect the kthread flags with the lock and close a race with 2007-02-27 17:16:52 +00:00
fe o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
firewire MFp4: Improve asynchronous packet receive process. 2007-04-30 14:06:30 +00:00
flash MFp4: 2006-11-29 08:05:55 +00:00
fxp Add support for the 82562GX chip within if_fxp. 2007-03-28 18:10:50 +00:00
gem o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
harp Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
hatm o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
hfa o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
hifn Overhaul driver/subsystem api's: 2007-03-21 03:42:51 +00:00
hme Remove invalid BUS_DMA_ALLOCNOW when creating a tag which is used for 2007-05-01 11:50:11 +00:00
hptmv Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will 2007-04-15 08:49:19 +00:00
hwpmc Fix witness(4) warnings about mutex use. 2007-04-19 08:02:51 +00:00
ic Fix style nits. No md5 changes in .o's. ;-) 2006-09-08 21:46:01 +00:00
ichsmb o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
ichwd Revisit the watchdogs: Resetting the error to EINVAL after failing to set the 2007-03-27 21:03:37 +00:00
ida o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
idt o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
ie o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
ieee488 Catchup with filters 2007-02-23 19:34:52 +00:00
if_ndis Use strcasecmp() from libkern. 2007-04-06 11:21:01 +00:00
iicbus Don't use spinlocks here. The iicbus transactions can take a long 2007-04-17 05:48:35 +00:00
iir Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will 2007-04-15 08:49:19 +00:00
io Add module versions. 2004-08-02 20:42:28 +00:00
ipmi Add constants for the fields in a BAR. Also, add two new macros 2007-03-31 21:39:02 +00:00
ips o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
ipw Drop the ipw softc lock before calling back into net80211, fixing a 2007-03-24 18:53:33 +00:00
isp Revert a driver API change to xpt_alloc_ccb that isn't necessary. Fix a 2007-04-18 04:58:53 +00:00
ispfw The MODULE_NAME should "ispfw" unless overriden, not "isp". 2006-12-10 03:42:57 +00:00
iwi Fix an off-by-one error in iwi_init_fw_dma(). It didn't reuse the existing 2007-03-21 18:40:31 +00:00
ixgb Catch up the rest of the drivers with the ether_vlan_mtap modifications. 2007-03-04 03:38:08 +00:00
joy Unbreak second joystick (joy1) support. 2005-11-09 20:26:00 +00:00
kbd Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
kbdmux Fix our ioctl(2) implementation when the argument is "int". New 2006-09-27 19:57:02 +00:00
le o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
led Make it possible to specify an initial state for the LED. 2007-04-23 12:42:15 +00:00
lge o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
lmc o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
mc146818 Add macros for the individual divisor bits as some MC146818A-compatible 2007-01-20 14:57:51 +00:00
mca
mcd Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 2005-05-29 04:42:30 +00:00
md Resolve two deadlocks that could be caused by busy md device backed 2006-12-14 11:34:07 +00:00
mem Fix module builds for i386 and amd64. 2004-08-04 18:30:31 +00:00
mfi o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
mii Define the miibus ivars as a structure, instead of as a vector of 2007-05-01 18:21:24 +00:00
mk48txx Revisit the watchdogs: Resetting the error to EINVAL after failing to set the 2007-03-27 21:03:37 +00:00
mlx o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
mly Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will 2007-04-15 08:49:19 +00:00
mmc Preliminary MMC stack. This stack supports SD 1.0 cards only, but 2006-10-20 06:39:59 +00:00
mpt Revert a driver API change to xpt_alloc_ccb that isn't necessary. Fix a 2007-04-18 04:58:53 +00:00
mse o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
msk Work around GMAC hardware hang bug. 2007-04-25 01:20:31 +00:00
mxge -Fix an mbuf leak caused by a cut&paste bug where the small ring's mbufs 2007-04-27 13:11:50 +00:00
my my(4) doesn't need miibus(4). 2007-03-11 15:20:04 +00:00
ncv o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
nfe Catch up the rest of the drivers with the ether_vlan_mtap modifications. 2007-03-04 03:38:08 +00:00
nge Catch up the rest of the drivers with the ether_vlan_mtap modifications. 2007-03-04 03:38:08 +00:00
nmdm Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
nsp o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
null Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
nve o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
ofw Add missing includes of priv.h. 2006-11-06 17:43:10 +00:00
patm o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
pbio Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
pccard Use pause() rather than tsleep() on stack variables and function pointers. 2007-02-27 17:23:29 +00:00
pccbb Use different wait channel name for second of two sleeps. Minor commentary 2007-03-05 05:40:24 +00:00
pcf Don't call bus_deactivate_resource() explicitly before calling 2007-03-21 03:38:37 +00:00
pci Revamp the MSI/MSI-X code a bit to achieve two main goals: 2007-05-02 17:50:36 +00:00
pdq o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 20:11:27 +00:00
powermac_nvram Add device to access and modify Open Firmware NVRAM settings in 2006-08-01 22:19:01 +00:00
ppbus Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will 2007-04-15 08:49:19 +00:00
ppc Don't call bus_deactivate_resource() explicitly before calling 2007-03-21 03:38:37 +00:00
pst o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
puc o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
ral - Fix mbuf/node leakage in drivers' raw_xmit(). 2007-04-19 13:09:57 +00:00
random Use pause() rather than tsleep() on stack variables and function pointers. 2007-02-27 17:23:29 +00:00
ray o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
rc o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
re Don't reinitialize the hardware if only PROMISC flag was changed. 2007-04-18 00:40:43 +00:00
rndtest Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
rp - Make rp(4) 64-bit- and endian-clean as well as work on strict alignment 2006-11-20 12:59:27 +00:00
rr232x Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will 2007-04-15 08:49:19 +00:00
safe Overhaul driver/subsystem api's: 2007-03-21 03:42:51 +00:00
sbni o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
sbsh o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
scc Add method enabled() to the SCC interface. This method can be used 2007-03-28 18:05:17 +00:00
scd Use pause() rather than tsleep() on stack variables and function pointers. 2007-02-27 17:23:29 +00:00
sf o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
si o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 20:11:27 +00:00
sio o Revert last. The chip is already supported by puc(4). 2007-03-29 04:26:52 +00:00
sk Use our own timer for watchdog instead of if_watchdog/if_timer 2007-04-02 04:43:41 +00:00
smbus Only support the SMB_OLD_BREAD ioctl if one of COMPAT_FREEBSD[456] is 2006-09-26 14:38:56 +00:00
sn o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
snc o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
snp Switch to ANSI function declarations. 2007-03-23 22:48:44 +00:00
sound Unbreak module / driver attach breakage. Both snd_envy24 and snd_envy24ht 2007-04-20 01:28:51 +00:00
speaker Add /dev/speaker support to amd64. 2005-11-11 09:57:32 +00:00
spibus MFp4: when passing the transfer up the foodchain, make sure we go up 2006-10-20 07:11:52 +00:00
sr Don't call bus_deactivate_resource() explicitly before calling 2007-03-21 03:38:37 +00:00
stg o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
stge If we've got watchdog timeouts try to get more packets going after 2007-05-01 03:40:57 +00:00
streams Replace custom file descriptor array sleep lock constructed using a mutex 2007-04-04 09:11:34 +00:00
sym Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will 2007-04-15 08:49:19 +00:00
syscons Optimize set_origin() use in some screensavers to stop them eating 2007-02-21 12:27:12 +00:00
tdfx Take the functionality contained in the former "options TDFX_LINUX" 2006-03-03 21:37:38 +00:00
ti Catch up the rest of the drivers with the ether_vlan_mtap modifications. 2007-03-04 03:38:08 +00:00
trm Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will 2007-04-15 08:49:19 +00:00
twa Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will 2007-04-15 08:49:19 +00:00
twe o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
tx o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
txp Catch up the rest of the drivers with the ether_vlan_mtap modifications. 2007-03-04 03:38:08 +00:00
uart Fix bugs in the Sun -> AT keycode translation table which caused the 2007-05-01 14:14:52 +00:00
ubsec Overhaul driver/subsystem api's: 2007-03-21 03:42:51 +00:00
usb Remove pre-5.0 compat cruft. 2007-05-01 11:17:29 +00:00
utopia Struct ifatm isn't at the beginning of the softc anymore. Use the 2005-06-22 06:51:52 +00:00
vge Catch up the rest of the drivers with the ether_vlan_mtap modifications. 2007-03-04 03:38:08 +00:00
vkbd Fix our ioctl(2) implementation when the argument is "int". New 2006-09-27 19:57:02 +00:00
vr Add VLAN capability. 2007-04-23 12:19:02 +00:00
vx o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00
watchdog Revisit the watchdogs: Resetting the error to EINVAL after failing to set the 2007-03-27 21:03:37 +00:00
wds Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will 2007-04-15 08:49:19 +00:00
wi - Fix mbuf/node leakage in drivers' raw_xmit(). 2007-04-19 13:09:57 +00:00
wl Don't call bus_deactivate_resource() explicitly before calling 2007-03-21 03:38:37 +00:00
xe o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +00:00