Commit 9716387311c790de381214c03e7f1b72b91a8189

Authored by Sergei Shtylyov
Committed by Jeff Garzik
1 parent 78140cfec5

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>

Showing 1 changed file with 1 additions and 2 deletions Side-by-side Diff

drivers/ata/pata_legacy.c
... ... @@ -401,8 +401,7 @@
401 401 ata_timing_compute(adev, adev->pio_mode, &t, 20000, 1000);
402 402  
403 403 active = clamp_val(t.active, 2, 15);
404   - recover = clamp_val(t.recover, 2, 16);
405   - recover &= 0x15;
  404 + recover = clamp_val(t.recover, 2, 16) & 0x0F;
406 405  
407 406 inb(0x3E6);
408 407 inb(0x3E6);