From owner-freebsd-acpi@FreeBSD.ORG Tue Jul 2 19:50:01 2013 Return-Path: Delivered-To: freebsd-acpi@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8DEB0C48 for ; Tue, 2 Jul 2013 19:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 6516D11FF for ; Tue, 2 Jul 2013 19:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r62Jo16t099533 for ; Tue, 2 Jul 2013 19:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r62Jo1dD099532; Tue, 2 Jul 2013 19:50:01 GMT (envelope-from gnats) Date: Tue, 2 Jul 2013 19:50:01 GMT Message-Id: <201307021950.r62Jo1dD099532@freefall.freebsd.org> To: freebsd-acpi@FreeBSD.org Cc: From: John Baldwin Subject: Re: kern/91594: [acpi] FreeBSD > 5.4 w/ACPI fails to detect Intel Pro/1000 MT 4-port NIC in PCI slot 3 of DL380 G4 [regression] X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: John Baldwin List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2013 19:50:01 -0000 The following reply was made to PR kern/91594; it has been noted by GNATS. From: John Baldwin To: bug-followup@FreeBSD.org, bad@bsd.de Cc: Subject: Re: kern/91594: [acpi] FreeBSD > 5.4 w/ACPI fails to detect Intel Pro/1000 MT 4-port NIC in PCI slot 3 of DL380 G4 [regression] Date: Tue, 02 Jul 2013 12:49:13 -0700 This is a multi-part message in MIME format. --------------040100040502060400080805 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Please try this change: -- John Baldwin --------------040100040502060400080805 Content-Type: text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0"; name="pcib_acpi_present.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pcib_acpi_present.patch" --- //depot/vendor/freebsd/src/sys/dev/acpica/acpi_pcib.c +++ //depot/projects/pci/sys/dev/acpica/acpi_pcib.c @@ -135,15 +135,6 @@ ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); /* - * Don't attach if we're not really there. - * - * XXX: This isn't entirely correct since we may be a PCI bus - * on a hot-plug docking station, etc. - */ - if (!acpi_DeviceIsPresent(dev)) - return_VALUE(ENXIO); - - /* * Get the PCI interrupt routing table for this bus. If we can't * get it, this is not an error but may reduce functionality. There * are several valid bridges in the field that do not have a _PRT, so --- //depot/vendor/freebsd/src/sys/dev/acpica/acpi_pcib_acpi.c +++ //depot/projects/pci/sys/dev/acpica/acpi_pcib_acpi.c @@ -287,6 +292,12 @@ sc->ap_handle = acpi_get_handle(dev); /* + * Don't attach if we're not really there. + */ + if (!acpi_DeviceIsPresent(dev)) + return (ENXIO); + + /* * Get our segment number by evaluating _SEG. * It's OK for this to not exist. */ @@ -353,7 +364,7 @@ if (status != AE_NOT_FOUND) { device_printf(dev, "could not evaluate _BBN - %s\n", AcpiFormatException(status)); - return_VALUE (ENXIO); + return (ENXIO); } else { /* If it's not found, assume 0. */ sc->ap_bus = 0; --------------040100040502060400080805--