summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2007-10-27 13:12:29 +0000
committerjhb <jhb@FreeBSD.org>2007-10-27 13:12:29 +0000
commitb116d381a4dee57cf9ac76ab74ab18775ab43fa3 (patch)
tree6a649aa8180c7abb94a56cdc4c62ba08cd2cbd5a /sys
parenta0d5330ec04330856251aac0b8c9ff9f448fa583 (diff)
downloadFreeBSD-src-b116d381a4dee57cf9ac76ab74ab18775ab43fa3.zip
FreeBSD-src-b116d381a4dee57cf9ac76ab74ab18775ab43fa3.tar.gz
Don't always re-route IRQs on resume. If this link hasn't been used, then
disable it with _DIS rather than assigning it an IRQ on resume. MFC after: 1 week
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/acpica/acpi_pci_link.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/dev/acpica/acpi_pci_link.c b/sys/dev/acpica/acpi_pci_link.c
index 4c3c306..775d0ca 100644
--- a/sys/dev/acpica/acpi_pci_link.c
+++ b/sys/dev/acpica/acpi_pci_link.c
@@ -916,10 +916,25 @@ acpi_pci_link_route_irqs(device_t dev)
static int
acpi_pci_link_resume(device_t dev)
{
+ struct acpi_pci_link_softc *sc;
ACPI_STATUS status;
+ int i, routed;
+ /*
+ * If all of our links are routed, then restore the link via _SRS,
+ * otherwise, disable the link via _DIS.
+ */
ACPI_SERIAL_BEGIN(pci_link);
- status = acpi_pci_link_route_irqs(dev);
+ sc = device_get_softc(dev);
+ routed = 0;
+ for (i = 0; i < sc->pl_num_links; i++)
+ if (sc->pl_links[i].l_routed)
+ routed++;
+ if (routed == sc->pl_num_links)
+ status = acpi_pci_link_route_irqs(dev);
+ else
+ status = AcpiEvaluateObject(acpi_get_handle(dev), "_DIS", NULL,
+ NULL);
ACPI_SERIAL_END(pci_link);
if (ACPI_FAILURE(status))
return (ENXIO);
OpenPOWER on IntegriCloud