lkml.org 
[lkml]   [2013]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Update][PATCH 2/7] ACPI / scan: Introduce common code for ACPI-based device hotplug
From
Date
On Wed, 2013-02-20 at 23:49 +0100, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
:
> +
> +/**
> + * acpi_bus_hot_remove_device: hot-remove a device and its children
> + * @context: struct acpi_eject_event pointer (freed in this func)
> + *
> + * Hot-remove a device and its children. This function frees up the
> + * memory space passed by arg context, so that the caller may call
> + * this function asynchronously through acpi_os_hotplug_execute().
> + */
> +void acpi_bus_hot_remove_device(void *context)
> +{
> + struct acpi_eject_event *ej_event = context;
> + struct acpi_device *device = ej_event->device;
> + acpi_handle handle = device->handle;
> + u32 ost_code = ACPI_OST_SC_SUCCESS;
> + int error;
> +
> + mutex_lock(&acpi_scan_lock);
> +
> + error = acpi_scan_hot_remove(device);
> + if (error)
> + ost_code = ACPI_OST_SC_NON_SPECIFIC_FAILURE;
> +
> + acpi_evaluate_hotplug_ost(handle, ej_event->event, ost_code, NULL);

Thanks for the quick update. It fixed the deadlock issue. :-) As it
now completes an eject operation, I found a new issue. When the OS
called _EJ0, it is not supposed to call _OST since FW has already
received the completion status from _EJ0. That is, the OS calls either
_EJ0 (success case) or _OST (failure case) for hot-delete.

-Toshi




\
 
 \ /
  Last update: 2013-02-21 03:22    [W:3.342 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site