Patchwork [22/64] pata_via: fix address setup timings underlocking

login
register
mail settings
Submitter Bartlomiej Zolnierkiewicz
Date Jan. 18, 2010, 5:17 p.m.
Message ID <20100118171703.14623.85025.sendpatchset@localhost>
Download mbox | patch
Permalink /patch/43140/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Bartlomiej Zolnierkiewicz - Jan. 18, 2010, 5:17 p.m.
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] pata_via: fix address setup timings underlocking

Correct via_do_set_mode() documentation while at it.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ata/pata_via.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alan Cox - Jan. 18, 2010, 6 p.m.
On Mon, 18 Jan 2010 18:17:03 +0100
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:

> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Subject: [PATCH] pata_via: fix address setup timings underlocking
> 
> Correct via_do_set_mode() documentation while at it.

>  		setup &= ~(3 << shift);
> -		setup |= clamp_val(t.setup, 1, 4) << shift;	/* 1,4 or 1,4 - 1  FIXME */
> +		setup |= (clamp_val(t.setup, 1, 4) - 1) << shift;
>  		pci_write_config_byte(pdev, 0x4C, setup);

Change looks correct to me and matches the VT8235 data sheet (p.97)

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jeff Garzik - Jan. 21, 2010, 4:19 a.m.
On 01/18/2010 12:17 PM, Bartlomiej Zolnierkiewicz wrote:
> From: Bartlomiej Zolnierkiewicz<bzolnier@gmail.com>
> Subject: [PATCH] pata_via: fix address setup timings underlocking
>
> Correct via_do_set_mode() documentation while at it.
>
> Signed-off-by: Bartlomiej Zolnierkiewicz<bzolnier@gmail.com>
> ---
>   drivers/ata/pata_via.c |    4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

applied


--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

Index: b/drivers/ata/pata_via.c
===================================================================
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -229,7 +229,7 @@  static int via_pre_reset(struct ata_link
 
 
 /**
- *	via_do_set_mode	-	set initial PIO mode data
+ *	via_do_set_mode	-	set transfer mode data
  *	@ap: ATA interface
  *	@adev: ATA device
  *	@mode: ATA mode being programmed
@@ -273,7 +273,7 @@  static void via_do_set_mode(struct ata_p
 
 		pci_read_config_byte(pdev, 0x4C, &setup);
 		setup &= ~(3 << shift);
-		setup |= clamp_val(t.setup, 1, 4) << shift;	/* 1,4 or 1,4 - 1  FIXME */
+		setup |= (clamp_val(t.setup, 1, 4) - 1) << shift;
 		pci_write_config_byte(pdev, 0x4C, setup);
 	}