PATCH: fix tuning of alim15x3

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Fri Mar 21 2003 - 15:48:48 EST


diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.65/drivers/ide/pci/alim15x3.c linux-2.5.65-ac2/drivers/ide/pci/alim15x3.c
--- linux-2.5.65/drivers/ide/pci/alim15x3.c 2003-03-03 19:20:09.000000000 +0000
+++ linux-2.5.65-ac2/drivers/ide/pci/alim15x3.c 2003-03-06 23:11:45.000000000 +0000
@@ -518,7 +518,7 @@
         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 @@
                         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 @@
                 return;
         }
 
+ hwif->atapi_dma = 1;
+
         if (m5229_revision > 0x20)
                 hwif->ultra_mask = 0x3f;
         hwif->mwdma_mask = 0x07;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Mar 23 2003 - 22:00:37 EST