diff options
author | Tejun Heo <htejun@gmail.com> | 2006-04-02 04:54:46 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-04-02 10:02:57 -0400 |
commit | 90dac02c08dabd471927f151b8393eb51e3e020e (patch) | |
tree | fb799ab84c4fec00dba52c0180f24bd84a6ba69a /drivers | |
parent | 1c3fae4d7eb121933341443c37d3bbee43c0fb68 (diff) |
[PATCH] libata: use SATA speed down in ata_drive_probe_reset()
Make ata_drive_probe_reset() use SATA SPD configuration. Hardreset
will be force if speed renegotiation is necessary. Also, if a
hardreset fails, PHY speed is stepped down and hardreset is retried
until the lowest speed is reached.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/libata-core.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 63488673765f..4fd24075afd2 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -2578,7 +2578,7 @@ int ata_drive_probe_reset(struct ata_port *ap, ata_probeinit_fn_t probeinit, | |||
2578 | if (probeinit) | 2578 | if (probeinit) |
2579 | probeinit(ap); | 2579 | probeinit(ap); |
2580 | 2580 | ||
2581 | if (softreset) { | 2581 | if (softreset && !ata_set_sata_spd_needed(ap)) { |
2582 | rc = ata_do_reset(ap, softreset, postreset, 0, classes); | 2582 | rc = ata_do_reset(ap, softreset, postreset, 0, classes); |
2583 | if (rc == 0 && classes[0] != ATA_DEV_UNKNOWN) | 2583 | if (rc == 0 && classes[0] != ATA_DEV_UNKNOWN) |
2584 | goto done; | 2584 | goto done; |
@@ -2587,9 +2587,17 @@ int ata_drive_probe_reset(struct ata_port *ap, ata_probeinit_fn_t probeinit, | |||
2587 | if (!hardreset) | 2587 | if (!hardreset) |
2588 | goto done; | 2588 | goto done; |
2589 | 2589 | ||
2590 | rc = ata_do_reset(ap, hardreset, postreset, 0, classes); | 2590 | while (1) { |
2591 | if (rc || classes[0] != ATA_DEV_UNKNOWN) | 2591 | rc = ata_do_reset(ap, hardreset, postreset, 0, classes); |
2592 | goto done; | 2592 | if (rc == 0) { |
2593 | if (classes[0] != ATA_DEV_UNKNOWN) | ||
2594 | goto done; | ||
2595 | break; | ||
2596 | } | ||
2597 | |||
2598 | if (ata_down_sata_spd_limit(ap)) | ||
2599 | goto done; | ||
2600 | } | ||
2593 | 2601 | ||
2594 | if (softreset) | 2602 | if (softreset) |
2595 | rc = ata_do_reset(ap, softreset, postreset, 0, classes); | 2603 | rc = ata_do_reset(ap, softreset, postreset, 0, classes); |