diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/libata-eh.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 9159abe5211c..2c34de841e11 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -2576,11 +2576,17 @@ int ata_eh_reset(struct ata_link *link, int classify, | |||
2576 | postreset(slave, classes); | 2576 | postreset(slave, classes); |
2577 | } | 2577 | } |
2578 | 2578 | ||
2579 | /* clear cached SError */ | 2579 | /* |
2580 | * Some controllers can't be frozen very well and may set | ||
2581 | * spuruious error conditions during reset. Clear accumulated | ||
2582 | * error information. As reset is the final recovery action, | ||
2583 | * nothing is lost by doing this. | ||
2584 | */ | ||
2580 | spin_lock_irqsave(link->ap->lock, flags); | 2585 | spin_lock_irqsave(link->ap->lock, flags); |
2581 | link->eh_info.serror = 0; | 2586 | memset(&link->eh_info, 0, sizeof(link->eh_info)); |
2582 | if (slave) | 2587 | if (slave) |
2583 | slave->eh_info.serror = 0; | 2588 | memset(&slave->eh_info, 0, sizeof(link->eh_info)); |
2589 | ap->pflags &= ~ATA_PFLAG_EH_PENDING; | ||
2584 | spin_unlock_irqrestore(link->ap->lock, flags); | 2590 | spin_unlock_irqrestore(link->ap->lock, flags); |
2585 | 2591 | ||
2586 | /* Make sure onlineness and classification result correspond. | 2592 | /* Make sure onlineness and classification result correspond. |