From owner-svn-src-all@FreeBSD.ORG Tue Jun 24 19:58:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EDAE3AA; Tue, 24 Jun 2014 19:58:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B7EC2684; Tue, 24 Jun 2014 19:58:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5OJwhPx014305; Tue, 24 Jun 2014 19:58:43 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5OJwhMU014304; Tue, 24 Jun 2014 19:58:43 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201406241958.s5OJwhMU014304@svn.freebsd.org> From: John Baldwin Date: Tue, 24 Jun 2014 19:58:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r267836 - stable/8/sys/dev/acpica X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2014 19:58:43 -0000 Author: jhb Date: Tue Jun 24 19:58:42 2014 New Revision: 267836 URL: http://svnweb.freebsd.org/changeset/base/267836 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/8/sys/dev/acpica/acpi_resource.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/acpica/ (props changed) Modified: stable/8/sys/dev/acpica/acpi_resource.c ============================================================================== --- stable/8/sys/dev/acpica/acpi_resource.c Tue Jun 24 19:58:18 2014 (r267835) +++ stable/8/sys/dev/acpica/acpi_resource.c Tue Jun 24 19:58:42 2014 (r267836) @@ -134,6 +134,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);