diff options
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-eh.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index eb8b94016c01..94919ad03df1 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -3507,6 +3507,8 @@ static void ata_eh_handle_port_suspend(struct ata_port *ap) | |||
3507 | */ | 3507 | */ |
3508 | static void ata_eh_handle_port_resume(struct ata_port *ap) | 3508 | static void ata_eh_handle_port_resume(struct ata_port *ap) |
3509 | { | 3509 | { |
3510 | struct ata_link *link; | ||
3511 | struct ata_device *dev; | ||
3510 | unsigned long flags; | 3512 | unsigned long flags; |
3511 | int rc = 0; | 3513 | int rc = 0; |
3512 | 3514 | ||
@@ -3521,6 +3523,17 @@ static void ata_eh_handle_port_resume(struct ata_port *ap) | |||
3521 | 3523 | ||
3522 | WARN_ON(!(ap->pflags & ATA_PFLAG_SUSPENDED)); | 3524 | WARN_ON(!(ap->pflags & ATA_PFLAG_SUSPENDED)); |
3523 | 3525 | ||
3526 | /* | ||
3527 | * Error timestamps are in jiffies which doesn't run while | ||
3528 | * suspended and PHY events during resume isn't too uncommon. | ||
3529 | * When the two are combined, it can lead to unnecessary speed | ||
3530 | * downs if the machine is suspended and resumed repeatedly. | ||
3531 | * Clear error history. | ||
3532 | */ | ||
3533 | ata_for_each_link(link, ap, HOST_FIRST) | ||
3534 | ata_for_each_dev(dev, link, ALL) | ||
3535 | ata_ering_clear(&dev->ering); | ||
3536 | |||
3524 | ata_acpi_set_state(ap, PMSG_ON); | 3537 | ata_acpi_set_state(ap, PMSG_ON); |
3525 | 3538 | ||
3526 | if (ap->ops->port_resume) | 3539 | if (ap->ops->port_resume) |