Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / drivers / ide / pci / it821x.c
index 38f41b3..e9bad18 100644 (file)
@@ -62,7 +62,6 @@
  *     -       Move to libata once it grows up
  */
 
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/module.h>
 #include <linux/pci.h>
@@ -499,9 +498,14 @@ static int config_chipset_for_dma (ide_drive_t *drive)
 {
        u8 speed        = ide_dma_speed(drive, it821x_ratemask(drive));
 
-       config_it821x_chipset_for_pio(drive, !speed);
-       it821x_tune_chipset(drive, speed);
-       return ide_dma_enable(drive);
+       if (speed) {
+               config_it821x_chipset_for_pio(drive, 0);
+               it821x_tune_chipset(drive, speed);
+
+               return ide_dma_enable(drive);
+       }
+
+       return 0;
 }
 
 /**
@@ -651,6 +655,8 @@ 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;