alim15x3: PIO fallback fix

If DMA tuning fails always set the best PIO mode.
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 826a1b65
...@@ -534,7 +534,7 @@ static int ali15x3_config_drive_for_dma(ide_drive_t *drive) ...@@ -534,7 +534,7 @@ static int ali15x3_config_drive_for_dma(ide_drive_t *drive)
struct hd_driveid *id = drive->id; struct hd_driveid *id = drive->id;
if ((m5229_revision<=0x20) && (drive->media!=ide_disk)) if ((m5229_revision<=0x20) && (drive->media!=ide_disk))
goto no_dma_set; goto ata_pio;
drive->init_speed = 0; drive->init_speed = 0;
...@@ -555,20 +555,19 @@ try_dma_modes: ...@@ -555,20 +555,19 @@ try_dma_modes:
(id->dma_1word & hwif->swdma_mask)) { (id->dma_1word & hwif->swdma_mask)) {
/* Force if Capable regular DMA modes */ /* Force if Capable regular DMA modes */
if (!config_chipset_for_dma(drive)) if (!config_chipset_for_dma(drive))
goto no_dma_set; goto ata_pio;
} }
} else if (__ide_dma_good_drive(drive) && } else if (__ide_dma_good_drive(drive) &&
(id->eide_dma_time < 150)) { (id->eide_dma_time < 150)) {
/* Consult the list of known "good" drives */ /* Consult the list of known "good" drives */
if (!config_chipset_for_dma(drive)) if (!config_chipset_for_dma(drive))
goto no_dma_set; goto ata_pio;
} else { } else {
goto ata_pio; goto ata_pio;
} }
} else { } else {
ata_pio: ata_pio:
hwif->tuneproc(drive, 255); hwif->tuneproc(drive, 255);
no_dma_set:
return -1; return -1;
} }
......
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