aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2012-01-19 11:09:56 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-02 12:27:13 -0400
commitdfa5919bcc4079b0d48bb0441da8d5b144fef34f (patch)
tree00acd8aa854960e679cbd0402583e38e1b033729 /drivers/ata
parent3852bb50cf750bbdd45debfe4c72981e9141bf84 (diff)
pata_legacy: correctly mask recovery field for HT6560B
commit 9716387311c790de381214c03e7f1b72b91a8189 upstream. According to the HT6560H datasheet, the recovery timing field is 4-bit wide, with a value of 0 meaning 16 cycles. Correct obvious thinko in the recovery field mask. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/pata_legacy.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
index 6bd9425ba5a..d750962916b 100644
--- a/drivers/ata/pata_legacy.c
+++ b/drivers/ata/pata_legacy.c
@@ -396,8 +396,7 @@ static void ht6560b_set_piomode(struct ata_port *ap, struct ata_device *adev)
396 ata_timing_compute(adev, adev->pio_mode, &t, 20000, 1000); 396 ata_timing_compute(adev, adev->pio_mode, &t, 20000, 1000);
397 397
398 active = clamp_val(t.active, 2, 15); 398 active = clamp_val(t.active, 2, 15);
399 recover = clamp_val(t.recover, 2, 16); 399 recover = clamp_val(t.recover, 2, 16) & 0x0F;
400 recover &= 0x15;
401 400
402 inb(0x3E6); 401 inb(0x3E6);
403 inb(0x3E6); 402 inb(0x3E6);