freebsd-nq/sys/dev
Nate Lawson e4116e931c Re-work ACPI PCI IRQ routing (_PRT, link devices). The old approach was
incomplete in that the PRT routing was not aware of link programming.
Fix this by doing all routing through the link devices.  The new algorithm
for setting up links is:

1. Read _CRS to get current setting.  If invalid (not in _PRS), then set
   to 0.
2. Attempt to call _DIS on the link.  If successful, mark the link as not
   routed.  Otherwise, assume it still is.

Then when a routing request occurs:

3. Update weights for all IRQs
4. Attempt to route the initial IRQ if valid
5. If that fails, walk through the sorted list, attempting to route IRQs.
6. Configure the trigger/polarity based on _PRS.

Other changes:
* Add acpi_pci_find_prt() to look up the PRT entry for a given device and
  acpi_pci_link_route() to select/route the best IRQ for it.
* Remove duplicated code in acpi_pcib_route_interrupt() that picked the
  first IRQ from _PRS.
* Remove unneeded arguments from acpi_pcib_resume() and friends.
* Ignore _STA on link devices but report if it seems strange.
* Add a prt_source handle to the PRT structure since the ACPI struct
  ACPI_PCI_ROUTING_TABLE uses a fixed-size entry for it.  We'll need to
  dynamically size this object if we want to use it the same way ACPI-CA
  does.  Null-terminate the source.

Tested by:	Luo Hong <luohong99_at_mails.tsinghua.edu.cn>,
		Jeffrey Katcher <jmkatcher_at_yahoo.com>
Info from:	jhb, Len Brown (Intel)
2004-08-11 14:52:50 +00:00
..
aac Avoid casts as lvalues. 2004-07-28 06:21:53 +00:00
acpi_support Unbreak LINT by making sure that method is always defined. 2004-08-04 14:29:22 +00:00
acpica Re-work ACPI PCI IRQ routing (_PRT, link devices). The old approach was 2004-08-11 14:52:50 +00:00
adlink Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
advansys Add missing <sys/module.h> includes 2004-05-30 20:08:47 +00:00
agp Minimal fix to prevent crashes when an AGP v2 card is used with the new v3 VIA 2004-08-09 21:01:49 +00:00
aha Convert callers to the new bus_alloc_resource_any(9) API. 2004-03-17 17:50:55 +00:00
ahb Convert callers to the new bus_alloc_resource_any(9) API. 2004-03-17 17:50:55 +00:00
aic Fix disordering of pccarddevs.h noticed by bde. Also remove a few 2004-05-27 03:49:45 +00:00
aic7xxx Correct a very rare case where command ordering could be compromised 2004-08-04 17:55:34 +00:00
amd Add missing <sys/module.h> includes 2004-05-30 20:08:47 +00:00
amr Use a separate flag when doing a kernel coredump when polling for 2004-07-01 06:56:10 +00:00
an Second part of ALTQ driver modifications, covering: 2004-08-01 23:58:04 +00:00
ar Convert Netgraph to use mbuf tags to pass its meta information around. 2004-06-25 19:22:05 +00:00
arl Add copyright notices. 2004-07-31 20:47:57 +00:00
asr - Set the CAM status to CAM_SCSI_STATUS_ERROR rather than CAM_REQ_CMP 2004-08-02 23:32:23 +00:00
ata Fix bad free() usage. 2004-08-09 14:22:58 +00:00
ath Add missing bit of last if_start workaround: mark scan callout 2004-08-08 17:10:54 +00:00
atkbdc Assume a finger of regular width when no width value is reported by 2004-08-08 01:26:00 +00:00
awi Link ALTQ to the build and break with ABI for struct ifnet. Please recompile 2004-06-13 17:29:10 +00:00
bfe The whitespace crusader strikes! 2004-08-07 20:55:53 +00:00
bge Bring the advertised interface capabilities into line with the reality 2004-07-24 13:45:38 +00:00
bktr Add support AOpen VA1000 video capture card 2004-08-08 01:23:39 +00:00
buslogic Add missing <sys/module.h> includes 2004-05-30 20:08:47 +00:00
cardbus MFp4: 2004-06-27 13:07:02 +00:00
ciss Clean up structure packing. 2004-07-29 08:06:22 +00:00
cm Convert callers to the new bus_alloc_resource_any(9) API. 2004-03-17 17:50:55 +00:00
cnw We don't need to initialize if_output, ether_ifattach() does it 2004-05-23 16:11:53 +00:00
cp Slight cosmetic changes. 2004-07-20 17:15:38 +00:00
cs Fix disordering of pccarddevs.h noticed by bde. Also remove a few 2004-05-27 03:49:45 +00:00
ct Update for the KDB framework: 2004-07-10 20:57:43 +00:00
ctau Slight cosmetic changes. 2004-07-20 17:15:38 +00:00
cx Slight cosmetic changes. 2004-07-20 17:15:38 +00:00
cy Preparation commit for the tty cleanups that will follow in the near 2004-07-15 20:47:41 +00:00
dc Whitespace nits 2004-07-05 22:35:18 +00:00
dcons Preparation commit for the tty cleanups that will follow in the near 2004-07-15 20:47:41 +00:00
de Apply the long-overdue hatchet of style(9) death to this file. 2004-07-09 02:19:07 +00:00
dec
digi Remove buggy (root filesystems may not have cdev) and pointless 2004-07-28 21:06:13 +00:00
dpt Convert callers to the new bus_alloc_resource_any(9) API. 2004-03-17 17:50:55 +00:00
drm Now that mem(4) is a kernel module, we need to add a dependency on 2004-08-05 07:20:24 +00:00
ed It is a little better to return ENXIO from probe/match routine than EIO. 2004-07-21 20:38:12 +00:00
eisa Use the slot, not an otherwise unused index variable as the probe offset. 2004-08-03 06:48:36 +00:00
em Bring in the first chunk of altq driver modifications. This covers the 2004-07-02 12:16:02 +00:00
en * Add a "how" argument to uma_zone constructors and initialization functions 2004-08-02 00:18:36 +00:00
ep Remove duplicate $FreeBSD$ 2004-07-22 07:11:15 +00:00
esp Add some style(9) touch ups; style(9) states that new code should follow 2004-08-02 22:55:23 +00:00
ex another format nit 2004-06-28 16:38:53 +00:00
exca
fatm Convert callers to the new bus_alloc_resource_any(9) API. 2004-03-17 17:50:55 +00:00
fb While we're revisiting old sins, try to clean up the code a little and 2004-08-06 21:35:51 +00:00
fdc Fix ACPI floppy enumeration for three types of divergent behavior. 2004-07-28 22:35:41 +00:00
fe Replace handrolled CRC calculation with ether_crc32_[lb]e(). 2004-06-09 14:34:04 +00:00
firewire Fix and add deivce ID's. 2004-08-04 12:18:39 +00:00
fxp Bring in the first chunk of altq driver modifications. This covers the 2004-07-02 12:16:02 +00:00
gem - Remove a variable no longer used after the conversion to ether_crc32_le(). 2004-06-10 00:04:16 +00:00
gfb Update for the KDB framework. Sanitize the alpha console code now that 2004-07-10 22:29:41 +00:00
gx Add missing <sys/module.h> includes 2004-05-30 20:08:47 +00:00
harp Do a pass over all modules in the kernel and make them return EOPNOTSUPP 2004-07-15 08:26:07 +00:00
hatm Convert callers to the new bus_alloc_resource_any(9) API. 2004-03-17 17:50:55 +00:00
hfa Do a pass over all modules in the kernel and make them return EOPNOTSUPP 2004-07-15 08:26:07 +00:00
hifn Consistently use __inline instead of __inline__ as the former is an empty macro 2004-07-04 16:11:03 +00:00
hme Implement TCP/UDP Transmit/Receive checksum offload. 2004-08-05 02:52:33 +00:00
ic Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
ichsmb Add PCI Device ID for 6300ESB ICH. If allocating 16 bytes fails then try 32. 2004-06-24 18:21:28 +00:00
ichwd make code less broken, only try to create unit 0 since there can only 2004-06-13 05:00:19 +00:00
ida Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
idt Convert callers to the new bus_alloc_resource_any(9) API. 2004-03-17 17:50:55 +00:00
ie Convert callers to the new bus_alloc_resource_any(9) API. 2004-03-17 17:50:55 +00:00
if_ndis Minor cleanups: 2004-08-03 17:00:39 +00:00
iicbus Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
iir Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
io Add module versions. 2004-08-02 20:42:28 +00:00
ips Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
isp Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
ispfw Do a pass over all modules in the kernel and make them return EOPNOTSUPP 2004-07-15 08:26:07 +00:00
ixgb PR kern/68474: 2004-07-01 22:37:47 +00:00
joy Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
kbd Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
led Remove a pointless check. 2004-07-10 15:38:27 +00:00
lge Remove the setting of the pci config variables on power state changes. 2004-06-28 20:26:21 +00:00
lnc Bring in the first chunk of altq driver modifications. This covers the 2004-07-02 12:16:02 +00:00
matcd Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
mc146818
mca
mcd Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
md Tag all geom classes in the tree with a version number. 2004-08-08 07:57:53 +00:00
mem Fix module builds for i386 and amd64. 2004-08-04 18:30:31 +00:00
mii Add some missing <sys/module.h> includes which are masked by the 2004-05-30 17:57:46 +00:00
mk48txx
mlx Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
mly Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
mpt Remove erroneous semicolons. 2004-07-13 16:06:19 +00:00
mse Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
musycc Switch to using C99 sparse initialisers for the type methods array. 2004-05-29 00:51:19 +00:00
my Replace handrolled CRC calculation with ether_crc32_[lb]e(). 2004-06-09 14:34:04 +00:00
ncv Update for the KDB framework: 2004-07-10 21:05:14 +00:00
nge Remove the setting of the pci config variables on power state changes. 2004-06-28 20:26:21 +00:00
nmdm Preparation commit for the tty cleanups that will follow in the near 2004-07-15 20:47:41 +00:00
nsp Update for the KDB framework: 2004-07-10 21:06:08 +00:00
null Go back to the historical minor numbers. Add a module version while 2004-08-02 19:59:41 +00:00
ofw Fix problems with the OFW console which happen when the system goes 2004-08-04 00:21:19 +00:00
owi Move to generating pccarddevs.h on the fly, both for the kernel and 2004-05-26 00:53:10 +00:00
patm Convert callers to the new bus_alloc_resource_any(9) API. 2004-03-17 17:50:55 +00:00
pccard Don't nest includes here. There's no need and the subset included is lame. 2004-05-28 02:24:07 +00:00
pccbb Add IDs from TI's web site. Reports from the field and inspection of 2004-07-22 20:19:57 +00:00
pcf Consistently use __inline instead of __inline__ as the former is an empty macro 2004-07-04 16:11:03 +00:00
pci Disable native ata support for now, too much breaks 2004-07-02 13:42:36 +00:00
pcic Convert callers to the new bus_alloc_resource_any(9) API. 2004-03-17 17:50:55 +00:00
pdq Link ALTQ to the build and break with ABI for struct ifnet. Please recompile 2004-06-13 17:29:10 +00:00
ppbus Do not bzero() the softc, as newbus does it for us. 2004-07-09 16:56:46 +00:00
ppc Add missing <sys/module.h> includes 2004-05-30 20:08:47 +00:00
pst Convert callers to the new bus_alloc_resource_any(9) API. 2004-03-17 17:50:55 +00:00
puc Remove duplicate FreeBSD id 2004-07-01 17:23:49 +00:00
random Perform a lockless read to test whether an entropy havesting fifo is 2004-08-11 03:33:32 +00:00
ray Add missing <sys/module.h> includes 2004-05-30 20:08:47 +00:00
rc Preparation commit for the tty cleanups that will follow in the near 2004-07-15 20:47:41 +00:00
re Eliminate unneeded return keywords. 2004-07-06 02:48:29 +00:00
rndtest
rp Preparation commit for the tty cleanups that will follow in the near 2004-07-15 20:47:41 +00:00
sab Preparation commit for the tty cleanups that will follow in the near 2004-07-15 20:47:41 +00:00
safe Add missing <sys/module.h> includes 2004-05-30 20:08:47 +00:00
sbni We don't need to initialize if_output, ether_ifattach() does it 2004-05-23 16:11:53 +00:00
sbsh Add missing <sys/module.h> includes 2004-05-30 20:08:47 +00:00
scd Avoid casts as lvalues. 2004-07-28 06:21:53 +00:00
sf Whitespace nit 2004-07-05 22:52:01 +00:00
si Avoid casts as lvalues. 2004-07-28 06:21:53 +00:00
sio If you insert a pccard modem and then eject it, you get a panic. This 2004-07-22 23:16:12 +00:00
sk Remove burn bridges code that saved/restored the pci config registers 2004-06-28 20:07:03 +00:00
smbus Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
sn Replace handrolled CRC calculation with ether_crc32_[lb]e(). 2004-06-09 14:34:04 +00:00
snc We don't need to initialize if_output, ether_ifattach() does it 2004-05-23 16:11:53 +00:00
snp Preparation commit for the tty cleanups that will follow in the near 2004-07-15 20:47:41 +00:00
sound Remove rev 1.50. 2004-07-24 15:30:23 +00:00
speaker Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
sr Convert Netgraph to use mbuf tags to pass its meta information around. 2004-06-25 19:22:05 +00:00
stg Update for the KDB framework: 2004-07-10 21:14:20 +00:00
streams Do a pass over all modules in the kernel and make them return EOPNOTSUPP 2004-07-15 08:26:07 +00:00
sx Preparation commit for the tty cleanups that will follow in the near 2004-07-15 20:47:41 +00:00
sym Convert callers to the new bus_alloc_resource_any(9) API. 2004-03-17 17:50:55 +00:00
syscons Just because we have a serial console attached does not mean we don't 2004-08-05 23:54:04 +00:00
tdfx Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
tga Add missing <sys/module.h> includes currently relying on nested include 2004-06-03 06:10:02 +00:00
ti Whitespace pass. 2004-07-05 22:46:28 +00:00
trm Add missing <sys/module.h> includes 2004-05-30 20:08:47 +00:00
twa Fix a typo that made the busdma tag have a 0 highaddr. This driver heavily 2004-06-24 18:30:08 +00:00
twe Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
tx Replace handrolled CRC calculation with ether_crc32_[lb]e(). 2004-06-09 14:34:04 +00:00
txp Remove the setting of the pci config variables on power state changes. 2004-06-28 20:26:21 +00:00
uart Do not use hardware flow control for the moment. There are some issues 2004-08-06 15:51:31 +00:00
ubsec Add missing <sys/module.h> includes 2004-05-30 20:08:47 +00:00
usb Mark USB ethernet devices as IFF_NEEDSGIANT, since the USB framework 2004-08-11 03:38:55 +00:00
utopia Do a pass over all modules in the kernel and make them return EOPNOTSUPP 2004-07-15 08:26:07 +00:00
vinum Do a pass over all modules in the kernel and make them return EOPNOTSUPP 2004-07-15 08:26:07 +00:00
vr Revert rev 1.93 and replace it by grabbing the vr lock before calling 2004-08-11 04:30:49 +00:00
vx Add missing <sys/module.h> includes 2004-05-30 20:08:47 +00:00
watchdog Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
wds
wi Second part of ALTQ driver modifications, covering: 2004-08-01 23:58:04 +00:00
wl Add missing <sys/module.h> includes 2004-05-30 20:08:47 +00:00
xe MFp4: 2004-06-27 13:25:28 +00:00
zs Preparation commit for the tty cleanups that will follow in the near 2004-07-15 20:47:41 +00:00