Patchwork [#upstream-fixes] libata: fix follow-up SRST failure path

login
register
mail settings
Submitter Tejun Heo
Date July 8, 2009, 3:16 a.m.
Message ID <4A540F95.70604@kernel.org>
Download mbox | patch
Permalink /patch/29578/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Tejun Heo - July 8, 2009, 3:16 a.m.
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.

Signed-off-by: Tejun Heo <tj@kernel.org>
---
 drivers/ata/libata-eh.c |    4 ++++
 1 file changed, 4 insertions(+)

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jeff Garzik - July 15, 2009, 2:43 a.m.
Tejun Heo wrote:
> 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.
> 
> Signed-off-by: Tejun Heo <tj@kernel.org>
> ---
>  drivers/ata/libata-eh.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
> index 94919ad..d37808b 100644
> --- a/drivers/ata/libata-eh.c
> +++ b/drivers/ata/libata-eh.c
> @@ -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


--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 94919ad..d37808b 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -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)