]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Jan 2015 23:49:16 +0000 (15:49 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Jan 2015 23:49:16 +0000 (15:49 -0800)
added patches:
acpi-pm-do-not-disable-wakeup-gpes-that-have-not-been-enabled.patch

queue-3.18/acpi-pm-do-not-disable-wakeup-gpes-that-have-not-been-enabled.patch [new file with mode: 0644]
queue-3.18/series

diff --git a/queue-3.18/acpi-pm-do-not-disable-wakeup-gpes-that-have-not-been-enabled.patch b/queue-3.18/acpi-pm-do-not-disable-wakeup-gpes-that-have-not-been-enabled.patch
new file mode 100644 (file)
index 0000000..0811284
--- /dev/null
@@ -0,0 +1,64 @@
+From 175f8e2650f7ca6b33d338be3ccc1c00e89594ea Mon Sep 17 00:00:00 2001
+From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
+Date: Fri, 12 Dec 2014 22:51:58 +0100
+Subject: ACPI / PM: Do not disable wakeup GPEs that have not been enabled
+
+From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
+
+commit 175f8e2650f7ca6b33d338be3ccc1c00e89594ea upstream.
+
+In some cases acpi_device_wakeup() may be called to ensure wakeup
+power to be off for a given device even though that device's wakeup
+GPE has not been enabled so far.  It calls acpi_disable_gpe() on a
+GPE that's not enabled and this causes ACPICA to return the AE_LIMIT
+status code from that call which then is reported as an error by the
+ACPICA's debug facilities (if enabled).  This may lead to a fair
+amount of confusion, so introduce a new ACPI device wakeup flag
+to store the wakeup GPE status and avoid disabling wakeup GPEs
+that have not been enabled.
+
+Reported-and-tested-by: Venkat Raghavulu <venkat.raghavulu@intel.com>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/acpi/device_pm.c |   12 ++++++++++--
+ include/acpi/acpi_bus.h  |    1 +
+ 2 files changed, 11 insertions(+), 2 deletions(-)
+
+--- a/drivers/acpi/device_pm.c
++++ b/drivers/acpi/device_pm.c
+@@ -680,13 +680,21 @@ static int acpi_device_wakeup(struct acp
+               if (error)
+                       return error;
++              if (adev->wakeup.flags.enabled)
++                      return 0;
++
+               res = acpi_enable_gpe(wakeup->gpe_device, wakeup->gpe_number);
+-              if (ACPI_FAILURE(res)) {
++              if (ACPI_SUCCESS(res)) {
++                      adev->wakeup.flags.enabled = 1;
++              } else {
+                       acpi_disable_wakeup_device_power(adev);
+                       return -EIO;
+               }
+       } else {
+-              acpi_disable_gpe(wakeup->gpe_device, wakeup->gpe_number);
++              if (adev->wakeup.flags.enabled) {
++                      acpi_disable_gpe(wakeup->gpe_device, wakeup->gpe_number);
++                      adev->wakeup.flags.enabled = 0;
++              }
+               acpi_disable_wakeup_device_power(adev);
+       }
+       return 0;
+--- a/include/acpi/acpi_bus.h
++++ b/include/acpi/acpi_bus.h
+@@ -312,6 +312,7 @@ struct acpi_device_wakeup_flags {
+       u8 valid:1;             /* Can successfully enable wakeup? */
+       u8 run_wake:1;          /* Run-Wake GPE devices */
+       u8 notifier_present:1;  /* Wake-up notify handler has been installed */
++      u8 enabled:1;           /* Enabled for wakeup */
+ };
+ struct acpi_device_wakeup_context {
index 2b0dfe37b82b07773460ca34506d5105ea3ccf1f..e22e3dfba35ba6c0c2d77d6b53958d317b10dab4 100644 (file)
@@ -55,3 +55,4 @@ netfilter-conntrack-fix-race-between-confirmation-and-flush.patch
 ipvs-uninitialized-data-with-ip_vs_ipv6.patch
 revert-swiotlb-xen-pass-dev_addr-to-swiotlb_tbl_unmap_single.patch
 iwlwifi-mvm-add-a-flag-to-enable-match-found-notification.patch
+acpi-pm-do-not-disable-wakeup-gpes-that-have-not-been-enabled.patch