* [PATCH v2] libata: clear error mask of old error history
@ 2012-04-23 1:09 Lin Ming
0 siblings, 0 replies; only message in thread
From: Lin Ming @ 2012-04-23 1:09 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-ide, Martin Mokrejs, Grant Grundler, sshtylyov
The old error history was cleared in ata_ering_clear().
It only sets ATA_EFLAG_OLD_ER eflags, but the err_mask was not cleared.
So ata_ering_map() still iterates the old error history.
This causes problem, for example, wrong probe trials count were returned in
ata_eh_schedule_probe(), which in turn causes SATA link speed to be slowed down
to 1.5Gbps.
Reported-and-tested-by: Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
Reviewed-by: Grant Grundler <grundler@google.com>
Cc: stable <stable@vger.kernel.org> # 2.6.37+
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
---
v2:
- Add Grant's review
- CC stable
drivers/ata/libata-eh.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index c61316e..4c6f49b 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -419,9 +419,10 @@ int ata_ering_map(struct ata_ering *ering,
return rc;
}
-int ata_ering_clear_cb(struct ata_ering_entry *ent, void *void_arg)
+static int ata_ering_clear_cb(struct ata_ering_entry *ent, void *void_arg)
{
ent->eflags |= ATA_EFLAG_OLD_ER;
+ ent->err_mask = 0;
return 0;
}
--
1.7.2.5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-04-23 1:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-23 1:09 [PATCH v2] libata: clear error mask of old error history Lin Ming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).