lkml.org 
[lkml]   [2008]   [Mar]   [12]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 11 Mar 2008 22:35:22 -0700
FromAndrew Morton <>
SubjectRe: [PATCH] ACPI: Set flag DOCK_UNDOCKING when triggered via sysfs
On Wed, 12 Mar 2008 01:07:27 +0100 Holger Macht <hmacht@suse.de> wrote:

> 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.
> 

We prefer not to make systems freeze hard.

> ---
> 
> 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;
>  }

I assume that this is needed in 2.6.24.x as well?


\
 
 \ /
  Last update: 2008-03-12 06:39    [from the cache]
©2003-2008