public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Jones <pjones@redhat.com>
To: linux-acpi@vger.kernel.org
Cc: Mario_Limonciello@dell.com, linux-kernel@vger.kernel.org,
	Len Brown <lenb@kernel.org>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Andy Lutomirski <luto@amacapital.net>,
	Peter Jones <pjones@redhat.com>
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	[thread overview]
Message-ID: <1466028904-28328-1-git-send-email-pjones@redhat.com> (raw)

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");
-- 
2.7.4


             reply	other threads:[~2016-06-15 22:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-15 22:15 Peter Jones [this message]
2016-06-16  0:12 ` [PATCH] ACPI: don't show an error when we're not in charge of PCIe hotplug Rafael J. Wysocki
2016-06-16 14:56   ` Rafael J. Wysocki
2016-06-21 15:18     ` Peter Jones
2016-06-21 18:01       ` Mario_Limonciello
2016-06-21 18:07         ` Andy Lutomirski
2016-06-21 22:54           ` Rafael J. Wysocki
2016-06-21 22:51         ` Rafael J. Wysocki
2016-06-22 19:43           ` Mario_Limonciello
2016-06-22 20:53             ` Andy Lutomirski
2016-06-22 22:47               ` Rafael J. Wysocki
2016-06-23 15:38                 ` Mario_Limonciello

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1466028904-28328-1-git-send-email-pjones@redhat.com \
    --to=pjones@redhat.com \
    --cc=Mario_Limonciello@dell.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox