All of lore.kernel.org
 help / color / mirror / Atom feed
* ACPI: EC: wait for ongoing transactions before suspending
@ 2009-09-03 15:36 Alan Jenkins
  0 siblings, 0 replies; only message in thread
From: Alan Jenkins @ 2009-09-03 15:36 UTC (permalink / raw)
  To: Alexey Starikovskiy; +Cc: linux acpi

If a transaction is started just before suspend we should wait for it
before disabling the GPE.  Otherwise the GPE could be re-enabled by the
"disable gpe during transactions" workaround (EC_FLAGS_GPE_STORM).

I hope this also solves EC timeouts and resume hangs when pressing acpi
hotkeys during hibernation.  However this problem is difficult to
reproduce and I have not been able to confirm the fix.

References: http://bugzilla.kernel.org/show_bug.cgi?id=14112

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 64a20ef..6fd1be2 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -979,7 +979,9 @@ static int acpi_ec_suspend(struct acpi_device *device, pm_message_t state)
 {
 	struct acpi_ec *ec = acpi_driver_data(device);
 	/* Stop using GPE */
+	mutex_lock(&ec->lock);
 	acpi_disable_gpe(NULL, ec->gpe);
+	mutex_unlock(&ec->lock);
 	return 0;
 }
 



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-09-03 15:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-03 15:36 ACPI: EC: wait for ongoing transactions before suspending Alan Jenkins

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.