aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/arm/icside.c16
-rw-r--r--drivers/ide/ide-dma.c9
-rw-r--r--drivers/ide/mips/au1xxx-ide.c14
3 files changed, 7 insertions, 32 deletions
diff --git a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c
index 40ebe04f3995..76bdc9a27f6f 100644
--- a/drivers/ide/arm/icside.c
+++ b/drivers/ide/arm/icside.c
@@ -372,20 +372,6 @@ static int icside_dma_test_irq(ide_drive_t *drive)
372 ICS_ARCIN_V6_INTRSTAT_1)) & 1; 372 ICS_ARCIN_V6_INTRSTAT_1)) & 1;
373} 373}
374 374
375static void icside_dma_timeout(ide_drive_t *drive)
376{
377 ide_hwif_t *hwif = drive->hwif;
378
379 printk(KERN_ERR "%s: DMA timeout occurred: ", drive->name);
380
381 if (icside_dma_test_irq(drive))
382 return;
383
384 ide_dump_status(drive, "DMA timeout", hwif->tp_ops->read_status(hwif));
385
386 icside_dma_end(drive);
387}
388
389static int icside_dma_init(ide_hwif_t *hwif, const struct ide_port_info *d) 375static int icside_dma_init(ide_hwif_t *hwif, const struct ide_port_info *d)
390{ 376{
391 hwif->dmatable_cpu = NULL; 377 hwif->dmatable_cpu = NULL;
@@ -401,7 +387,7 @@ static const struct ide_dma_ops icside_v6_dma_ops = {
401 .dma_start = icside_dma_start, 387 .dma_start = icside_dma_start,
402 .dma_end = icside_dma_end, 388 .dma_end = icside_dma_end,
403 .dma_test_irq = icside_dma_test_irq, 389 .dma_test_irq = icside_dma_test_irq,
404 .dma_timeout = icside_dma_timeout, 390 .dma_timeout = ide_dma_timeout,
405 .dma_lost_irq = ide_dma_lost_irq, 391 .dma_lost_irq = ide_dma_lost_irq,
406}; 392};
407#else 393#else
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index 08cd878de50b..244b61b573ce 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -829,8 +829,7 @@ void ide_dma_lost_irq(ide_drive_t *drive)
829} 829}
830EXPORT_SYMBOL_GPL(ide_dma_lost_irq); 830EXPORT_SYMBOL_GPL(ide_dma_lost_irq);
831 831
832#ifdef CONFIG_BLK_DEV_IDEDMA_SFF 832void ide_dma_timeout(ide_drive_t *drive)
833void ide_dma_timeout (ide_drive_t *drive)
834{ 833{
835 ide_hwif_t *hwif = HWIF(drive); 834 ide_hwif_t *hwif = HWIF(drive);
836 835
@@ -839,11 +838,13 @@ void ide_dma_timeout (ide_drive_t *drive)
839 if (hwif->dma_ops->dma_test_irq(drive)) 838 if (hwif->dma_ops->dma_test_irq(drive))
840 return; 839 return;
841 840
841 ide_dump_status(drive, "DMA timeout", hwif->tp_ops->read_status(hwif));
842
842 hwif->dma_ops->dma_end(drive); 843 hwif->dma_ops->dma_end(drive);
843} 844}
845EXPORT_SYMBOL_GPL(ide_dma_timeout);
844 846
845EXPORT_SYMBOL(ide_dma_timeout); 847#ifdef CONFIG_BLK_DEV_IDEDMA_SFF
846
847void ide_release_dma_engine(ide_hwif_t *hwif) 848void ide_release_dma_engine(ide_hwif_t *hwif)
848{ 849{
849 if (hwif->dmatable_cpu) { 850 if (hwif->dmatable_cpu) {
diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c
index 92c90db4bb30..f9e88cfec827 100644
--- a/drivers/ide/mips/au1xxx-ide.c
+++ b/drivers/ide/mips/au1xxx-ide.c
@@ -366,18 +366,6 @@ static void auide_init_dbdma_dev(dbdev_tab_t *dev, u32 dev_id, u32 tsize, u32 de
366} 366}
367 367
368#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA 368#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
369static void auide_dma_timeout(ide_drive_t *drive)
370{
371 ide_hwif_t *hwif = HWIF(drive);
372
373 printk(KERN_ERR "%s: DMA timeout occurred: ", drive->name);
374
375 if (auide_dma_test_irq(drive))
376 return;
377
378 auide_dma_end(drive);
379}
380
381static const struct ide_dma_ops au1xxx_dma_ops = { 369static const struct ide_dma_ops au1xxx_dma_ops = {
382 .dma_host_set = auide_dma_host_set, 370 .dma_host_set = auide_dma_host_set,
383 .dma_setup = auide_dma_setup, 371 .dma_setup = auide_dma_setup,
@@ -386,7 +374,7 @@ static const struct ide_dma_ops au1xxx_dma_ops = {
386 .dma_end = auide_dma_end, 374 .dma_end = auide_dma_end,
387 .dma_test_irq = auide_dma_test_irq, 375 .dma_test_irq = auide_dma_test_irq,
388 .dma_lost_irq = ide_dma_lost_irq, 376 .dma_lost_irq = ide_dma_lost_irq,
389 .dma_timeout = auide_dma_timeout, 377 .dma_timeout = ide_dma_timeout,
390}; 378};
391 379
392static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d) 380static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d)