Skip to contentSkip to conversation

libata: clear error mask of old error history

PATCH Superseded Lin Ming 2 participants 3 messages Apr 20, 2012 – Apr 23, 2012 libata

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Lin Ming

author
#0 lore raw

PATCH 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.

---

Hi Jeff,

This patch fixes an old regression introduced in 2.6.37-rc1 of commit d902747.

So it should be included into stable releases since 2.6.37.

 drivers/ata/libata-eh.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/ata/libata-eh.c +2 -1
index c61316e..4c6f49b 100644
@@ -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
#1 lore raw

Hello.

Quoted 10 lines · Lin Ming

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.

Quoted 8 lines

---

Hi Jeff,

This patch fixes an old regression introduced in 2.6.37-rc1 of commit d902747.

So it should be included into stable releases since 2.6.37.

You should have included:

Cc [email protected] # 2.6.37+

after your signoff in this case.

MBR, Sergei

author
#2 lore raw
Quoted 29 lines · Sergei Shtylyov

Hello.

Quoted 22 lines · Lin Ming

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.

---

Hi Jeff,

This patch fixes an old regression introduced in 2.6.37-rc1 of commit d902747.

Quoted 8 lines
Quoted 1 line

So it should be included into stable releases since 2.6.37.

  You should have included:

Cc [email protected] # 2.6.37+

after your signoff in this case.

Re-send with stable CCed.

Thanks.

Quoted 2 lines

MBR, Sergei