diff options
Diffstat (limited to 'drivers/ide/ide-dma.c')
-rw-r--r-- | drivers/ide/ide-dma.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 3dbf80c15491..dc5d9bc4ced0 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
@@ -460,7 +460,7 @@ 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 | void ide_dma_timeout(ide_drive_t *drive) | 463 | static void ide_dma_timeout(ide_drive_t *drive) |
464 | { | 464 | { |
465 | ide_hwif_t *hwif = drive->hwif; | 465 | ide_hwif_t *hwif = drive->hwif; |
466 | 466 | ||
@@ -473,7 +473,6 @@ void ide_dma_timeout(ide_drive_t *drive) | |||
473 | 473 | ||
474 | hwif->dma_ops->dma_end(drive); | 474 | hwif->dma_ops->dma_end(drive); |
475 | } | 475 | } |
476 | EXPORT_SYMBOL_GPL(ide_dma_timeout); | ||
477 | 476 | ||
478 | /* | 477 | /* |
479 | * un-busy the port etc, and clear any pending DMA status. we want to | 478 | * un-busy the port etc, and clear any pending DMA status. we want to |
@@ -483,6 +482,7 @@ EXPORT_SYMBOL_GPL(ide_dma_timeout); | |||
483 | ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error) | 482 | ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error) |
484 | { | 483 | { |
485 | ide_hwif_t *hwif = drive->hwif; | 484 | ide_hwif_t *hwif = drive->hwif; |
485 | const struct ide_dma_ops *dma_ops = hwif->dma_ops; | ||
486 | struct request *rq; | 486 | struct request *rq; |
487 | ide_startstop_t ret = ide_stopped; | 487 | ide_startstop_t ret = ide_stopped; |
488 | 488 | ||
@@ -492,12 +492,14 @@ ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error) | |||
492 | 492 | ||
493 | if (error < 0) { | 493 | if (error < 0) { |
494 | printk(KERN_WARNING "%s: DMA timeout error\n", drive->name); | 494 | printk(KERN_WARNING "%s: DMA timeout error\n", drive->name); |
495 | (void)hwif->dma_ops->dma_end(drive); | 495 | (void)dma_ops->dma_end(drive); |
496 | ret = ide_error(drive, "dma timeout error", | 496 | ret = ide_error(drive, "dma timeout error", |
497 | hwif->tp_ops->read_status(hwif)); | 497 | hwif->tp_ops->read_status(hwif)); |
498 | } else { | 498 | } else { |
499 | printk(KERN_WARNING "%s: DMA timeout retry\n", drive->name); | 499 | printk(KERN_WARNING "%s: DMA timeout retry\n", drive->name); |
500 | hwif->dma_ops->dma_timeout(drive); | 500 | if (dma_ops->dma_clear) |
501 | dma_ops->dma_clear(drive); | ||
502 | ide_dma_timeout(drive); | ||
501 | } | 503 | } |
502 | 504 | ||
503 | /* | 505 | /* |