diff options
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r-- | drivers/ata/libata-eh.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index bcf4437214f5..a0dddc3b4924 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -1591,7 +1591,7 @@ static int ata_eh_read_log_10h(struct ata_device *dev, | |||
1591 | * RETURNS: | 1591 | * RETURNS: |
1592 | * 0 on success, AC_ERR_* mask on failure. | 1592 | * 0 on success, AC_ERR_* mask on failure. |
1593 | */ | 1593 | */ |
1594 | static unsigned int atapi_eh_tur(struct ata_device *dev, u8 *r_sense_key) | 1594 | unsigned int atapi_eh_tur(struct ata_device *dev, u8 *r_sense_key) |
1595 | { | 1595 | { |
1596 | u8 cdb[ATAPI_CDB_LEN] = { TEST_UNIT_READY, 0, 0, 0, 0, 0 }; | 1596 | u8 cdb[ATAPI_CDB_LEN] = { TEST_UNIT_READY, 0, 0, 0, 0, 0 }; |
1597 | struct ata_taskfile tf; | 1597 | struct ata_taskfile tf; |
@@ -1624,7 +1624,7 @@ static unsigned int atapi_eh_tur(struct ata_device *dev, u8 *r_sense_key) | |||
1624 | * RETURNS: | 1624 | * RETURNS: |
1625 | * 0 on success, AC_ERR_* mask on failure | 1625 | * 0 on success, AC_ERR_* mask on failure |
1626 | */ | 1626 | */ |
1627 | static unsigned int atapi_eh_request_sense(struct ata_device *dev, | 1627 | unsigned int atapi_eh_request_sense(struct ata_device *dev, |
1628 | u8 *sense_buf, u8 dfl_sense_key) | 1628 | u8 *sense_buf, u8 dfl_sense_key) |
1629 | { | 1629 | { |
1630 | u8 cdb[ATAPI_CDB_LEN] = | 1630 | u8 cdb[ATAPI_CDB_LEN] = |
@@ -4022,6 +4022,7 @@ static void ata_eh_handle_port_suspend(struct ata_port *ap) | |||
4022 | { | 4022 | { |
4023 | unsigned long flags; | 4023 | unsigned long flags; |
4024 | int rc = 0; | 4024 | int rc = 0; |
4025 | struct ata_device *dev; | ||
4025 | 4026 | ||
4026 | /* are we suspending? */ | 4027 | /* are we suspending? */ |
4027 | spin_lock_irqsave(ap->lock, flags); | 4028 | spin_lock_irqsave(ap->lock, flags); |
@@ -4034,6 +4035,15 @@ static void ata_eh_handle_port_suspend(struct ata_port *ap) | |||
4034 | 4035 | ||
4035 | WARN_ON(ap->pflags & ATA_PFLAG_SUSPENDED); | 4036 | WARN_ON(ap->pflags & ATA_PFLAG_SUSPENDED); |
4036 | 4037 | ||
4038 | /* | ||
4039 | * If we have a ZPODD attached, check its zero | ||
4040 | * power ready status before the port is frozen. | ||
4041 | */ | ||
4042 | ata_for_each_dev(dev, &ap->link, ENABLED) { | ||
4043 | if (zpodd_dev_enabled(dev)) | ||
4044 | zpodd_on_suspend(dev); | ||
4045 | } | ||
4046 | |||
4037 | /* tell ACPI we're suspending */ | 4047 | /* tell ACPI we're suspending */ |
4038 | rc = ata_acpi_on_suspend(ap); | 4048 | rc = ata_acpi_on_suspend(ap); |
4039 | if (rc) | 4049 | if (rc) |