patch-2.4.22 linux-2.4.22/drivers/ide/pci/alim15x3.c
Next file: linux-2.4.22/drivers/ide/pci/cmd640.c
Previous file: linux-2.4.22/drivers/ide/legacy/pdc4030.c
Back to the patch index
Back to the overall index
- Lines: 29
- Date:
2003-08-25 04:44:41.000000000 -0700
- Orig file:
linux-2.4.21/drivers/ide/pci/alim15x3.c
- Orig date:
2003-06-13 07:51:33.000000000 -0700
diff -urN linux-2.4.21/drivers/ide/pci/alim15x3.c linux-2.4.22/drivers/ide/pci/alim15x3.c
@@ -525,10 +525,14 @@
drive->init_speed = 0;
+ /* Set reasonable PIO timings first - some of them are needed
+ for DMA as well. */
+ hwif->tuneproc(drive, 255);
+
if ((id->capability & 1) != 0 && drive->autodma) {
/* Consult the list of known "bad" drives */
if (hwif->ide_dma_bad_drive(drive))
- goto ata_pio;
+ goto no_dma_set;
if ((id->field_valid & 4) && (m5229_revision >= 0xC2)) {
if (id->dma_ultra & hwif->ultra_mask) {
/* Force if Capable UltraDMA */
@@ -550,11 +554,9 @@
if (!config_chipset_for_dma(drive))
goto no_dma_set;
} else {
- goto ata_pio;
+ goto no_dma_set;
}
} else {
-ata_pio:
- hwif->tuneproc(drive, 255);
no_dma_set:
return hwif->ide_dma_off_quietly(drive);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)