return ide_stopped;
}
-void check_dma_crc (ide_drive_t *drive)
+static void check_dma_crc(ide_drive_t *drive)
{
+#ifdef CONFIG_BLK_DEV_IDEDMA
if (drive->crc_count) {
(void) HWIF(drive)->ide_dma_off_quietly(drive);
ide_set_xfer_rate(drive, ide_auto_reduce_xfer(drive));
if (drive->current_speed >= XFER_SW_DMA_0)
(void) HWIF(drive)->ide_dma_on(drive);
- } else {
+ } else
(void)__ide_dma_off(drive);
- }
+#endif
}
void pre_reset (ide_drive_t *drive)
static int set_using_dma (ide_drive_t *drive, int arg)
{
+#ifdef CONFIG_BLK_DEV_IDEDMA
if (!drive->id || !(drive->id->capability & 1))
return -EPERM;
if (HWIF(drive)->ide_dma_check == NULL)
return -EIO;
}
return 0;
+#else
+ return -EPERM;
+#endif
}
static int set_pio_mode (ide_drive_t *drive, int arg)
return 0;
}
+#ifdef CONFIG_BLK_DEV_IDEDMA_PCI
+
#ifdef CONFIG_BLK_DEV_IDEDMA_FORCED
/*
* Long lost data from 2.0.34 that is now in 2.0.39
}
return dma_base;
}
+#endif /* CONFIG_BLK_DEV_IDEDMA_PCI */
void ide_setup_pci_noise (struct pci_dev *dev, ide_pci_device_t *d)
{
extern ide_startstop_t __ide_dma_queued_write(ide_drive_t *drive);
extern ide_startstop_t __ide_dma_queued_start(ide_drive_t *drive);
#endif
+
+#else
+static inline int __ide_dma_off(ide_drive_t *drive) { return 0; }
#endif /* CONFIG_BLK_DEV_IDEDMA */
#ifndef CONFIG_BLK_DEV_IDEDMA_PCI