au1xxx: fix au1xxx_set_pio_mode()
PATCH 1/1 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).
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>
--- drivers/ide/mips/au1xxx-ide.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/ide/mips/au1xxx-ide.c +3 -4
@@ -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_drivau_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)
Quoted 2 lines · Bartlomiej Zolnierkiewicz
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... :-)
Quoted 1 line
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>
Acked-by Sergei Shtylyov <[email protected]>
MBR, Sergei
Quoted 10 lines · Sergei Shtylyov
Quoted 2 lines · Bartlomiej Zolnierkiewicz
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... :-)
Quoted 1 line
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>Acked-by Sergei Shtylyov <[email protected]>
added