This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / ide / pci / alim15x3.c
index 095ea1e..335f43f 100644 (file)
@@ -559,19 +559,18 @@ no_dma_set:
 }
 
 /**
- *     ali15x3_dma_setup       -       begin a DMA phase
- *     @drive: target device
+ *     ali15x3_dma_write       -       do a DMA IDE write
+ *     @drive: drive to issue write for
  *
- *     Returns 1 if the DMA cannot be performed, zero on success.
+ *     Returns 1 if the DMA write cannot be performed, zero on 
+ *     success.
  */
-
-static int ali15x3_dma_setup(ide_drive_t *drive)
+static int ali15x3_dma_write (ide_drive_t *drive)
 {
-       if (m5229_revision < 0xC2 && drive->media != ide_disk) {
-               if (rq_data_dir(drive->hwif->hwgroup->rq))
-                       return 1;       /* try PIO instead of DMA */
-       }
-       return ide_dma_setup(drive);
+       if ((m5229_revision < 0xC2) && (drive->media != ide_disk))
+               return 1;       /* try PIO instead of DMA */
+       return __ide_dma_write(drive);
 }
 
 /**
@@ -775,7 +774,7 @@ static void __init init_hwif_common_ali15x3 (ide_hwif_t *hwif)
                  * M1543C or newer for DMAing
                  */
                 hwif->ide_dma_check = &ali15x3_config_drive_for_dma;
-               hwif->dma_setup = &ali15x3_dma_setup;
+                hwif->ide_dma_write = &ali15x3_dma_write;
                if (!noautodma)
                        hwif->autodma = 1;
                if (!(hwif->udma_four))
@@ -800,8 +799,8 @@ static void __init init_hwif_ali15x3 (ide_hwif_t *hwif)
        s8 irq_routing_table[] = { -1,  9, 3, 10, 4,  5, 7,  6,
                                      1, 11, 0, 12, 0, 14, 0, 15 };
        int irq = -1;
-
-       if (hwif->pci_dev->device == PCI_DEVICE_ID_AL_M5229)
+       
+       if(hwif->pci_dev->device == PCI_DEVICE_ID_AL_M5229)
                hwif->irq = hwif->channel ? 15 : 14;
 
        if (isa_dev) {