libata: clear error mask of old error history
PATCH v2 1/1 libata: clear error mask of old error history
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 <[email protected]>
Reviewed-by Grant Grundler <[email protected]>
Cc stable <[email protected]> # 2.6.37+
Signed-off-by Lin Ming <[email protected]>
---
v2:
- Add Grant's review
- CC stable
drivers/ata/libata-eh.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/ata/libata-eh.c +2 -1
@@ -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 ; }
Signature · 1 line
1.7.2.5