From owner-p4-projects@FreeBSD.ORG Tue Jul 2 19:43:17 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 712657A3; Tue, 2 Jul 2013 19:43:17 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D6FE6783 for ; Tue, 2 Jul 2013 19:43:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [8.8.178.74]) by mx1.freebsd.org (Postfix) with ESMTP id C85D211A1 for ; Tue, 2 Jul 2013 19:43:16 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.7/8.14.7) with ESMTP id r62JhGT2042421 for ; Tue, 2 Jul 2013 19:43:16 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.7/8.14.6/Submit) id r62JhGjM042418 for perforce@freebsd.org; Tue, 2 Jul 2013 19:43:16 GMT (envelope-from jhb@freebsd.org) Date: Tue, 2 Jul 2013 19:43:16 GMT Message-Id: <201307021943.r62JhGjM042418@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin Subject: PERFORCE change 230431 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2013 19:43:17 -0000 http://p4web.freebsd.org/@@230431?ac=10 Change 230431 by jhb@jhb_fiver on 2013/07/02 19:42:57 Move the acpi_DeviceIsPresent() check earlier and remove it from the PCI-PCI bridge driver entirely. We discover all PCI-PCI bridges via PCI (not ACPI), so it definitely exists. PR: 91594 Affected files ... .. //depot/projects/pci/sys/dev/acpica/acpi_pcib.c#4 edit .. //depot/projects/pci/sys/dev/acpica/acpi_pcib_acpi.c#32 edit Differences ... ==== //depot/projects/pci/sys/dev/acpica/acpi_pcib.c#4 (text+ko) ==== @@ -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/projects/pci/sys/dev/acpica/acpi_pcib_acpi.c#32 (text+ko) ==== @@ -292,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. */ @@ -358,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;