aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-core.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-12-15 01:05:01 -0500
committerJeff Garzik <jeff@garzik.org>2007-12-17 20:33:12 -0500
commit562f0c2d771ee7be6b37fe015f94a929f8056120 (patch)
tree17d1616b39894564f70255bd68eec5c19ebf0473 /drivers/ata/libata-core.c
parent7f9ad9b8b96855f529f4fe9db0bf32cd3f14c01b (diff)
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)
622 if (ata_dev_enabled(dev)) { 622 if (ata_dev_enabled(dev)) {
623 if (ata_msg_drv(dev->link->ap)) 623 if (ata_msg_drv(dev->link->ap))
624 ata_dev_printk(dev, KERN_WARNING, "disabled\n"); 624 ata_dev_printk(dev, KERN_WARNING, "disabled\n");
625 ata_acpi_on_disable(dev);
625 ata_down_xfermask_limit(dev, ATA_DNXFER_FORCE_PIO0 | 626 ata_down_xfermask_limit(dev, ATA_DNXFER_FORCE_PIO0 |
626 ATA_DNXFER_QUIET); 627 ATA_DNXFER_QUIET);
627 dev->class++; 628 dev->class++;
@@ -7249,6 +7250,9 @@ void ata_host_detach(struct ata_host *host)
7249 7250
7250 for (i = 0; i < host->n_ports; i++) 7251 for (i = 0; i < host->n_ports; i++)
7251 ata_port_detach(host->ports[i]); 7252 ata_port_detach(host->ports[i]);
7253
7254 /* the host is dead now, dissociate ACPI */
7255 ata_acpi_dissociate(host);
7252} 7256}
7253 7257
7254/** 7258/**