linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] au1xxx: fix au1xxx_set_pio_mode()
@ 2007-07-26 19:55 Bartlomiej Zolnierkiewicz
  2007-07-26 20:20 ` Sergei Shtylyov
  0 siblings, 1 reply; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-07-26 19:55 UTC (permalink / raw)
  To: linux-ide


Set transfer mode on the device before programming the host controller for
the new timings (matches what auide_tune_chipset() is doing wrt DMA modes).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/mips/au1xxx-ide.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Index: b/drivers/ide/mips/au1xxx-ide.c
===================================================================
--- a/drivers/ide/mips/au1xxx-ide.c
+++ b/drivers/ide/mips/au1xxx-ide.c
@@ -103,7 +103,9 @@ static void au1xxx_set_pio_mode(ide_driv
 {
 	int mem_sttime;
 	int mem_stcfg;
-	u8 speed;
+
+	if (ide_config_drive_speed(drive, pio + XFER_PIO_0))
+		return;
 
 	mem_sttime = 0;
 	mem_stcfg  = au_readl(MEM_STCFG2);
@@ -164,9 +166,6 @@ static void au1xxx_set_pio_mode(ide_driv
 
 	au_writel(mem_sttime,MEM_STTIME2);
 	au_writel(mem_stcfg,MEM_STCFG2);
-
-	speed = pio + XFER_PIO_0;
-	ide_config_drive_speed(drive, speed);
 }
 
 static int auide_tune_chipset(ide_drive_t *drive, const u8 speed)

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

* Re: [PATCH] au1xxx: fix au1xxx_set_pio_mode()
  2007-07-26 19:55 [PATCH] au1xxx: fix au1xxx_set_pio_mode() Bartlomiej Zolnierkiewicz
@ 2007-07-26 20:20 ` Sergei Shtylyov
  2007-07-28 21:57   ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 3+ messages in thread
From: Sergei Shtylyov @ 2007-07-26 20:20 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide

Bartlomiej Zolnierkiewicz wrote:

> Set transfer mode on the device before programming the host controller for
> the new timings (matches what auide_tune_chipset() is doing wrt DMA modes).

   It's not that the most other drives are doing something different... :-)

> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

MBR, Sergei

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

* Re: [PATCH] au1xxx: fix au1xxx_set_pio_mode()
  2007-07-26 20:20 ` Sergei Shtylyov
@ 2007-07-28 21:57   ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-07-28 21:57 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: linux-ide

On Thursday 26 July 2007, Sergei Shtylyov wrote:
> Bartlomiej Zolnierkiewicz wrote:
> 
> > Set transfer mode on the device before programming the host controller for
> > the new timings (matches what auide_tune_chipset() is doing wrt DMA modes).
> 
>    It's not that the most other drives are doing something different... :-)
> 
> > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> 
> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

added

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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-26 19:55 [PATCH] au1xxx: fix au1xxx_set_pio_mode() Bartlomiej Zolnierkiewicz
2007-07-26 20:20 ` Sergei Shtylyov
2007-07-28 21:57   ` Bartlomiej Zolnierkiewicz

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).