linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cs5530: always tune PIO
@ 2007-08-02 22:46 Bartlomiej Zolnierkiewicz
  2007-08-02 23:51 ` Alan Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-08-02 22:46 UTC (permalink / raw)
  To: linux-ide


Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/pci/cs5530.c |   19 ++++++-------------
 1 file changed, 6 insertions(+), 13 deletions(-)

Index: b/drivers/ide/pci/cs5530.c
===================================================================
--- a/drivers/ide/pci/cs5530.c
+++ b/drivers/ide/pci/cs5530.c
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/ide/pci/cs5530.c		Version 0.74	Jul 28 2007
+ * linux/drivers/ide/pci/cs5530.c		Version 0.75	Aug 2 2007
  *
  * Copyright (C) 2000			Andre Hedrick <andre@linux-ide.org>
  * Copyright (C) 2000			Mark Lord <mlord@pobox.com>
@@ -270,20 +270,13 @@ static void __devinit init_hwif_cs5530 (
 
 	basereg = CS5530_BASEREG(hwif);
 	d0_timings = inl(basereg + 0);
-	if (CS5530_BAD_PIO(d0_timings)) {
-		/* PIO timings not initialized? */
+	if (CS5530_BAD_PIO(d0_timings))
 		outl(cs5530_pio_timings[(d0_timings >> 31) & 1][0], basereg + 0);
-		if (!hwif->drives[0].autotune)
-			hwif->drives[0].autotune = 1;
-			/* needs autotuning later */
-	}
-	if (CS5530_BAD_PIO(inl(basereg + 8))) {
-		/* PIO timings not initialized? */
+	if (CS5530_BAD_PIO(inl(basereg + 8)))
 		outl(cs5530_pio_timings[(d0_timings >> 31) & 1][0], basereg + 8);
-		if (!hwif->drives[1].autotune)
-			hwif->drives[1].autotune = 1;
-			/* needs autotuning later */
-	}
+
+	hwif->drives[0].autotune = 1;
+	hwif->drives[1].autotune = 1;
 
 	if (hwif->dma_base == 0)
 		return;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] cs5530: always tune PIO
  2007-08-02 22:46 [PATCH] cs5530: always tune PIO Bartlomiej Zolnierkiewicz
@ 2007-08-02 23:51 ` Alan Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2007-08-02 23:51 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide

On Fri, 3 Aug 2007 00:46:27 +0200
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:

> 
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> ---
>  drivers/ide/pci/cs5530.c |   19 ++++++-------------
>  1 file changed, 6 insertions(+), 13 deletions(-)
> 
> Index: b/drivers/ide/pci/cs5530.c
> ===================================================================
> --- a/drivers/ide/pci/cs5530.c
> +++ b/drivers/ide/pci/cs5530.c
> @@ -1,5 +1,5 @@
>  /*
> - * linux/drivers/ide/pci/cs5530.c		Version 0.74	Jul 28 2007
> + * linux/drivers/ide/pci/cs5530.c		Version 0.75	Aug 2 2007

Looks good but if you've got BIOS set timings and you override them you
might want to copy the Palmax handler from the libata one. Basically the
Palmax has the CDROM in the docking station and the link between the two
is not good enough for the highest mode the drive and cd can do but must
be run PIO.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-02 23:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-02 22:46 [PATCH] cs5530: always tune PIO Bartlomiej Zolnierkiewicz
2007-08-02 23:51 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).