summaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-core.c
diff options
context:
space:
mode:
authorTejun Heo2007-12-15 07:05:01 +0100
committerJeff Garzik2007-12-18 02:33:12 +0100
commit562f0c2d771ee7be6b37fe015f94a929f8056120 (patch)
tree17d1616b39894564f70255bd68eec5c19ebf0473 /drivers/ata/libata-core.c
parentlibata: ata_dev_disable() should be called from EH context (diff)
downloadkernel-qcow2-linux-562f0c2d771ee7be6b37fe015f94a929f8056120.tar.gz
kernel-qcow2-linux-562f0c2d771ee7be6b37fe015f94a929f8056120.tar.xz
kernel-qcow2-linux-562f0c2d771ee7be6b37fe015f94a929f8056120.zip
libata-acpi: add new hooks ata_acpi_dissociate() and ata_acpi_on_disable()
Add two hooks - ata_acpi_dissociate() which is called during driver detach after the whole host is shutdown and ata_acpi_on_disable() which is called when a device is disabled. Signed-off-by: Tejun heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r--drivers/ata/libata-core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index c316eacbeddd..4af939a00e54 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -622,6 +622,7 @@ void ata_dev_disable(struct ata_device *dev)
if (ata_dev_enabled(dev)) {
if (ata_msg_drv(dev->link->ap))
ata_dev_printk(dev, KERN_WARNING, "disabled\n");
+ ata_acpi_on_disable(dev);
ata_down_xfermask_limit(dev, ATA_DNXFER_FORCE_PIO0 |
ATA_DNXFER_QUIET);
dev->class++;
@@ -7249,6 +7250,9 @@ void ata_host_detach(struct ata_host *host)
for (i = 0; i < host->n_ports; i++)
ata_port_detach(host->ports[i]);
+
+ /* the host is dead now, dissociate ACPI */
+ ata_acpi_dissociate(host);
}
/**