From patchwork Wed Jun 15 22:15:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Jones X-Patchwork-Id: 9179627 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C1D4160573 for ; Wed, 15 Jun 2016 22:15:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B209B27D4A for ; Wed, 15 Jun 2016 22:15:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A6D0427DA4; Wed, 15 Jun 2016 22:15:44 +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.9 required=2.0 tests=BAYES_00,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 12FE927D4A for ; Wed, 15 Jun 2016 22:15:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933080AbcFOWPm (ORCPT ); Wed, 15 Jun 2016 18:15:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37780 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932290AbcFOWPm (ORCPT ); Wed, 15 Jun 2016 18:15:42 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A4F4F3B70B; Wed, 15 Jun 2016 22:15:40 +0000 (UTC) Received: from random.internal.datastacks.com (ovpn-116-92.phx2.redhat.com [10.3.116.92]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5FMFct7010178; Wed, 15 Jun 2016 18:15:39 -0400 From: Peter Jones To: linux-acpi@vger.kernel.org Cc: Mario_Limonciello@dell.com, linux-kernel@vger.kernel.org, Len Brown , "Rafael J . Wysocki" , Andy Lutomirski , Peter Jones Subject: [PATCH] ACPI: don't show an error when we're not in charge of PCIe hotplug. Date: Wed, 15 Jun 2016 18:15:04 -0400 Message-Id: <1466028904-28328-1-git-send-email-pjones@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 15 Jun 2016 22:15:41 +0000 (UTC) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Right now when booting, on many laptops the firmware manages the PCIe bus. As a result, when we call the _OSC ACPI method, it returns an error code. Unfortunately the errors are not very articulate. As a result, we show: ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-fe]) acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI] \_SB_.PCI0 (33DB4D5B-1FF7-401C-9657-7441C03DD766): _OSC invalid UUID _OSC request data: 1 1f 0 acpi PNP0A08:00: _OSC failed (AE_ERROR); disabling ASPM But we did get the capabilities mask back; the firmware is merely managing this itself. So we really should not be showing the user a message that looks like the firmware is broken, since it is working just fine. This patch supresses the error message when we're calling _OSC with the PCIe host bridge UUID, and replaces it with a relatively innocuous looking message that you can find if you're looking for it. --- drivers/acpi/bus.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 262ca31..be8a91b 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -215,6 +215,8 @@ acpi_status acpi_str_to_uuid(char *str, u8 *uuid) } EXPORT_SYMBOL_GPL(acpi_str_to_uuid); +static u8 pci_osc_uuid_str[] = "33DB4D5B-1FF7-401C-9657-7441C03DD766"; + acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context) { acpi_status status; @@ -267,9 +269,13 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context) if (errors & OSC_REQUEST_ERROR) acpi_print_osc_error(handle, context, "_OSC request failed"); - if (errors & OSC_INVALID_UUID_ERROR) - acpi_print_osc_error(handle, context, - "_OSC invalid UUID"); + if (errors & OSC_INVALID_UUID_ERROR) { + if (!strcasecmp(context->uuid_str, pci_osc_uuid_str)) + pr_info("PCI PME managed by ACPI.\n"); + else + acpi_print_osc_error(handle, context, + "_OSC invalid UUID"); + } if (errors & OSC_INVALID_REVISION_ERROR) acpi_print_osc_error(handle, context, "_OSC invalid revision");