Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jun 2014 19:58:18 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r267835 - stable/9/sys/dev/acpica
Message-ID:  <201406241958.s5OJwIrq014183@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Tue Jun 24 19:58:18 2014
New Revision: 267835
URL: http://svnweb.freebsd.org/changeset/base/267835

Log:
  MFC 253392:
  Workaround some broken BIOSes that specify edge-sensitive but active-low
  settings for ACPI-enumerated serial ports by forcing any IRQs that use
  an ISA IRQ value with these settings to active-high instead of active-low.
  
  This is known to occur with the BIOS on an Intel D2500CCE motherboard.

Modified:
  stable/9/sys/dev/acpica/acpi_resource.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/acpica/acpi_resource.c
==============================================================================
--- stable/9/sys/dev/acpica/acpi_resource.c	Tue Jun 24 19:42:37 2014	(r267834)
+++ stable/9/sys/dev/acpica/acpi_resource.c	Tue Jun 24 19:58:18 2014	(r267835)
@@ -135,6 +135,17 @@ acpi_config_intr(device_t dev, ACPI_RESO
     default:
 	panic("%s: bad resource type %u", __func__, res->Type);
     }
+
+#if defined(__amd64__) || defined(__i386__)
+    /*
+     * XXX: Certain BIOSes have buggy AML that specify an IRQ that is
+     * edge-sensitive and active-lo.  However, edge-sensitive IRQs
+     * should be active-hi.  Force IRQs with an ISA IRQ value to be
+     * active-hi instead.
+     */
+    if (irq < 16 && trig == ACPI_EDGE_SENSITIVE && pol == ACPI_ACTIVE_LOW)
+	pol = ACPI_ACTIVE_HIGH;
+#endif
     BUS_CONFIG_INTR(dev, irq, (trig == ACPI_EDGE_SENSITIVE) ?
 	INTR_TRIGGER_EDGE : INTR_TRIGGER_LEVEL, (pol == ACPI_ACTIVE_HIGH) ?
 	INTR_POLARITY_HIGH : INTR_POLARITY_LOW);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406241958.s5OJwIrq014183>