freebsd-nq/sys/dev/acpica
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
..
Osd Update for the KDB framework: 2004-07-10 20:56:43 +00:00
acpi_acad.c Use ACPI_ALL_NOTIFY instead of registering handlers separately. 2004-07-16 19:05:40 +00:00
acpi_battery.c Add the ability to detach a battery. Now batteries that are detached are 2004-07-12 20:53:04 +00:00
acpi_button.c Move flags into a private ivar so it can't collide with device flags. 2004-06-30 16:08:03 +00:00
acpi_cmbat.c Use ACPI_ALL_NOTIFY instead of registering handlers separately. 2004-07-16 19:05:40 +00:00
acpi_cpu.c Use uintmax_t for CPU statistics and add a cast to prevent truncation of 2004-06-24 00:38:51 +00:00
acpi_ec.c Remove duplicate FreeBSD id. 2004-07-02 20:15:53 +00:00
acpi_if.m Update the interface for child drivers. Add acpi_scan_children, which 2004-07-15 16:29:08 +00:00
acpi_isab.c Use the acpi_id_probe() method instead of acpi_MatchHid(), which is now 2004-06-29 19:02:27 +00:00
acpi_lid.c Move flags into a private ivar so it can't collide with device flags. 2004-06-30 16:08:03 +00:00
acpi_package.c Add support for packages as the first element of _PRW. This may allow 2004-04-09 06:40:03 +00:00
acpi_pci_link.c Re-work ACPI PCI IRQ routing (_PRT, link devices). The old approach was 2004-08-11 14:52:50 +00:00
acpi_pci.c Follow PnP location string change in acpi.c. 2004-07-14 06:58:39 +00:00
acpi_pcib_acpi.c Re-work ACPI PCI IRQ routing (_PRT, link devices). The old approach was 2004-08-11 14:52:50 +00:00
acpi_pcib_pci.c Re-work ACPI PCI IRQ routing (_PRT, link devices). The old approach was 2004-08-11 14:52:50 +00:00
acpi_pcib.c Re-work ACPI PCI IRQ routing (_PRT, link devices). The old approach was 2004-08-11 14:52:50 +00:00
acpi_pcibvar.h Re-work ACPI PCI IRQ routing (_PRT, link devices). The old approach was 2004-08-11 14:52:50 +00:00
acpi_powerres.c Add missing function debug trace macros to the new powerres functions. 2004-06-30 20:31:13 +00:00
acpi_quirk.c Add the table quirk matching code. It matches rules defined in acpi_quirks 2004-06-30 04:45:32 +00:00
acpi_quirks Use a default of the FADT for matching CreatorId quirks. Use XSDT to mean 2004-06-29 14:32:06 +00:00
acpi_resource.c Use the acpi_id_probe() method instead of acpi_MatchHid(), which is now 2004-06-29 19:02:27 +00:00
acpi_thermal.c Add missing <sys/module.h> includes 2004-05-30 20:08:47 +00:00
acpi_timer.c Reinsert the bus space handle and tag, they are needed for the timer test. 2004-07-22 05:42:14 +00:00
acpi_video.c Fix a bug where an item was being removed from a list without using 2004-07-24 17:51:22 +00:00
acpi.c Don't call DEVICE_RESUME a second time if DEVICE_SUSPEND fails. The 2004-08-10 22:02:52 +00:00
acpiio.h Fix typos and add spaces before `(' in some comments 2004-06-22 08:23:26 +00:00
acpivar.h Add flags for _STA (status) methods and convenience macros for checking 2004-08-06 00:38:50 +00:00