public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI: Set flag DOCK_UNDOCKING when triggered via sysfs
@ 2008-03-12  0:07 Holger Macht
  2008-03-12  5:35 ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Holger Macht @ 2008-03-12  0:07 UTC (permalink / raw)
  To: linux-acpi; +Cc: linux-kernel, Kristen Carlson Accardi, Len Brown

begin_undock() is only called when triggered via a acpi notify handler
(pressing the undock button on the dock station), but complete_undock() is
always called after the eject. So if a undock is triggered through a sysfs
write, the flag DOCK_UNDOCKING has to be set for the dock station,
too. Otherwise this will freeze the system hard.

Signed-off-by: Holger Macht <hmacht@suse.de>
---

diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index 307cef6..fa44fb9 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -710,6 +710,7 @@ static ssize_t write_undock(struct device *dev, struct device_attribute *attr,
 	if (!count)
 		return -EINVAL;
 
+	begin_undock(dock_station);
 	ret = handle_eject_request(dock_station, ACPI_NOTIFY_EJECT_REQUEST);
 	return ret ? ret: count;
 }


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-03-13 18:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-12  0:07 [PATCH] ACPI: Set flag DOCK_UNDOCKING when triggered via sysfs Holger Macht
2008-03-12  5:35 ` Andrew Morton
2008-03-12 10:40   ` Holger Macht
2008-03-13 17:27     ` Kristen Carlson Accardi
2008-03-13 18:14       ` Holger Macht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox