libata: add @spd_limit to sata_down_spd_limit()

Add @spd_limit to sata_down_spd_limit() so that the caller can specify
the SPD limit it wants.  This parameter doesn't get in the way even
when it's too low.  The closest possible limit is applied.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This commit is contained in:
Tejun Heo
2009-01-29 20:31:33 +09:00
committed by Jeff Garzik
parent 99cf610aa4
commit a07d499b47
4 changed files with 27 additions and 12 deletions

View File

@@ -729,7 +729,7 @@ static int sata_pmp_eh_recover_pmp(struct ata_port *ap,
if (tries) {
/* consecutive revalidation failures? speed down */
if (reval_failed)
sata_down_spd_limit(link);
sata_down_spd_limit(link, 0);
else
reval_failed = 1;