This patch will disable EC GPE, which seems to be major problem. Regards, Alex On 5/9/07, Alexey Starikovskiy <aystarik@xxxxxxxxx> wrote:
I expect http://bugzilla.kernel.org/show_bug.cgi?id=7887 this bug to pop again with this patch. Regards, Alex. On 5/9/07, Rafael J. Wysocki <rjw@xxxxxxx> wrote: > From: Rafael J. Wysocki <rjw@xxxxxxx> > > The restore part of the hibernation code should not call any 'platform' > functions, since it doesn't carry out any power transition of the system. > Still, such functions are called from the restore code in kernel/power/user.c . > Fix that. > > Signed-off-by: Rafael J. Wysocki <rjw@xxxxxxx> > --- > kernel/power/user.c | 17 ++++------------- > 1 file changed, 4 insertions(+), 13 deletions(-) > > Index: linux-2.6.21/kernel/power/user.c > =================================================================== > --- linux-2.6.21.orig/kernel/power/user.c 2007-05-08 22:10:36.000000000 +0200 > +++ linux-2.6.21/kernel/power/user.c 2007-05-08 23:03:17.000000000 +0200 > @@ -179,34 +179,25 @@ static inline int snapshot_suspend(int p > return error; > } > > -static inline int snapshot_restore(int platform_suspend) > +static inline int snapshot_restore(void) > { > int error; > > mutex_lock(&pm_mutex); > pm_prepare_console(); > - if (platform_suspend) { > - error = platform_prepare(); > - if (error) > - goto Finish; > - } > suspend_console(); > error = device_suspend(PMSG_PRETHAW); > if (error) > - goto Resume_devices; > + goto Finish; > > error = disable_nonboot_cpus(); > if (!error) > error = swsusp_resume(); > > enable_nonboot_cpus(); > - Resume_devices: > - if (platform_suspend) > - platform_finish(); > - > + Finish: > device_resume(); > resume_console(); > - Finish: > pm_restore_console(); > mutex_unlock(&pm_mutex); > return error; > @@ -272,7 +263,7 @@ static int snapshot_ioctl(struct inode * > error = -EPERM; > break; > } > - error = snapshot_restore(data->platform_suspend); > + error = snapshot_restore(); > break; > > case SNAPSHOT_FREE: > > _______________________________________________ > linux-pm mailing list > linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx > https://lists.linux-foundation.org/mailman/listinfo/linux-pm >
Disable EC GPE during suspend/resume From: <> --- drivers/acpi/ec.c | 34 ++++++++++++++++++++++++++++++++++ 1 files changed, 34 insertions(+), 0 deletions(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index e08cf98..23ac3ba 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -79,6 +79,8 @@ static int acpi_ec_remove(struct acpi_device *device, int type); static int acpi_ec_start(struct acpi_device *device); static int acpi_ec_stop(struct acpi_device *device, int type); static int acpi_ec_add(struct acpi_device *device); +static int acpi_ec_suspend(struct acpi_device *device, pm_message_t state); +static int acpi_ec_resume(struct acpi_device *device); static struct acpi_driver acpi_ec_driver = { .name = "ec", @@ -89,6 +91,8 @@ static struct acpi_driver acpi_ec_driver = { .remove = acpi_ec_remove, .start = acpi_ec_start, .stop = acpi_ec_stop, + .suspend = acpi_ec_suspend, + .resume = acpi_ec_resume, }, }; @@ -772,6 +776,36 @@ static int acpi_ec_stop(struct acpi_device *device, int type) return 0; } +static int acpi_ec_suspend(struct acpi_device *device, pm_message_t state) +{ + struct acpi_ec *ec; + + if (!device) + return -EINVAL; + + ec = acpi_driver_data(device); + if (!ec) + return -EINVAL; + acpi_disable_gpe(NULL, ec->gpe, ACPI_NOT_ISR); + + return 0; +} + +static int acpi_ec_resume(struct acpi_device *device) +{ + struct acpi_ec *ec; + + if (!device) + return -EINVAL; + + ec = acpi_driver_data(device); + if (!ec) + return -EINVAL; + acpi_enable_gpe(NULL, ec->gpe, ACPI_NOT_ISR); + + return 0; +} + static acpi_status ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval) {
_______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm