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: default avatarSergei Shtylyov <>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <>
parent 75d7d963
......@@ -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))
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)
speed = pio + XFER_PIO_0;
ide_config_drive_speed(drive, speed);
static int auide_tune_chipset(ide_drive_t *drive, const u8 speed)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment