diff options
-rw-r--r-- | drivers/ide/ide-dma.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index dc5d9bc4ced0..4e2005071113 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
@@ -460,20 +460,6 @@ void ide_dma_lost_irq(ide_drive_t *drive) | |||
460 | } | 460 | } |
461 | EXPORT_SYMBOL_GPL(ide_dma_lost_irq); | 461 | EXPORT_SYMBOL_GPL(ide_dma_lost_irq); |
462 | 462 | ||
463 | static void ide_dma_timeout(ide_drive_t *drive) | ||
464 | { | ||
465 | ide_hwif_t *hwif = drive->hwif; | ||
466 | |||
467 | printk(KERN_ERR "%s: timeout waiting for DMA\n", drive->name); | ||
468 | |||
469 | if (hwif->dma_ops->dma_test_irq(drive)) | ||
470 | return; | ||
471 | |||
472 | ide_dump_status(drive, "DMA timeout", hwif->tp_ops->read_status(hwif)); | ||
473 | |||
474 | hwif->dma_ops->dma_end(drive); | ||
475 | } | ||
476 | |||
477 | /* | 463 | /* |
478 | * un-busy the port etc, and clear any pending DMA status. we want to | 464 | * un-busy the port etc, and clear any pending DMA status. we want to |
479 | * retry the current request in pio mode instead of risking tossing it | 465 | * retry the current request in pio mode instead of risking tossing it |
@@ -499,7 +485,12 @@ ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error) | |||
499 | printk(KERN_WARNING "%s: DMA timeout retry\n", drive->name); | 485 | printk(KERN_WARNING "%s: DMA timeout retry\n", drive->name); |
500 | if (dma_ops->dma_clear) | 486 | if (dma_ops->dma_clear) |
501 | dma_ops->dma_clear(drive); | 487 | dma_ops->dma_clear(drive); |
502 | ide_dma_timeout(drive); | 488 | printk(KERN_ERR "%s: timeout waiting for DMA\n", drive->name); |
489 | if (dma_ops->dma_test_irq(drive) == 0) { | ||
490 | ide_dump_status(drive, "DMA timeout", | ||
491 | hwif->tp_ops->read_status(hwif)); | ||
492 | (void)dma_ops->dma_end(drive); | ||
493 | } | ||
503 | } | 494 | } |
504 | 495 | ||
505 | /* | 496 | /* |