On Wednesday, February 20, 2013 06:17:48 PM Toshi Kani wrote: > On Wed, 2013-02-20 at 23:49 +0100, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx> > : > > + > > +/** > > + * 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. In fact, I wasn't quite sure about that, so thanks a lot for the clarification. That makes life a bit easier, actually. :-) I'll send a second update in a little while. Thanks, Rafael -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html