From patchwork Mon Jul 1 20:45:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Sierra X-Patchwork-Id: 11026697 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 1FDE3746 for ; Mon, 1 Jul 2019 20:45:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1091B22AFC for ; Mon, 1 Jul 2019 20:45:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 04AF7262FF; Mon, 1 Jul 2019 20:45:19 +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=-6.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,URIBL_BLACK 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 7547726242 for ; Mon, 1 Jul 2019 20:45:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726586AbfGAUpR (ORCPT ); Mon, 1 Jul 2019 16:45:17 -0400 Received: from xes-mad.com ([162.248.234.2]:4156 "EHLO mail.xes-mad.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726509AbfGAUpR (ORCPT ); Mon, 1 Jul 2019 16:45:17 -0400 Received: from asierra1.xes-mad.com (asierra1.xes-mad.com [10.52.16.65]) by mail.xes-mad.com (Postfix) with ESMTP id 01C5020356; Mon, 1 Jul 2019 15:45:16 -0500 (CDT) From: Aaron Sierra To: linux-pci@vger.kernel.org Cc: Bjorn Helgaas , "Rafael J. Wysocki" , Len Brown Subject: [PATCH v4 1/3] PCI/ACPI: Homogenize _OSC negotiation output Date: Mon, 1 Jul 2019 15:45:13 -0500 Message-Id: <20190701204515.23374-2-asierra@xes-inc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190701204515.23374-1-asierra@xes-inc.com> References: <20190213213242.21920-1-git-send-email-asierra@xes-inc.com> <20190701204515.23374-1-asierra@xes-inc.com> 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 Previously, the format of messages printed after negotiating _OSC depended on whether the entire operation was considered to be a success or failure. Now, printed messages are homogenized to always show what was requested versus what was granted. Previous output (success): acpi PNP0A08:00: _OSC: OS now controls [PME AER PCIeCapability LTR] Previous output (failure): acpi PNP0A08:00: _OSC: OS requested [PME AER PCIeCapability LTR] acpi PNP0A08:00: _OSC: platform willing to grant [] New output: acpi PNP0A08:00: _OSC: OS requested [PME AER PCIeCapability LTR] acpi PNP0A08:00: _OSC: platform granted [PME AER PCIeCapability LTR] Signed-off-by: Aaron Sierra --- drivers/acpi/pci_root.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 0d57f817ef1e..21aa56f9ca54 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -504,8 +504,9 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm, requested = control; status = acpi_pci_osc_control_set(handle, &control, OSC_PCI_EXPRESS_CAPABILITY_CONTROL); + decode_osc_control(root, "OS requested", requested); + decode_osc_control(root, "platform granted", control); if (ACPI_SUCCESS(status)) { - decode_osc_control(root, "OS now controls", control); if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_ASPM) { /* * We have ASPM control, but the FADT indicates that @@ -516,8 +517,6 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm, *no_aspm = 1; } } else { - decode_osc_control(root, "OS requested", requested); - decode_osc_control(root, "platform willing to grant", control); dev_info(&device->dev, "_OSC failed (%s); disabling ASPM\n", acpi_format_exception(status));