return icside_dma_host_off(drive);
}
-static int icside_dma_off(ide_drive_t *drive)
-{
- printk("%s: DMA disabled\n", drive->name);
- return icside_dma_off_quietly(drive);
-}
-
static int icside_dma_host_on(ide_drive_t *drive)
{
return 0;
hwif->ide_dma_check = icside_dma_check;
hwif->ide_dma_host_off = icside_dma_host_off;
hwif->ide_dma_off_quietly = icside_dma_off_quietly;
- hwif->ide_dma_off = icside_dma_off;
hwif->ide_dma_host_on = icside_dma_host_on;
hwif->ide_dma_on = icside_dma_on;
hwif->ide_dma_read = icside_dma_read;
if (dma) {
info->dma = 0;
if ((dma_error = HWIF(drive)->ide_dma_end(drive)))
- HWIF(drive)->ide_dma_off(drive);
+ __ide_dma_off(drive);
}
if (cdrom_decode_status(drive, 0, &stat))
if (dma) {
if (dma_error) {
printk("ide-cd: dma error\n");
- HWIF(drive)->ide_dma_off(drive);
+ __ide_dma_off(drive);
return DRIVER(drive)->error(drive, "dma error", stat);
}
info->dma = 0;
if ((dma_error = HWIF(drive)->ide_dma_end(drive))) {
printk("ide-cd: write dma error\n");
- HWIF(drive)->ide_dma_off(drive);
+ __ide_dma_off(drive);
}
}
if ((id->capability & 1) && hwif->autodma) {
/* Consult the list of known "bad" drives */
if (__ide_dma_bad_drive(drive))
- return hwif->ide_dma_off(drive);
+ return __ide_dma_off(drive);
/*
* Enable DMA on any drive that has
}
EXPORT_SYMBOL(__ide_dma_off_quietly);
+#endif /* CONFIG_BLK_DEV_IDEDMA_PCI */
/**
- * __ide_dma_host_off - Generic DMA kill
- * @drive: drive to control
+ * __ide_dma_off - disable DMA on a device
+ * @drive: drive to disable DMA on
*
- * Turn off the current DMA on this IDE controller. Inform the
- * user that DMA has been disabled.
+ * Disable IDE DMA for a device on this IDE controller.
+ * Inform the user that DMA has been disabled.
*/
int __ide_dma_off (ide_drive_t *drive)
EXPORT_SYMBOL(__ide_dma_off);
+#ifdef CONFIG_BLK_DEV_IDEDMA_PCI
/**
* __ide_dma_host_on - Enable DMA on a host
* @drive: drive to enable for DMA
if (!(hwif->dma_prdtable))
hwif->dma_prdtable = (hwif->dma_base + 4);
- if (!hwif->ide_dma_off)
- hwif->ide_dma_off = &__ide_dma_off;
if (!hwif->ide_dma_off_quietly)
hwif->ide_dma_off_quietly = &__ide_dma_off_quietly;
if (!hwif->ide_dma_host_off)
if (test_and_clear_bit(PC_DMA_IN_PROGRESS, &pc->flags)) {
printk(KERN_ERR "ide-floppy: The floppy wants to issue "
"more interrupts in DMA mode\n");
- (void) HWIF(drive)->ide_dma_off(drive);
+ (void)__ide_dma_off(drive);
return ide_do_reset(drive);
}
bcount.all = min(pc->request_transfer, 63 * 1024);
if (test_and_clear_bit(PC_DMA_ERROR, &pc->flags)) {
- (void) HWIF(drive)->ide_dma_off(drive);
+ (void)__ide_dma_off(drive);
}
feature.all = 0;
if (drive->current_speed >= XFER_SW_DMA_0)
(void) HWIF(drive)->ide_dma_on(drive);
} else {
- (void) HWIF(drive)->ide_dma_off(drive);
+ (void)__ide_dma_off(drive);
}
}
printk(KERN_ERR "ide-tape: The tape wants to issue more "
"interrupts in DMA mode\n");
printk(KERN_ERR "ide-tape: DMA disabled, reverting to PIO\n");
- (void) HWIF(drive)->ide_dma_off(drive);
+ (void)__ide_dma_off(drive);
return ide_do_reset(drive);
}
/* Get the number of bytes to transfer on this interrupt. */
if (test_and_clear_bit(PC_DMA_ERROR, &pc->flags)) {
printk(KERN_WARNING "ide-tape: DMA disabled, "
"reverting to PIO\n");
- (void) HWIF(drive)->ide_dma_off(drive);
+ (void)__ide_dma_off(drive);
}
if (test_bit(PC_DMA_RECOMMENDED, &pc->flags) && drive->using_dma) {
if (test_bit(PC_WRITING, &pc->flags))
hwif->ide_dma_end = old_hwif.ide_dma_end;
hwif->ide_dma_check = old_hwif.ide_dma_check;
hwif->ide_dma_on = old_hwif.ide_dma_on;
- hwif->ide_dma_off = old_hwif.ide_dma_off;
hwif->ide_dma_off_quietly = old_hwif.ide_dma_off_quietly;
hwif->ide_dma_test_irq = old_hwif.ide_dma_test_irq;
hwif->ide_dma_host_on = old_hwif.ide_dma_host_on;
if (HWIF(drive)->ide_dma_check(drive)) return -EIO;
if (HWIF(drive)->ide_dma_on(drive)) return -EIO;
} else {
- if (HWIF(drive)->ide_dma_off(drive)) return -EIO;
+ if (__ide_dma_off(drive))
+ return -EIO;
}
return 0;
}
return HWIF(drive)->ide_dma_host_on(drive);
}
-static int
-sgiioc4_ide_dma_off(ide_drive_t * drive)
-{
- printk(KERN_INFO "%s: DMA disabled\n", drive->name);
-
- return HWIF(drive)->ide_dma_off_quietly(drive);
-}
-
static int
sgiioc4_ide_dma_off_quietly(ide_drive_t * drive)
{
hwif->ide_dma_end = &sgiioc4_ide_dma_end;
hwif->ide_dma_check = &sgiioc4_ide_dma_check;
hwif->ide_dma_on = &sgiioc4_ide_dma_on;
- hwif->ide_dma_off = &sgiioc4_ide_dma_off;
hwif->ide_dma_off_quietly = &sgiioc4_ide_dma_off_quietly;
hwif->ide_dma_test_irq = &sgiioc4_ide_dma_test_irq;
hwif->ide_dma_host_on = &sgiioc4_ide_dma_host_on;
return __ide_dma_on(drive);
}
-static int sl82c105_ide_dma_off (ide_drive_t *drive)
-{
- u8 speed = XFER_PIO_0;
- int rc;
-
- DBG(("sl82c105_ide_dma_off(drive:%s)\n", drive->name));
-
- rc = __ide_dma_off(drive);
- if (drive->pio_speed)
- speed = drive->pio_speed - XFER_PIO_0;
- config_for_pio(drive, speed, 0, 1);
- drive->current_speed = drive->pio_speed;
-
- return rc;
-}
-
static int sl82c105_ide_dma_off_quietly (ide_drive_t *drive)
{
u8 speed = XFER_PIO_0;
#ifdef CONFIG_BLK_DEV_IDEDMA
hwif->ide_dma_check = &sl82c105_check_drive;
hwif->ide_dma_on = &sl82c105_ide_dma_on;
- hwif->ide_dma_off = &sl82c105_ide_dma_off;
hwif->ide_dma_off_quietly = &sl82c105_ide_dma_off_quietly;
hwif->ide_dma_lostirq = &sl82c105_ide_dma_lost_irq;
hwif->ide_dma_begin = &sl82c105_ide_dma_begin;
pmif->dma_table_cpu, pmif->dma_table_dma);
return;
}
- hwif->ide_dma_off = &__ide_dma_off;
hwif->ide_dma_off_quietly = &__ide_dma_off_quietly;
hwif->ide_dma_on = &__ide_dma_on;
hwif->ide_dma_check = &pmac_ide_dma_check;
int (*ide_dma_end)(ide_drive_t *drive);
int (*ide_dma_check)(ide_drive_t *drive);
int (*ide_dma_on)(ide_drive_t *drive);
- int (*ide_dma_off)(ide_drive_t *drive);
int (*ide_dma_off_quietly)(ide_drive_t *drive);
int (*ide_dma_test_irq)(ide_drive_t *drive);
int (*ide_dma_host_on)(ide_drive_t *drive);
int (*ide_dma_end)(ide_drive_t *drive);
int (*ide_dma_check)(ide_drive_t *drive);
int (*ide_dma_on)(ide_drive_t *drive);
- int (*ide_dma_off)(ide_drive_t *drive);
int (*ide_dma_off_quietly)(ide_drive_t *drive);
int (*ide_dma_test_irq)(ide_drive_t *drive);
int (*ide_dma_host_on)(ide_drive_t *drive);
#ifdef CONFIG_BLK_DEV_IDEDMA
int __ide_dma_bad_drive(ide_drive_t *);
int __ide_dma_good_drive(ide_drive_t *);
+int __ide_dma_off(ide_drive_t *);
#ifdef CONFIG_BLK_DEV_IDEDMA_PCI
extern int ide_build_sglist(ide_drive_t *, struct request *);
extern int __ide_dma_host_off(ide_drive_t *);
extern int __ide_dma_off_quietly(ide_drive_t *);
-extern int __ide_dma_off(ide_drive_t *);
extern int __ide_dma_host_on(ide_drive_t *);
extern int __ide_dma_on(ide_drive_t *);
extern int __ide_dma_check(ide_drive_t *);