diff options
author | Lin Ming <ming.m.lin@intel.com> | 2012-06-25 04:13:06 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2012-06-29 11:38:13 -0400 |
commit | 3bd46600a7a7e938c54df8cdbac9910668c7dfb0 (patch) | |
tree | 72272f24842f7487b918a47c6e7244e92cad9ae4 /drivers/ata/libata-scsi.c | |
parent | febe53ba6b781862c12686c7ea1972bdedee457a (diff) |
libata-acpi: add ata port runtime D3Cold support
ATA port may support runtime D3Cold state, for example, Zero-power ODD case.
This patch adds wakeup notifier and enable/disable run_wake during
supend/resume.
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/libata-scsi.c')
-rw-r--r-- | drivers/ata/libata-scsi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 22226350cd0c..8ec81ca8f659 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -3445,6 +3445,7 @@ void ata_scsi_scan_host(struct ata_port *ap, int sync) | |||
3445 | if (!IS_ERR(sdev)) { | 3445 | if (!IS_ERR(sdev)) { |
3446 | dev->sdev = sdev; | 3446 | dev->sdev = sdev; |
3447 | scsi_device_put(sdev); | 3447 | scsi_device_put(sdev); |
3448 | ata_acpi_bind(dev); | ||
3448 | } else { | 3449 | } else { |
3449 | dev->sdev = NULL; | 3450 | dev->sdev = NULL; |
3450 | } | 3451 | } |
@@ -3541,6 +3542,8 @@ static void ata_scsi_remove_dev(struct ata_device *dev) | |||
3541 | mutex_lock(&ap->scsi_host->scan_mutex); | 3542 | mutex_lock(&ap->scsi_host->scan_mutex); |
3542 | spin_lock_irqsave(ap->lock, flags); | 3543 | spin_lock_irqsave(ap->lock, flags); |
3543 | 3544 | ||
3545 | ata_acpi_unbind(dev); | ||
3546 | |||
3544 | /* clearing dev->sdev is protected by host lock */ | 3547 | /* clearing dev->sdev is protected by host lock */ |
3545 | sdev = dev->sdev; | 3548 | sdev = dev->sdev; |
3546 | dev->sdev = NULL; | 3549 | dev->sdev = NULL; |