Commit f7c34e80 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] fix tuning of alim15x3

parent 3192efb4
......@@ -518,7 +518,7 @@ static int ali15x3_config_drive_for_dma(ide_drive_t *drive)
if ((id != NULL) && ((id->capability & 1) != 0) && drive->autodma) {
/* Consult the list of known "bad" drives */
if (hwif->ide_dma_bad_drive(drive))
goto fast_ata_pio;
goto ata_pio;
if ((id->field_valid & 4) && (m5229_revision >= 0xC2)) {
if (id->dma_ultra & hwif->ultra_mask) {
/* Force if Capable UltraDMA */
......@@ -540,12 +540,12 @@ static int ali15x3_config_drive_for_dma(ide_drive_t *drive)
if (!config_chipset_for_dma(drive))
goto no_dma_set;
} else {
goto fast_ata_pio;
goto ata_pio;
}
} else if ((id->capability & 8) || (id->field_valid & 2)) {
fast_ata_pio:
} else {
ata_pio:
hwif->tuneproc(drive, 255);
no_dma_set:
hwif->tuneproc(drive, 5);
return hwif->ide_dma_off_quietly(drive);
}
return hwif->ide_dma_on(drive);
......@@ -753,6 +753,8 @@ static void __init init_hwif_common_ali15x3 (ide_hwif_t *hwif)
return;
}
hwif->atapi_dma = 1;
if (m5229_revision > 0x20)
hwif->ultra_mask = 0x3f;
hwif->mwdma_mask = 0x07;
......
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