summaryrefslogtreecommitdiff
path: root/drivers/ata/libata-eh.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-11-12 01:55:01 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-12 01:55:01 (GMT)
commit87618e0003dbca0f51f1ef52fa4199bd65212f41 (patch)
treed814cfe3675352bea6133518b7d93d7052048ece /drivers/ata/libata-eh.c
parentc1f4246716392ec8693c23cffb969bd73c1b0910 (diff)
parent2d5fcc986da944bca8257f358b155eec79fc4120 (diff)
downloadlinux-fsl-qoriq-87618e0003dbca0f51f1ef52fa4199bd65212f41.tar.xz
Merge branch 'upstream-linus' of git://github.com/jgarzik/libata-dev
* 'upstream-linus' of git://github.com/jgarzik/libata-dev: pata_of_platform: Don't use NO_IRQ [libata] ahci: Add ASMedia ASM1061 support [libata] Issue SRST to Sil3726 PMP sata_sis.c: trivial spelling fix ahci_platform: use dev_get_platdata() [libata] libata-scsi.c: Add function parameter documentation
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r--drivers/ata/libata-eh.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index f22957c..a9b2820 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2883,7 +2883,7 @@ int ata_eh_reset(struct ata_link *link, int classify,
sata_scr_read(link, SCR_STATUS, &sstatus))
rc = -ERESTART;
- if (rc == -ERESTART || try >= max_tries) {
+ if (try >= max_tries) {
/*
* Thaw host port even if reset failed, so that the port
* can be retried on the next phy event. This risks
@@ -2909,6 +2909,16 @@ int ata_eh_reset(struct ata_link *link, int classify,
ata_eh_acquire(ap);
}
+ /*
+ * While disks spinup behind PMP, some controllers fail sending SRST.
+ * They need to be reset - as well as the PMP - before retrying.
+ */
+ if (rc == -ERESTART) {
+ if (ata_is_host_link(link))
+ ata_eh_thaw_port(ap);
+ goto out;
+ }
+
if (try == max_tries - 1) {
sata_down_spd_limit(link, 0);
if (slave)