summaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-eh.c
diff options
context:
space:
mode:
authorAaron Lu <aaron.lu@intel.com>2013-01-15 17:21:01 +0800
committerJeff Garzik <jgarzik@redhat.com>2013-01-21 15:41:56 -0500
commit213342053db58eabdaddff9c036c2b81ca63c443 (patch)
treee6c8b474717496289a5cbc3674e639f4814f784a /drivers/ata/libata-eh.c
parent3dc67440d99b2c718ef5f1eb1424a9066ffa3fb9 (diff)
downloadblackbird-op-linux-213342053db58eabdaddff9c036c2b81ca63c443.tar.gz
blackbird-op-linux-213342053db58eabdaddff9c036c2b81ca63c443.zip
libata: handle power transition of ODD
When ata port is runtime suspended, it will check if the ODD attched to it is a zero power(ZP) capable ODD and if the ZP capable ODD is in zero power ready state. And if this is not the case, the highest acpi state will be limited to ACPI_STATE_D3_HOT to avoid powering off the ODD. And if the ODD can be powered off, runtime wake capability needs to be enabled and powered_off flag will be set to let resume code knows that the ODD was in powered off state. And on resume, before it is powered on, if it was powered off during suspend, runtime wake capability needs to be disabled. After it is recovered, the ODD is considered functional, post power on processing like eject tray if the ODD is drawer type is done, and several ZPODD related fields will also be reset. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r--drivers/ata/libata-eh.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index a0dddc3b4924..50f3ef04809d 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -3857,6 +3857,8 @@ int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
rc = atapi_eh_clear_ua(dev);
if (rc)
goto rest_fail;
+ if (zpodd_dev_enabled(dev))
+ zpodd_post_poweron(dev);
}
}
OpenPOWER on IntegriCloud