Add patch to fix shutdown on some machines (rhbz 890547)
This commit is contained in:
parent
c4ae440dda
commit
c12415061c
46
ACPI-do-not-use-Lid-and-Sleep-button-for-S5-wakeup.patch
Normal file
46
ACPI-do-not-use-Lid-and-Sleep-button-for-S5-wakeup.patch
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
From b7e383046c2c7c13ad928cd7407eafff758ddd4b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Zhang Rui <rui.zhang@intel.com>
|
||||||
|
Date: Tue, 4 Dec 2012 23:23:16 +0100
|
||||||
|
Subject: [PATCH] ACPI : do not use Lid and Sleep button for S5 wakeup
|
||||||
|
|
||||||
|
When system enters power off, the _PSW of Lid device is enabled.
|
||||||
|
But this may cause the system to reboot instead of power off.
|
||||||
|
|
||||||
|
A proper way to fix this is to always disable lid wakeup capability for S5.
|
||||||
|
|
||||||
|
References: https://bugzilla.kernel.org/show_bug.cgi?id=35262
|
||||||
|
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
|
||||||
|
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
||||||
|
---
|
||||||
|
drivers/acpi/scan.c | 7 ++++++-
|
||||||
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
|
||||||
|
index d0b38ab..bd523bf 100644
|
||||||
|
--- a/drivers/acpi/scan.c
|
||||||
|
+++ b/drivers/acpi/scan.c
|
||||||
|
@@ -917,8 +917,8 @@ acpi_bus_extract_wakeup_device_power_package(acpi_handle handle,
|
||||||
|
static void acpi_bus_set_run_wake_flags(struct acpi_device *device)
|
||||||
|
{
|
||||||
|
struct acpi_device_id button_device_ids[] = {
|
||||||
|
- {"PNP0C0D", 0},
|
||||||
|
{"PNP0C0C", 0},
|
||||||
|
+ {"PNP0C0D", 0},
|
||||||
|
{"PNP0C0E", 0},
|
||||||
|
{"", 0},
|
||||||
|
};
|
||||||
|
@@ -930,6 +930,11 @@ static void acpi_bus_set_run_wake_flags(struct acpi_device *device)
|
||||||
|
/* Power button, Lid switch always enable wakeup */
|
||||||
|
if (!acpi_match_device_ids(device, button_device_ids)) {
|
||||||
|
device->wakeup.flags.run_wake = 1;
|
||||||
|
+ if (!acpi_match_device_ids(device, &button_device_ids[1])) {
|
||||||
|
+ /* Do not use Lid/sleep button for S5 wakeup */
|
||||||
|
+ if (device->wakeup.sleep_state == ACPI_STATE_S5)
|
||||||
|
+ device->wakeup.sleep_state = ACPI_STATE_S4;
|
||||||
|
+ }
|
||||||
|
device_set_wakeup_capable(&device->dev, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
1.8.0.1
|
||||||
|
|
11
kernel.spec
11
kernel.spec
@ -54,7 +54,7 @@ Summary: The Linux kernel
|
|||||||
# For non-released -rc kernels, this will be appended after the rcX and
|
# For non-released -rc kernels, this will be appended after the rcX and
|
||||||
# gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
|
# gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
|
||||||
#
|
#
|
||||||
%global baserelease 3
|
%global baserelease 4
|
||||||
%global fedora_build %{baserelease}
|
%global fedora_build %{baserelease}
|
||||||
|
|
||||||
# base_sublevel is the kernel version we're starting with and patching
|
# base_sublevel is the kernel version we're starting with and patching
|
||||||
@ -735,6 +735,9 @@ Patch21238: don-t-do-blind-d_drop-in-nfs_prime_dcache.patch
|
|||||||
#rhbz 853064
|
#rhbz 853064
|
||||||
Patch21239: aoe-remove-extra-bdi_init.patch
|
Patch21239: aoe-remove-extra-bdi_init.patch
|
||||||
|
|
||||||
|
#rhbz 890547
|
||||||
|
Patch21240: ACPI-do-not-use-Lid-and-Sleep-button-for-S5-wakeup.patch
|
||||||
|
|
||||||
# END OF PATCH DEFINITIONS
|
# END OF PATCH DEFINITIONS
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
@ -1387,6 +1390,9 @@ ApplyPatch don-t-do-blind-d_drop-in-nfs_prime_dcache.patch
|
|||||||
#rhbz 853064
|
#rhbz 853064
|
||||||
ApplyPatch aoe-remove-extra-bdi_init.patch
|
ApplyPatch aoe-remove-extra-bdi_init.patch
|
||||||
|
|
||||||
|
#rhbz 890547
|
||||||
|
ApplyPatch ACPI-do-not-use-Lid-and-Sleep-button-for-S5-wakeup.patch
|
||||||
|
|
||||||
|
|
||||||
# END OF PATCH APPLICATIONS
|
# END OF PATCH APPLICATIONS
|
||||||
|
|
||||||
@ -2088,6 +2094,9 @@ fi
|
|||||||
# and build.
|
# and build.
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jan 08 2013 Josh Boyer <jwboyer@redhat.com>
|
||||||
|
- Add patch to fix shutdown on some machines (rhbz 890547)
|
||||||
|
|
||||||
* Fri Jan 04 2013 Josh Boyer <jwboyer@redhat.com>
|
* Fri Jan 04 2013 Josh Boyer <jwboyer@redhat.com>
|
||||||
- Fix oops on aoe module removal (rhbz 853064)
|
- Fix oops on aoe module removal (rhbz 853064)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user