Skip to contentSkip to conversation

libata: fix follow-up SRST failure path

PATCH Applied Tejun Heo 2 participants 2 messages Jul 8, 2009 – Jul 15, 2009 libata

lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

PATCH 1/1 libata: fix follow-up SRST failure path

ata_eh_reset() was missing error return handling after follow-up SRST allowing EH to continue the normal probing path after reset failure. This was discovered while testing new WD 2TB drives which take longer than 10 secs to spin up and cause the first follow-up SRST to time out.

---
 drivers/ata/libata-eh.c |    4 ++++
 1 file changed, 4 insertions(+)
drivers/ata/libata-eh.c +4 -0
index 94919ad..d37808b 100644
@@ -2517,6 +2517,10 @@ int ata_eh_reset(struct ata_link *link, int classify,
 
 			ata_eh_about_to_do(link, NULL, ATA_EH_RESET);
 			rc = ata_do_reset(link, reset, classes, deadline, true);
+			if (rc) {
+				failed_link = link;
+				goto fail;
+			}
 		}
 	} else {
 		if (verbose)
Applied
#1 lore raw
Quoted 16 lines · Tejun Heo

ata_eh_reset() was missing error return handling after follow-up SRST allowing EH to continue the normal probing path after reset failure. This was discovered while testing new WD 2TB drives which take longer than 10 secs to spin up and cause the first follow-up SRST to time out.

---
 drivers/ata/libata-eh.c |    4 ++++
 1 file changed, 4 insertions(+)
drivers/ata/libata-eh.c +0 -0
index 94919ad..d37808b 100644

drivers/ata/libata-eh.c int ata_eh_reset(struct ata_link *link, int classify, · line 2524

Quoted 8 lines
drivers/ata/libata-eh.c +4 -0
@@ -2517,6 +2517,10 @@ int ata_eh_reset(struct ata_link *link, int classify,
 
 			ata_eh_about_to_do(link, NULL, ATA_EH_RESET);
 			rc = ata_do_reset(link, reset, classes, deadline, true);
+			if (rc) {
+				failed_link = link;
+				goto fail;
+			}
 		}

applied