From: Bartlomiej Zolnierkiewicz Date: Mon, 18 Jan 2010 17:14:55 +0000 (+0100) Subject: pata_cmd64x: fix PIO setup X-Git-Tag: upstream/snapshot3+hdmi~15538^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a2bd62207af4be8f5fe815ff90cc309056407829;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git pata_cmd64x: fix PIO setup Fix incorrect handling of recovery clocks value == 16 resulting in overclocked recovery timings & potentially underclocked active timings. Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c index 0efb1f5..db08c9d 100644 --- a/drivers/ata/pata_cmd64x.c +++ b/drivers/ata/pata_cmd64x.c @@ -2,6 +2,7 @@ * pata_cmd64x.c - CMD64x PATA for new ATA layer * (C) 2005 Red Hat Inc * Alan Cox + * (C) 2009-2010 Bartlomiej Zolnierkiewicz * * Based upon * linux/drivers/ide/pci/cmd64x.c Version 1.30 Sept 10, 2002 @@ -147,7 +148,9 @@ static void cmd64x_set_timing(struct ata_port *ap, struct ata_device *adev, u8 m /* Now convert the clocks into values we can actually stuff into the chip */ - if (t.recover > 1) + if (t.recover == 16) + t.recover = 0; + else if (t.recover > 1) t.recover--; else t.recover = 15;