diff options
author | Tejun Heo <tj@kernel.org> | 2009-07-17 04:58:33 +0200 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2009-09-02 01:47:19 +0200 |
commit | 1e641060c4b564e820abdb6a4c7a603a0d386250 (patch) | |
tree | 6ec27e9a33f0b64972a040deaca9eb3a25b19229 /drivers/ata | |
parent | [libata] add DMA setup FIS auto-activate feature (diff) | |
download | linux-1e641060c4b564e820abdb6a4c7a603a0d386250.tar.xz linux-1e641060c4b564e820abdb6a4c7a603a0d386250.zip |
libata: clear eh_info on reset completion
Resets are done with port frozen but some controllers still issue
interrupts during reset and they may end up recording error conditions
in ehi leading to unnecessary EH retrials.
This patch makes ata_eh_reset() clear ehi on reset completion. As
reset is the most severe recovery action, there's nothing to lose by
clearing ehi on its completion.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Zdenek Kaspar <zkaspar82@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-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, postreset(slave, classes); } - /* clear cached SError */ + /* + * Some controllers can't be frozen very well and may set + * spuruious error conditions during reset. Clear accumulated + * error information. As reset is the final recovery action, + * nothing is lost by doing this. + */ spin_lock_irqsave(link->ap->lock, flags); - link->eh_info.serror = 0; + memset(&link->eh_info, 0, sizeof(link->eh_info)); if (slave) - slave->eh_info.serror = 0; + memset(&slave->eh_info, 0, sizeof(link->eh_info)); + ap->pflags &= ~ATA_PFLAG_EH_PENDING; spin_unlock_irqrestore(link->ap->lock, flags); /* Make sure onlineness and classification result correspond. |