aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ata/libata-eh.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 16fa45755c18..ed16fbedaabd 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2883,8 +2883,17 @@ int ata_eh_reset(struct ata_link *link, int classify,
2883 sata_scr_read(link, SCR_STATUS, &sstatus)) 2883 sata_scr_read(link, SCR_STATUS, &sstatus))
2884 rc = -ERESTART; 2884 rc = -ERESTART;
2885 2885
2886 if (rc == -ERESTART || try >= max_tries) 2886 if (rc == -ERESTART || try >= max_tries) {
2887 /*
2888 * Thaw host port even if reset failed, so that the port
2889 * can be retried on the next phy event. This risks
2890 * repeated EH runs but seems to be a better tradeoff than
2891 * shutting down a port after a botched hotplug attempt.
2892 */
2893 if (ata_is_host_link(link))
2894 ata_eh_thaw_port(ap);
2887 goto out; 2895 goto out;
2896 }
2888 2897
2889 now = jiffies; 2898 now = jiffies;
2890 if (time_before(now, deadline)) { 2899 if (time_before(now, deadline)) {