Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0f458943e0247906b7a3f534f9e9e7ff3d901296
Commit:     0f458943e0247906b7a3f534f9e9e7ff3d901296
Parent:     75d7d963e3dcf8a1410000ab246921709e276cd9
Author:     Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
AuthorDate: Sat Oct 13 17:47:51 2007 +0200
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Sat Oct 13 17:47:51 2007 +0200

    au1xxx: fix au1xxx_set_pio_mode()
    
    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).
    
    Acked-by: Sergei Shtylyov <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/mips/au1xxx-ide.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c
index 85819ae..c319f61 100644
--- 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_drive_t *drive, const 
u8 pio)
 {
        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_drive_t *drive, const 
u8 pio)
 
        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)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to