Commit 7469aaf6 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz
Browse files

ide: make ide_hwif_t.ide_dma_{host_off,off_quietly} void (v2)



* since ide_hwif_t.ide_dma_{host_off,off_quietly} always return '0'
  make these functions void and while at it drop "ide_" prefix
* fix comment for __ide_dma_off_quietly()
* make __ide_dma_{host_off,off_quietly,off}() void and drop "__" prefix

v2:
* while at it rename atiixp_ide_dma_host_off() to atiixp_dma_host_off(),
  sgiioc4_ide_dma_{host_off,off_quietly}() to sgiioc4_dma_{host_off,off_quietly}()
  and sl82c105_ide_dma_off_quietly() to sl82c105_dma_off_quietly()
  [ Noticed by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 3608b5d7
...@@ -307,15 +307,13 @@ static int icside_set_speed(ide_drive_t *drive, u8 xfer_mode) ...@@ -307,15 +307,13 @@ static int icside_set_speed(ide_drive_t *drive, u8 xfer_mode)
return on; return on;
} }
static int icside_dma_host_off(ide_drive_t *drive) static void icside_dma_host_off(ide_drive_t *drive)
{ {
return 0;
} }
static int icside_dma_off_quietly(ide_drive_t *drive) static void icside_dma_off_quietly(ide_drive_t *drive)
{ {
drive->using_dma = 0; drive->using_dma = 0;
return icside_dma_host_off(drive);
} }
static int icside_dma_host_on(ide_drive_t *drive) static int icside_dma_host_on(ide_drive_t *drive)
...@@ -494,8 +492,8 @@ static void icside_dma_init(ide_hwif_t *hwif) ...@@ -494,8 +492,8 @@ static void icside_dma_init(ide_hwif_t *hwif)
hwif->autodma = autodma; hwif->autodma = autodma;
hwif->ide_dma_check = icside_dma_check; hwif->ide_dma_check = icside_dma_check;
hwif->ide_dma_host_off = icside_dma_host_off; hwif->dma_host_off = icside_dma_host_off;
hwif->ide_dma_off_quietly = icside_dma_off_quietly; hwif->dma_off_quietly = icside_dma_off_quietly;
hwif->ide_dma_host_on = icside_dma_host_on; hwif->ide_dma_host_on = icside_dma_host_on;
hwif->ide_dma_on = icside_dma_on; hwif->ide_dma_on = icside_dma_on;
hwif->dma_setup = icside_dma_setup; hwif->dma_setup = icside_dma_setup;
......
...@@ -682,9 +682,12 @@ static void cris_ide_input_data (ide_drive_t *drive, void *, unsigned int); ...@@ -682,9 +682,12 @@ static void cris_ide_input_data (ide_drive_t *drive, void *, unsigned int);
static void cris_ide_output_data (ide_drive_t *drive, void *, unsigned int); static void cris_ide_output_data (ide_drive_t *drive, void *, unsigned int);
static void cris_atapi_input_bytes(ide_drive_t *drive, void *, unsigned int); static void cris_atapi_input_bytes(ide_drive_t *drive, void *, unsigned int);
static void cris_atapi_output_bytes(ide_drive_t *drive, void *, unsigned int); static void cris_atapi_output_bytes(ide_drive_t *drive, void *, unsigned int);
static int cris_dma_off (ide_drive_t *drive);
static int cris_dma_on (ide_drive_t *drive); static int cris_dma_on (ide_drive_t *drive);
static void cris_dma_off(ide_drive_t *drive)
{
}
static void tune_cris_ide(ide_drive_t *drive, u8 pio) static void tune_cris_ide(ide_drive_t *drive, u8 pio)
{ {
int setup, strobe, hold; int setup, strobe, hold;
...@@ -814,9 +817,9 @@ init_e100_ide (void) ...@@ -814,9 +817,9 @@ init_e100_ide (void)
hwif->OUTBSYNC = &cris_ide_outbsync; hwif->OUTBSYNC = &cris_ide_outbsync;
hwif->INB = &cris_ide_inb; hwif->INB = &cris_ide_inb;
hwif->INW = &cris_ide_inw; hwif->INW = &cris_ide_inw;
hwif->ide_dma_host_off = &cris_dma_off; hwif->dma_host_off = &cris_dma_off;
hwif->ide_dma_host_on = &cris_dma_on; hwif->ide_dma_host_on = &cris_dma_on;
hwif->ide_dma_off_quietly = &cris_dma_off; hwif->dma_off_quietly = &cris_dma_off;
hwif->udma_four = 0; hwif->udma_four = 0;
hwif->ultra_mask = cris_ultra_mask; hwif->ultra_mask = cris_ultra_mask;
hwif->mwdma_mask = 0x07; /* Multiword DMA 0-2 */ hwif->mwdma_mask = 0x07; /* Multiword DMA 0-2 */
...@@ -838,11 +841,6 @@ init_e100_ide (void) ...@@ -838,11 +841,6 @@ init_e100_ide (void)
cris_ide_set_speed(TYPE_UDMA, ATA_UDMA2_CYC, ATA_UDMA2_DVS, 0); cris_ide_set_speed(TYPE_UDMA, ATA_UDMA2_CYC, ATA_UDMA2_DVS, 0);
} }
static int cris_dma_off (ide_drive_t *drive)
{
return 0;
}
static int cris_dma_on (ide_drive_t *drive) static int cris_dma_on (ide_drive_t *drive)
{ {
return 0; return 0;
......
...@@ -1104,7 +1104,7 @@ static ide_startstop_t cdrom_read_intr (ide_drive_t *drive) ...@@ -1104,7 +1104,7 @@ static ide_startstop_t cdrom_read_intr (ide_drive_t *drive)
if (dma) { if (dma) {
info->dma = 0; info->dma = 0;
if ((dma_error = HWIF(drive)->ide_dma_end(drive))) if ((dma_error = HWIF(drive)->ide_dma_end(drive)))
__ide_dma_off(drive); ide_dma_off(drive);
} }
if (cdrom_decode_status(drive, 0, &stat)) if (cdrom_decode_status(drive, 0, &stat))
...@@ -1700,7 +1700,7 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) ...@@ -1700,7 +1700,7 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
if (dma) { if (dma) {
if (dma_error) { if (dma_error) {
printk(KERN_ERR "ide-cd: dma error\n"); printk(KERN_ERR "ide-cd: dma error\n");
__ide_dma_off(drive); ide_dma_off(drive);
return ide_error(drive, "dma error", stat); return ide_error(drive, "dma error", stat);
} }
...@@ -1826,7 +1826,7 @@ static ide_startstop_t cdrom_write_intr(ide_drive_t *drive) ...@@ -1826,7 +1826,7 @@ static ide_startstop_t cdrom_write_intr(ide_drive_t *drive)
info->dma = 0; info->dma = 0;
if ((dma_error = HWIF(drive)->ide_dma_end(drive))) { if ((dma_error = HWIF(drive)->ide_dma_end(drive))) {
printk(KERN_ERR "ide-cd: write dma error\n"); printk(KERN_ERR "ide-cd: write dma error\n");
__ide_dma_off(drive); ide_dma_off(drive);
} }
} }
......
...@@ -414,61 +414,57 @@ static int dma_timer_expiry (ide_drive_t *drive) ...@@ -414,61 +414,57 @@ static int dma_timer_expiry (ide_drive_t *drive)
} }
/** /**
* __ide_dma_host_off - Generic DMA kill * ide_dma_host_off - Generic DMA kill
* @drive: drive to control * @drive: drive to control
* *
* Perform the generic IDE controller DMA off operation. This * Perform the generic IDE controller DMA off operation. This
* works for most IDE bus mastering controllers * works for most IDE bus mastering controllers
*/ */
int __ide_dma_host_off (ide_drive_t *drive) void ide_dma_host_off(ide_drive_t *drive)
{ {
ide_hwif_t *hwif = HWIF(drive); ide_hwif_t *hwif = HWIF(drive);
u8 unit = (drive->select.b.unit & 0x01); u8 unit = (drive->select.b.unit & 0x01);
u8 dma_stat = hwif->INB(hwif->dma_status); u8 dma_stat = hwif->INB(hwif->dma_status);
hwif->OUTB((dma_stat & ~(1<<(5+unit))), hwif->dma_status); hwif->OUTB((dma_stat & ~(1<<(5+unit))), hwif->dma_status);
return 0;
} }
EXPORT_SYMBOL(__ide_dma_host_off); EXPORT_SYMBOL(ide_dma_host_off);
/** /**
* __ide_dma_host_off_quietly - Generic DMA kill * ide_dma_off_quietly - Generic DMA kill
* @drive: drive to control * @drive: drive to control
* *
* Turn off the current DMA on this IDE controller. * Turn off the current DMA on this IDE controller.
*/ */
int __ide_dma_off_quietly (ide_drive_t *drive) void ide_dma_off_quietly(ide_drive_t *drive)
{ {
drive->using_dma = 0; drive->using_dma = 0;
ide_toggle_bounce(drive, 0); ide_toggle_bounce(drive, 0);
if (HWIF(drive)->ide_dma_host_off(drive)) drive->hwif->dma_host_off(drive);
return 1;
return 0;
} }
EXPORT_SYMBOL(__ide_dma_off_quietly); EXPORT_SYMBOL(ide_dma_off_quietly);
#endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */
/** /**
* __ide_dma_off - disable DMA on a device * ide_dma_off - disable DMA on a device
* @drive: drive to disable DMA on * @drive: drive to disable DMA on
* *
* Disable IDE DMA for a device on this IDE controller. * Disable IDE DMA for a device on this IDE controller.
* Inform the user that DMA has been disabled. * Inform the user that DMA has been disabled.
*/ */
int __ide_dma_off (ide_drive_t *drive) void ide_dma_off(ide_drive_t *drive)
{ {
printk(KERN_INFO "%s: DMA disabled\n", drive->name); printk(KERN_INFO "%s: DMA disabled\n", drive->name);
return HWIF(drive)->ide_dma_off_quietly(drive); drive->hwif->dma_off_quietly(drive);
} }
EXPORT_SYMBOL(__ide_dma_off); EXPORT_SYMBOL(ide_dma_off);
#ifdef CONFIG_BLK_DEV_IDEDMA_PCI #ifdef CONFIG_BLK_DEV_IDEDMA_PCI
/** /**
...@@ -758,7 +754,7 @@ void ide_dma_verbose(ide_drive_t *drive) ...@@ -758,7 +754,7 @@ void ide_dma_verbose(ide_drive_t *drive)
return; return;
bug_dma_off: bug_dma_off:
printk(", BUG DMA OFF"); printk(", BUG DMA OFF");
hwif->ide_dma_off_quietly(drive); hwif->dma_off_quietly(drive);
return; return;
} }
...@@ -773,7 +769,8 @@ int ide_set_dma(ide_drive_t *drive) ...@@ -773,7 +769,8 @@ int ide_set_dma(ide_drive_t *drive)
switch(rc) { switch(rc) {
case -1: /* DMA needs to be disabled */ case -1: /* DMA needs to be disabled */
return hwif->ide_dma_off_quietly(drive); hwif->dma_off_quietly(drive);
return 0;
case 0: /* DMA needs to be enabled */ case 0: /* DMA needs to be enabled */
return hwif->ide_dma_on(drive); return hwif->ide_dma_on(drive);
case 1: /* DMA setting cannot be changed */ case 1: /* DMA setting cannot be changed */
...@@ -937,10 +934,10 @@ void ide_setup_dma (ide_hwif_t *hwif, unsigned long dma_base, unsigned int num_p ...@@ -937,10 +934,10 @@ void ide_setup_dma (ide_hwif_t *hwif, unsigned long dma_base, unsigned int num_p
if (!(hwif->dma_prdtable)) if (!(hwif->dma_prdtable))
hwif->dma_prdtable = (hwif->dma_base + 4); hwif->dma_prdtable = (hwif->dma_base + 4);
if (!hwif->ide_dma_off_quietly) if (!hwif->dma_off_quietly)
hwif->ide_dma_off_quietly = &__ide_dma_off_quietly; hwif->dma_off_quietly = &ide_dma_off_quietly;
if (!hwif->ide_dma_host_off) if (!hwif->dma_host_off)
hwif->ide_dma_host_off = &__ide_dma_host_off; hwif->dma_host_off = &ide_dma_host_off;
if (!hwif->ide_dma_on) if (!hwif->ide_dma_on)
hwif->ide_dma_on = &__ide_dma_on; hwif->ide_dma_on = &__ide_dma_on;
if (!hwif->ide_dma_host_on) if (!hwif->ide_dma_host_on)
......
...@@ -867,7 +867,7 @@ static ide_startstop_t idefloppy_pc_intr (ide_drive_t *drive) ...@@ -867,7 +867,7 @@ static ide_startstop_t idefloppy_pc_intr (ide_drive_t *drive)
if (test_and_clear_bit(PC_DMA_IN_PROGRESS, &pc->flags)) { if (test_and_clear_bit(PC_DMA_IN_PROGRESS, &pc->flags)) {
printk(KERN_ERR "ide-floppy: The floppy wants to issue " printk(KERN_ERR "ide-floppy: The floppy wants to issue "
"more interrupts in DMA mode\n"); "more interrupts in DMA mode\n");
(void)__ide_dma_off(drive); ide_dma_off(drive);
return ide_do_reset(drive); return ide_do_reset(drive);
} }
...@@ -1097,9 +1097,9 @@ static ide_startstop_t idefloppy_issue_pc (ide_drive_t *drive, idefloppy_pc_t *p ...@@ -1097,9 +1097,9 @@ static ide_startstop_t idefloppy_issue_pc (ide_drive_t *drive, idefloppy_pc_t *p
pc->current_position = pc->buffer; pc->current_position = pc->buffer;
bcount.all = min(pc->request_transfer, 63 * 1024); bcount.all = min(pc->request_transfer, 63 * 1024);
if (test_and_clear_bit(PC_DMA_ERROR, &pc->flags)) { if (test_and_clear_bit(PC_DMA_ERROR, &pc->flags))
(void)__ide_dma_off(drive); ide_dma_off(drive);
}
feature.all = 0; feature.all = 0;
if (test_bit(PC_DMA_RECOMMENDED, &pc->flags) && drive->using_dma) if (test_bit(PC_DMA_RECOMMENDED, &pc->flags) && drive->using_dma)
......
...@@ -1351,7 +1351,7 @@ static ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error) ...@@ -1351,7 +1351,7 @@ static ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error)
*/ */
drive->retry_pio++; drive->retry_pio++;
drive->state = DMA_PIO_RETRY; drive->state = DMA_PIO_RETRY;
(void) hwif->ide_dma_off_quietly(drive); hwif->dma_off_quietly(drive);
/* /*
* un-busy drive etc (hwgroup->busy is cleared on return) and * un-busy drive etc (hwgroup->busy is cleared on return) and
......
...@@ -753,7 +753,7 @@ int ide_config_drive_speed (ide_drive_t *drive, u8 speed) ...@@ -753,7 +753,7 @@ int ide_config_drive_speed (ide_drive_t *drive, u8 speed)
#ifdef CONFIG_BLK_DEV_IDEDMA #ifdef CONFIG_BLK_DEV_IDEDMA
if (hwif->ide_dma_check) /* check if host supports DMA */ if (hwif->ide_dma_check) /* check if host supports DMA */
hwif->ide_dma_host_off(drive); hwif->dma_host_off(drive);
#endif #endif
/* /*
...@@ -832,7 +832,7 @@ int ide_config_drive_speed (ide_drive_t *drive, u8 speed) ...@@ -832,7 +832,7 @@ int ide_config_drive_speed (ide_drive_t *drive, u8 speed)
if (speed >= XFER_SW_DMA_0) if (speed >= XFER_SW_DMA_0)
hwif->ide_dma_host_on(drive); hwif->ide_dma_host_on(drive);
else if (hwif->ide_dma_check) /* check if host supports DMA */ else if (hwif->ide_dma_check) /* check if host supports DMA */
hwif->ide_dma_off_quietly(drive); hwif->dma_off_quietly(drive);
#endif #endif
switch(speed) { switch(speed) {
...@@ -1042,12 +1042,12 @@ static void check_dma_crc(ide_drive_t *drive) ...@@ -1042,12 +1042,12 @@ static void check_dma_crc(ide_drive_t *drive)
{ {
#ifdef CONFIG_BLK_DEV_IDEDMA #ifdef CONFIG_BLK_DEV_IDEDMA
if (drive->crc_count) { if (drive->crc_count) {
(void) HWIF(drive)->ide_dma_off_quietly(drive); drive->hwif->dma_off_quietly(drive);
ide_set_xfer_rate(drive, ide_auto_reduce_xfer(drive)); ide_set_xfer_rate(drive, ide_auto_reduce_xfer(drive));
if (drive->current_speed >= XFER_SW_DMA_0) if (drive->current_speed >= XFER_SW_DMA_0)
(void) HWIF(drive)->ide_dma_on(drive); (void) HWIF(drive)->ide_dma_on(drive);
} else } else
(void)__ide_dma_off(drive); ide_dma_off(drive);
#endif #endif
} }
......
...@@ -853,7 +853,7 @@ static void probe_hwif(ide_hwif_t *hwif) ...@@ -853,7 +853,7 @@ static void probe_hwif(ide_hwif_t *hwif)
* things, if not checked and cleared. * things, if not checked and cleared.
* PARANOIA!!! * PARANOIA!!!
*/ */
hwif->ide_dma_off_quietly(drive); hwif->dma_off_quietly(drive);
#ifdef CONFIG_IDEDMA_ONLYDISK #ifdef CONFIG_IDEDMA_ONLYDISK
if (drive->media == ide_disk) if (drive->media == ide_disk)
#endif #endif
......
...@@ -1970,7 +1970,7 @@ static ide_startstop_t idetape_pc_intr (ide_drive_t *drive) ...@@ -1970,7 +1970,7 @@ static ide_startstop_t idetape_pc_intr (ide_drive_t *drive)
printk(KERN_ERR "ide-tape: The tape wants to issue more " printk(KERN_ERR "ide-tape: The tape wants to issue more "
"interrupts in DMA mode\n"); "interrupts in DMA mode\n");
printk(KERN_ERR "ide-tape: DMA disabled, reverting to PIO\n"); printk(KERN_ERR "ide-tape: DMA disabled, reverting to PIO\n");
(void)__ide_dma_off(drive); ide_dma_off(drive);
return ide_do_reset(drive); return ide_do_reset(drive);
} }
/* Get the number of bytes to transfer on this interrupt. */ /* Get the number of bytes to transfer on this interrupt. */
...@@ -2176,7 +2176,7 @@ static ide_startstop_t idetape_issue_packet_command (ide_drive_t *drive, idetape ...@@ -2176,7 +2176,7 @@ static ide_startstop_t idetape_issue_packet_command (ide_drive_t *drive, idetape
if (test_and_clear_bit(PC_DMA_ERROR, &pc->flags)) { if (test_and_clear_bit(PC_DMA_ERROR, &pc->flags)) {
printk(KERN_WARNING "ide-tape: DMA disabled, " printk(KERN_WARNING "ide-tape: DMA disabled, "
"reverting to PIO\n"); "reverting to PIO\n");
(void)__ide_dma_off(drive); ide_dma_off(drive);
} }
if (test_bit(PC_DMA_RECOMMENDED, &pc->flags) && drive->using_dma) if (test_bit(PC_DMA_RECOMMENDED, &pc->flags) && drive->using_dma)
dma_ok = !hwif->dma_setup(drive); dma_ok = !hwif->dma_setup(drive);
......
...@@ -506,11 +506,11 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif) ...@@ -506,11 +506,11 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif)
hwif->ide_dma_end = tmp_hwif->ide_dma_end; hwif->ide_dma_end = tmp_hwif->ide_dma_end;
hwif->ide_dma_check = tmp_hwif->ide_dma_check; hwif->ide_dma_check = tmp_hwif->ide_dma_check;
hwif->ide_dma_on = tmp_hwif->ide_dma_on; hwif->ide_dma_on = tmp_hwif->ide_dma_on;
hwif->ide_dma_off_quietly = tmp_hwif->ide_dma_off_quietly; hwif->dma_off_quietly = tmp_hwif->dma_off_quietly;
hwif->ide_dma_test_irq = tmp_hwif->ide_dma_test_irq; hwif->ide_dma_test_irq = tmp_hwif->ide_dma_test_irq;
hwif->ide_dma_clear_irq = tmp_hwif->ide_dma_clear_irq; hwif->ide_dma_clear_irq = tmp_hwif->ide_dma_clear_irq;
hwif->ide_dma_host_on = tmp_hwif->ide_dma_host_on; hwif->ide_dma_host_on = tmp_hwif->ide_dma_host_on;
hwif->ide_dma_host_off = tmp_hwif->ide_dma_host_off; hwif->dma_host_off = tmp_hwif->dma_host_off;
hwif->ide_dma_lostirq = tmp_hwif->ide_dma_lostirq; hwif->ide_dma_lostirq = tmp_hwif->ide_dma_lostirq;
hwif->ide_dma_timeout = tmp_hwif->ide_dma_timeout; hwif->ide_dma_timeout = tmp_hwif->ide_dma_timeout;
...@@ -1138,10 +1138,8 @@ static int set_using_dma (ide_drive_t *drive, int arg) ...@@ -1138,10 +1138,8 @@ static int set_using_dma (ide_drive_t *drive, int arg)
if (ide_set_dma(drive)) if (ide_set_dma(drive))
return -EIO; return -EIO;
if (HWIF(drive)->ide_dma_on(drive)) return -EIO; if (HWIF(drive)->ide_dma_on(drive)) return -EIO;
} else { } else
if (__ide_dma_off(drive)) ide_dma_off(drive);
return -EIO;
}
return 0; return 0;
#else #else
return -EPERM; return -EPERM;
......
...@@ -449,16 +449,13 @@ static int auide_dma_on(ide_drive_t *drive) ...@@ -449,16 +449,13 @@ static int auide_dma_on(ide_drive_t *drive)
return auide_dma_host_on(drive); return auide_dma_host_on(drive);
} }
static void auide_dma_host_off(ide_drive_t *drive)
static int auide_dma_host_off(ide_drive_t *drive)
{ {
return 0;
} }
static int auide_dma_off_quietly(ide_drive_t *drive) static void auide_dma_off_quietly(ide_drive_t *drive)
{ {
drive->using_dma = 0; drive->using_dma = 0;
return auide_dma_host_off(drive);
} }
static int auide_dma_lostirq(ide_drive_t *drive) static int auide_dma_lostirq(ide_drive_t *drive)
...@@ -724,7 +721,7 @@ static int au_ide_probe(struct device *dev) ...@@ -724,7 +721,7 @@ static int au_ide_probe(struct device *dev)
hwif->speedproc = &auide_tune_chipset; hwif->speedproc = &auide_tune_chipset;
#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
hwif->ide_dma_off_quietly = &auide_dma_off_quietly; hwif->dma_off_quietly = &auide_dma_off_quietly;
hwif->ide_dma_timeout = &auide_dma_timeout; hwif->ide_dma_timeout = &auide_dma_timeout;
hwif->ide_dma_check = &auide_dma_check; hwif->ide_dma_check = &auide_dma_check;
...@@ -733,7 +730,7 @@ static int au_ide_probe(struct device *dev) ...@@ -733,7 +730,7 @@ static int au_ide_probe(struct device *dev)
hwif->ide_dma_end = &auide_dma_end; hwif->ide_dma_end = &auide_dma_end;
hwif->dma_setup = &auide_dma_setup; hwif->dma_setup = &auide_dma_setup;
hwif->ide_dma_test_irq = &auide_dma_test_irq; hwif->ide_dma_test_irq = &auide_dma_test_irq;
hwif->ide_dma_host_off = &auide_dma_host_off; hwif->dma_host_off = &auide_dma_host_off;
hwif->ide_dma_host_on = &auide_dma_host_on; hwif->ide_dma_host_on = &auide_dma_host_on;
hwif->ide_dma_lostirq = &auide_dma_lostirq; hwif->ide_dma_lostirq = &auide_dma_lostirq;
hwif->ide_dma_on = &auide_dma_on; hwif->ide_dma_on = &auide_dma_on;
......
...@@ -121,7 +121,7 @@ static int atiixp_ide_dma_host_on(ide_drive_t *drive) ...@@ -121,7 +121,7 @@ static int atiixp_ide_dma_host_on(ide_drive_t *drive)
return __ide_dma_host_on(drive); return __ide_dma_host_on(drive);
} }
static int atiixp_ide_dma_host_off(ide_drive_t *drive) static void atiixp_dma_host_off(ide_drive_t *drive)
{ {
struct pci_dev *dev = drive->hwif->pci_dev; struct pci_dev *dev = drive->hwif->pci_dev;
unsigned long flags; unsigned long flags;
...@@ -135,7 +135,7 @@ static int atiixp_ide_dma_host_off(ide_drive_t *drive) ...@@ -135,7 +135,7 @@ static int atiixp_ide_dma_host_off(ide_drive_t *drive)
spin_unlock_irqrestore(&atiixp_lock, flags); spin_unlock_irqrestore(&atiixp_lock, flags);
return __ide_dma_host_off(drive); ide_dma_host_off(drive);
} }
/** /**
...@@ -306,7 +306,7 @@ static void __devinit init_hwif_atiixp(ide_hwif_t *hwif) ...@@ -306,7 +306,7 @@ static void __devinit init_hwif_atiixp(ide_hwif_t *hwif)
hwif->udma_four = 0; hwif->udma_four = 0;
hwif->ide_dma_host_on = &atiixp_ide_dma_host_on; hwif->ide_dma_host_on = &atiixp_ide_dma_host_on;
hwif->ide_dma_host_off = &atiixp_ide_dma_host_off; hwif->dma_host_off = &atiixp_dma_host_off;
hwif->ide_dma_check = &atiixp_dma_check; hwif->ide_dma_check = &atiixp_dma_check;
if (!noautodma) if (!noautodma)
hwif->autodma = 1; hwif->autodma = 1;
......
...@@ -109,7 +109,7 @@ static int cs5530_config_dma (ide_drive_t *drive) ...@@ -109,7 +109,7 @@ static int cs5530_config_dma (ide_drive_t *drive)
/* /*
* Default to DMA-off in case we run into trouble here. * Default to DMA-off in case we run into trouble here.
*/ */
hwif->ide_dma_off_quietly(drive); hwif->dma_off_quietly(drive);
/* /*
* The CS5530 specifies that two drives sharing a cable cannot * The CS5530 specifies that two drives sharing a cable cannot
......
...@@ -606,7 +606,7 @@ static void __devinit it821x_fixups(ide_hwif_t *hwif) ...@@ -606,7 +606,7 @@ static void __devinit it821x_fixups(ide_hwif_t *hwif)
printk(".\n"); printk(".\n");
/* Now the core code will have wrongly decided no DMA /* Now the core code will have wrongly decided no DMA
so we need to fix this */ so we need to fix this */
hwif->ide_dma_off_quietly(drive); hwif->dma_off_quietly(drive);
#ifdef CONFIG_IDEDMA_ONLYDISK #ifdef CONFIG_IDEDMA_ONLYDISK
if (drive->media == ide_disk) if (drive->media == ide_disk)
#endif #endif
......
...@@ -161,7 +161,7 @@ static int sc1200_config_dma2 (ide_drive_t *drive, int mode) ...@@ -161,7 +161,7 @@ static int sc1200_config_dma2 (ide_drive_t *drive, int mode)
/* /*
* Default to DMA-off in case we run into trouble here. * Default to DMA-off in case we run into trouble here.
*/ */
hwif->ide_dma_off_quietly(drive); /* turn off DMA while we fiddle */ hwif->dma_off_quietly(drive); /* turn off DMA while we fiddle */
outb(inb(hwif->dma_base+2)&~(unit?0x40:0x20), hwif->dma_base+2); /* clear DMA_capable bit */ outb(inb(hwif->dma_base+2)&~(unit?0x40:0x20), hwif->dma_base+2); /* clear DMA_capable bit */