summaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2012-01-19 19:09:56 +0300
committerJeff Garzik <jgarzik@redhat.com>2012-03-13 12:43:13 -0400
commit9716387311c790de381214c03e7f1b72b91a8189 (patch)
tree345952710099bb05c3ca32aa77b71bd71c0bd516 /drivers/ata
parent78140cfec503c60a178b11fbaae2fef63e9abdc0 (diff)
downloadop-kernel-dev-9716387311c790de381214c03e7f1b72b91a8189.zip
op-kernel-dev-9716387311c790de381214c03e7f1b72b91a8189.tar.gz
pata_legacy: correctly mask recovery field for HT6560B
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> Cc: stable@kernel.org Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
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 35aca7d..4fe9d21 100644
--- a/drivers/ata/pata_legacy.c
+++ b/drivers/ata/pata_legacy.c
@@ -401,8 +401,7 @@ static void ht6560b_set_piomode(struct ata_port *ap, struct ata_device *adev)
ata_timing_compute(adev, adev->pio_mode, &t, 20000, 1000);
active = clamp_val(t.active, 2, 15);
- recover = clamp_val(t.recover, 2, 16);
- recover &= 0x15;
+ recover = clamp_val(t.recover, 2, 16) & 0x0F;
inb(0x3E6);
inb(0x3E6);
OpenPOWER on IntegriCloud