From patchwork Fri Apr 29 22:21:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Wysocki X-Patchwork-Id: 742631 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3TMLO7O032170 for ; Fri, 29 Apr 2011 22:21:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932525Ab1D2WVJ (ORCPT ); Fri, 29 Apr 2011 18:21:09 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:37396 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932451Ab1D2WVI (ORCPT ); Fri, 29 Apr 2011 18:21:08 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by ogre.sisk.pl (Postfix) with ESMTP id 25D531AD451; Sat, 30 Apr 2011 00:18:00 +0200 (CEST) Received: from ogre.sisk.pl ([127.0.0.1]) by localhost (ogre.sisk.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 07935-06; Sat, 30 Apr 2011 00:17:38 +0200 (CEST) Received: from ferrari.rjw.lan (220-bem-13.acn.waw.pl [82.210.184.220]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ogre.sisk.pl (Postfix) with ESMTP id E06281A4A2C; Sat, 30 Apr 2011 00:17:38 +0200 (CEST) From: "Rafael J. Wysocki" To: Jesse Barnes Subject: [PATCH] PCI / ACPI: Report _OSC control mask returned on failure to get control Date: Sat, 30 Apr 2011 00:21:38 +0200 User-Agent: KMail/1.13.6 (Linux/2.6.39-rc5+; KDE/4.6.0; x86_64; ; ) Cc: linux-pci@vger.kernel.org, ACPI Devel Mailing List , LKML , Len Brown , Matthew Garrett MIME-Version: 1.0 Message-Id: <201104300021.38386.rjw@sisk.pl> X-Virus-Scanned: amavisd-new at ogre.sisk.pl using MkS_Vir for Linux Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 29 Apr 2011 22:21:25 +0000 (UTC) From: Rafael J. Wysocki If an attempt to get _OSC control of the PCIe native features from the BIOS fails, report the resulting mask of control flags the BIOS was willing to grant in the error message. Moreover, if the _OSC support mask is insufficient for requesting control of the PCIe native features or pcie_ports_disabled is set, print a diagnostic message containing the _OSC support mask. This helps to diagnose obscure _OSC-related problems on a number machines. Signed-off-by: Rafael J. Wysocki --- drivers/acpi/pci_root.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6/drivers/acpi/pci_root.c =================================================================== --- linux-2.6.orig/drivers/acpi/pci_root.c +++ linux-2.6/drivers/acpi/pci_root.c @@ -596,12 +596,18 @@ static int __devinit acpi_pci_root_add(s dev_info(root->bus->bridge, "ACPI _OSC control (0x%02x) granted\n", flags); } else { - dev_dbg(root->bus->bridge, - "ACPI _OSC request failed (code %d)\n", status); - printk(KERN_INFO "Unable to assume _OSC PCIe control. " - "Disabling ASPM\n"); + dev_info(root->bus->bridge, + "ACPI _OSC request failed (%s), " + "returned control mask: 0x%02x\n", + acpi_format_exception(status), flags); + pr_info("ACPI _OSC control for PCIe not granted, " + "disabling ASPM\n"); pcie_no_aspm(); } + } else { + dev_info(root->bus->bridge, + "Unable to request _OSC control " + "(_OSC support mask: 0x%02x)\n", flags); } pci_acpi_add_bus_pm_notifier(device, root->bus);