From patchwork Thu May 28 08:38:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yicong Yang X-Patchwork-Id: 11575303 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0817D1667 for ; Thu, 28 May 2020 08:39:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EDAD221532 for ; Thu, 28 May 2020 08:39:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727071AbgE1IjZ (ORCPT ); Thu, 28 May 2020 04:39:25 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:52278 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726955AbgE1IjY (ORCPT ); Thu, 28 May 2020 04:39:24 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id A96BCBD57AF03F838065; Thu, 28 May 2020 16:39:11 +0800 (CST) Received: from localhost.localdomain (10.67.165.24) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Thu, 28 May 2020 16:39:01 +0800 From: Yicong Yang To: , , , CC: , Subject: [PATCH] PCI/ASPM: Print correct ASPM status when _OSC failed Date: Thu, 28 May 2020 16:38:45 +0800 Message-ID: <1590655125-23949-1-git-send-email-yangyicong@hisilicon.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 X-Originating-IP: [10.67.165.24] X-CFilter-Loop: Reflected Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Previously we'll print wrong ASPM status if _OSC method return failed. For example, if ASPM is enabled by setting pcie_aspm=force, we get message below: acpi PNP0A08:02: _OSC failed (AE_NOT_FOUND); disabling ASPM Fix it and print correct ASPM status when _OSC failed. Fixes: 1ad61b612b95 ("PCI/ACPI: Correct error message for ASPM disabling") Signed-off-by: Yicong Yang Reviewed-by: Sinan Kaya --- drivers/acpi/pci_root.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index ac8ad6c..5140b26 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -456,7 +456,7 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm, dev_info(&device->dev, "_OSC failed (%s)%s\n", acpi_format_exception(status), - pcie_aspm_support_enabled() ? "; disabling ASPM" : ""); + pcie_aspm_support_enabled() ? "" : "; disabling ASPM"); return; }