aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-eh.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r--drivers/ata/libata-eh.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index dfb6e9d3d759..7f099d6e4e0b 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2802,10 +2802,11 @@ int ata_eh_reset(struct ata_link *link, int classify,
2802 } 2802 }
2803 2803
2804 /* 2804 /*
2805 * Some controllers can't be frozen very well and may set 2805 * Some controllers can't be frozen very well and may set spurious
2806 * spuruious error conditions during reset. Clear accumulated 2806 * error conditions during reset. Clear accumulated error
2807 * error information. As reset is the final recovery action, 2807 * information and re-thaw the port if frozen. As reset is the
2808 * nothing is lost by doing this. 2808 * final recovery action and we cross check link onlineness against
2809 * device classification later, no hotplug event is lost by this.
2809 */ 2810 */
2810 spin_lock_irqsave(link->ap->lock, flags); 2811 spin_lock_irqsave(link->ap->lock, flags);
2811 memset(&link->eh_info, 0, sizeof(link->eh_info)); 2812 memset(&link->eh_info, 0, sizeof(link->eh_info));
@@ -2814,6 +2815,9 @@ int ata_eh_reset(struct ata_link *link, int classify,
2814 ap->pflags &= ~ATA_PFLAG_EH_PENDING; 2815 ap->pflags &= ~ATA_PFLAG_EH_PENDING;
2815 spin_unlock_irqrestore(link->ap->lock, flags); 2816 spin_unlock_irqrestore(link->ap->lock, flags);
2816 2817
2818 if (ap->pflags & ATA_PFLAG_FROZEN)
2819 ata_eh_thaw_port(ap);
2820
2817 /* 2821 /*
2818 * Make sure onlineness and classification result correspond. 2822 * Make sure onlineness and classification result correspond.
2819 * Hotplug could have happened during reset and some 2823 * Hotplug could have happened during reset and some