From patchwork Thu Aug 9 18:46:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 10561687 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 85C5E1057 for ; Thu, 9 Aug 2018 18:46:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 757532B849 for ; Thu, 9 Aug 2018 18:46:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 69CFD2B85E; Thu, 9 Aug 2018 18:46:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A4602B84C for ; Thu, 9 Aug 2018 18:46:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727129AbeHIVMk (ORCPT ); Thu, 9 Aug 2018 17:12:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:50076 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727038AbeHIVMk (ORCPT ); Thu, 9 Aug 2018 17:12:40 -0400 Received: from sinanubuntu1604.mkjiurmyylmellclgttazegk5f.bx.internal.cloudapp.net (unknown [104.41.132.238]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0739521F45; Thu, 9 Aug 2018 18:46:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1533840392; bh=WKFoIviVEhWMRP3J/Sp4WkN7Jf89ifXwS7ZdRx4OmrE=; h=From:To:Cc:Subject:Date:From; b=iD3GTMIznWYJLGutmOz0UubWXbx/X+7y+IBmZjeRCepYQ4fRTICY3AiMXp1ehDXTV didDRk39wdro82mOCfv1HHOtulDnL4vh2lKNdN0Xx5KdUxfPODBy87duXjPlmpvJAL fWaD6zC0K7Z5jTXnUoHNXvGafHiXAofzBk2voN5Q= From: Sinan Kaya To: linux-pci@vger.kernel.org Cc: Sinan Kaya , Bjorn Helgaas , "Rafael J. Wysocki" , Len Brown , linux-acpi@vger.kernel.org (open list:ACPI), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/2] PCI/ACPI: correct error message for ASPM disabling Date: Thu, 9 Aug 2018 18:46:22 +0000 Message-Id: <1533840383-7841-1-git-send-email-okaya@kernel.org> X-Mailer: git-send-email 2.7.4 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If _OSC execution fails today for platforms without an _OSC entry, code is printing a misleading message saying disabling ASPM as follows: acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM We need to ensure that platform supports ASPM to begin with. Signed-off-by: Sinan Kaya Reported-by: Michael Kelley --- drivers/acpi/pci_root.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 7433035..9d738e2 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -455,8 +455,13 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm) decode_osc_support(root, "OS supports", support); status = acpi_pci_osc_support(root, support); if (ACPI_FAILURE(status)) { - dev_info(&device->dev, "_OSC failed (%s); disabling ASPM\n", - acpi_format_exception(status)); + char *aspm_msg = ""; + + if (pcie_aspm_support_enabled()) + aspm_msg = "; disabling ASPM"; + + dev_info(&device->dev, "_OSC failed (%s) %s\n", + acpi_format_exception(status), aspm_msg); *no_aspm = 1; return; }