diff options
-rw-r--r-- | drivers/ide/arm/icside.c | 16 | ||||
-rw-r--r-- | drivers/ide/ide-dma.c | 9 | ||||
-rw-r--r-- | drivers/ide/mips/au1xxx-ide.c | 14 | ||||
-rw-r--r-- | include/linux/ide.h | 2 |
4 files changed, 8 insertions, 33 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 | ||
375 | static 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 | |||
389 | static int icside_dma_init(ide_hwif_t *hwif, const struct ide_port_info *d) | 375 | static 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 | } |
830 | EXPORT_SYMBOL_GPL(ide_dma_lost_irq); | 830 | EXPORT_SYMBOL_GPL(ide_dma_lost_irq); |
831 | 831 | ||
832 | #ifdef CONFIG_BLK_DEV_IDEDMA_SFF | 832 | void ide_dma_timeout(ide_drive_t *drive) |
833 | void 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 | } |
845 | EXPORT_SYMBOL_GPL(ide_dma_timeout); | ||
844 | 846 | ||
845 | EXPORT_SYMBOL(ide_dma_timeout); | 847 | #ifdef CONFIG_BLK_DEV_IDEDMA_SFF |
846 | |||
847 | void ide_release_dma_engine(ide_hwif_t *hwif) | 848 | void 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 |
369 | static 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 | |||
381 | static const struct ide_dma_ops au1xxx_dma_ops = { | 369 | static 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 | ||
392 | static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d) | 380 | static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d) |
diff --git a/include/linux/ide.h b/include/linux/ide.h index ae4a25d2b066..39aaff8ff457 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1437,11 +1437,11 @@ void ide_dma_exec_cmd(ide_drive_t *, u8); | |||
1437 | extern void ide_dma_start(ide_drive_t *); | 1437 | extern void ide_dma_start(ide_drive_t *); |
1438 | int ide_dma_end(ide_drive_t *); | 1438 | int ide_dma_end(ide_drive_t *); |
1439 | int ide_dma_test_irq(ide_drive_t *); | 1439 | int ide_dma_test_irq(ide_drive_t *); |
1440 | extern void ide_dma_timeout(ide_drive_t *); | ||
1441 | extern const struct ide_dma_ops sff_dma_ops; | 1440 | extern const struct ide_dma_ops sff_dma_ops; |
1442 | #endif /* CONFIG_BLK_DEV_IDEDMA_SFF */ | 1441 | #endif /* CONFIG_BLK_DEV_IDEDMA_SFF */ |
1443 | 1442 | ||
1444 | void ide_dma_lost_irq(ide_drive_t *); | 1443 | void ide_dma_lost_irq(ide_drive_t *); |
1444 | void ide_dma_timeout(ide_drive_t *); | ||
1445 | 1445 | ||
1446 | #else | 1446 | #else |
1447 | static inline int ide_id_dma_bug(ide_drive_t *drive) { return 0; } | 1447 | static inline int ide_id_dma_bug(ide_drive_t *drive) { return 0; } |