linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / ide / pci / it821x.c
index e9bad18..38f41b3 100644 (file)
@@ -62,6 +62,7 @@
  *     -       Move to libata once it grows up
  */
 
+#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/module.h>
 #include <linux/pci.h>
@@ -498,14 +499,9 @@ static int config_chipset_for_dma (ide_drive_t *drive)
 {
        u8 speed        = ide_dma_speed(drive, it821x_ratemask(drive));
 
-       if (speed) {
-               config_it821x_chipset_for_pio(drive, 0);
-               it821x_tune_chipset(drive, speed);
-
-               return ide_dma_enable(drive);
-       }
-
-       return 0;
+       config_it821x_chipset_for_pio(drive, !speed);
+       it821x_tune_chipset(drive, speed);
+       return ide_dma_enable(drive);
 }
 
 /**
@@ -655,8 +651,6 @@ static void __devinit init_hwif_it821x(ide_hwif_t *hwif)
        }
        ide_set_hwifdata(hwif, idev);
 
-       hwif->atapi_dma = 1;
-
        pci_read_config_byte(hwif->pci_dev, 0x50, &conf);
        if(conf & 1) {
                idev->smart = 1;