libata-acpi: improve dock event handling
authorTejun Heo <htejun@gmail.com>
Wed, 12 Mar 2008 05:24:43 +0000 (14:24 +0900)
committerJeff Garzik <jeff@garzik.org>
Mon, 17 Mar 2008 12:26:42 +0000 (08:26 -0400)
commit233f112042d0b50170212dbff99c3b34b8773cd3
tree2b40ce227755dbbbe3ece6acd161bc7619f19f85
parenta978b30af3bab0dd9af9350eeda25e76123fa28e
libata-acpi: improve dock event handling

Improve ACPI hotplug handling such that dock event is handled properly.

* Register handlers for dock events.

* Directly detach device on EJECT_REQUEST instead of signaling hotplug
  event.  This prevents libata from accessing severed controller
  and/or device.

* While at it, use named constants for ACPI events and move uevent
  signaling inside host lock.

Original patch and testing by Holger Macht.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Holger Macht <hmacht@suse.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-acpi.c