diff options
author | Gwendal Grignou <gwendal@google.com> | 2011-10-19 20:17:02 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2011-11-09 01:38:00 -0500 |
commit | 7a46c0780babea7d0b3f277a33ea243be38eb942 (patch) | |
tree | 75d599d93a0f9faeadb421e0c83d8533e293630a /drivers/ata | |
parent | 142924cf402f9c0568004f0e2a27988fe3556c61 (diff) |
[libata] Issue SRST to Sil3726 PMP
Reenable sending SRST to devices connected behind a Sil3726 PMP.
This allow staggered spinups and handles drives that spins up slowly.
While the drives spin up, the PMP will not accept SRST.
Most controller reissues the reset until the drive is ready, while
some [Sil3124] returns an error.
In ata_eh_error, wait 10s before reset the ATA port and try again.
Signed-off-by: Gwendal Grignou <gwendal@google.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-eh.c | 12 | ||||
-rw-r--r-- | drivers/ata/libata-pmp.c | 7 |
2 files changed, 13 insertions, 6 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index f22957c2769a..a9b282038000 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, | |||
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 (try >= max_tries) { |
2887 | /* | 2887 | /* |
2888 | * Thaw host port even if reset failed, so that the port | 2888 | * Thaw host port even if reset failed, so that the port |
2889 | * can be retried on the next phy event. This risks | 2889 | * can be retried on the next phy event. This risks |
@@ -2909,6 +2909,16 @@ int ata_eh_reset(struct ata_link *link, int classify, | |||
2909 | ata_eh_acquire(ap); | 2909 | ata_eh_acquire(ap); |
2910 | } | 2910 | } |
2911 | 2911 | ||
2912 | /* | ||
2913 | * While disks spinup behind PMP, some controllers fail sending SRST. | ||
2914 | * They need to be reset - as well as the PMP - before retrying. | ||
2915 | */ | ||
2916 | if (rc == -ERESTART) { | ||
2917 | if (ata_is_host_link(link)) | ||
2918 | ata_eh_thaw_port(ap); | ||
2919 | goto out; | ||
2920 | } | ||
2921 | |||
2912 | if (try == max_tries - 1) { | 2922 | if (try == max_tries - 1) { |
2913 | sata_down_spd_limit(link, 0); | 2923 | sata_down_spd_limit(link, 0); |
2914 | if (slave) | 2924 | if (slave) |
diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c index 104462dbc524..21b80c555c60 100644 --- a/drivers/ata/libata-pmp.c +++ b/drivers/ata/libata-pmp.c | |||
@@ -389,12 +389,9 @@ static void sata_pmp_quirks(struct ata_port *ap) | |||
389 | /* link reports offline after LPM */ | 389 | /* link reports offline after LPM */ |
390 | link->flags |= ATA_LFLAG_NO_LPM; | 390 | link->flags |= ATA_LFLAG_NO_LPM; |
391 | 391 | ||
392 | /* Class code report is unreliable and SRST | 392 | /* Class code report is unreliable. */ |
393 | * times out under certain configurations. | ||
394 | */ | ||
395 | if (link->pmp < 5) | 393 | if (link->pmp < 5) |
396 | link->flags |= ATA_LFLAG_NO_SRST | | 394 | link->flags |= ATA_LFLAG_ASSUME_ATA; |
397 | ATA_LFLAG_ASSUME_ATA; | ||
398 | 395 | ||
399 | /* port 5 is for SEMB device and it doesn't like SRST */ | 396 | /* port 5 is for SEMB device and it doesn't like SRST */ |
400 | if (link->pmp == 5) | 397 | if (link->pmp == 5) |