Skip to content

Commit

Permalink
au1xxx: fix au1xxx_set_pio_mode()
Browse files Browse the repository at this point in the history
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 <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Oct 13, 2007
1 parent 75d7d96 commit 0f45894
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/ide/mips/au1xxx-ide.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 0f45894

Please sign in to comment.