From owner-freebsd-acpi@FreeBSD.ORG Thu May 13 11:17:20 2004 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6B00316A4CF for ; Thu, 13 May 2004 11:17:20 -0700 (PDT) Received: from mail2.speakeasy.net (mail2.speakeasy.net [216.254.0.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1037443D31 for ; Thu, 13 May 2004 11:17:20 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 10484 invoked from network); 13 May 2004 18:17:19 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 13 May 2004 18:17:19 -0000 Received: from 10.50.40.205 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i4DIHGTF020543; Thu, 13 May 2004 14:17:16 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-acpi@FreeBSD.org Date: Thu, 13 May 2004 14:17:43 -0400 User-Agent: KMail/1.6 References: <1084471311.699.54.camel@jester> In-Reply-To: <1084471311.699.54.camel@jester> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200405131417.43839.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: RT Subject: Re: IBM x20 Thinkpad X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 May 2004 18:17:20 -0000 On Thursday 13 May 2004 02:01 pm, RT wrote: > With ACPI enabled, 90% of my attempts to start X result in a freeze. If > X starts, it runs without any problems from that point forward so I can > only assume it has to do with probing for the video card. > > With hint.acpi.0.disabled="1" in /boot/device.hints, I do not have any > issues with freezes and X. > > IBM ThinkPad x20 2662-37u ASL file: > http://www.rbt.ca/temp/rbt-IBMx20266237u.asl Try this patch to sys/dev/acpi/acpi_pci_link.c: --- //depot/vendor/freebsd/src/sys/dev/acpica/acpi_pci_link.c 2004/04/13 20:35:18 +++ //depot/user/jhb/acpipci/dev/acpica/acpi_pci_link.c 2004/04/16 11:09:59 @@ -48,7 +48,6 @@ TAILQ_ENTRY(acpi_pci_link_entry) links; ACPI_HANDLE handle; UINT8 current_irq; - UINT8 initial_irq; ACPI_RESOURCE possible_resources; UINT8 number_of_interrupts; UINT8 interrupts[MAX_POSSIBLE_INTERRUPTS]; @@ -73,6 +72,9 @@ static int irq_penalty[MAX_ACPI_INTERRUPTS]; +static int acpi_pci_link_is_valid_irq(struct acpi_pci_link_entry *link, + UINT8 irq); + #define ACPI_STA_PRESENT 0x00000001 #define ACPI_STA_ENABLE 0x00000002 #define ACPI_STA_SHOWINUI 0x00000004 @@ -382,7 +384,12 @@ acpi_name(handle), AcpiFormatException(error))); } - link->initial_irq = link->current_irq; + if (!acpi_pci_link_is_valid_irq(link, link->current_irq)) { + ACPI_DEBUG_PRINT((ACPI_DB_WARN, + "initial IRQ %u is invalid for link %s\n", + link->current_irq, acpi_name(handle))); + link->current_irq = 0; + } error = AcpiGetPossibleResources(handle, &buf); if (ACPI_FAILURE(error)) { @@ -525,11 +532,6 @@ if (link->interrupts[i] == irq) return (1); } - - /* allow initial IRQ as valid one. */ - if (link->initial_irq == irq) - return (1); - return (0); } -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org