summaryrefslogtreecommitdiff
path: root/drivers/ide/ide-dma.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-31 22:15:19 +0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-31 22:15:19 +0400
commit1cee52de28aa687760ad262ad0834d1bf6c6d2ac (patch)
treed647ae2ddae0513fbe6c4393a3d05a1bd8806852 /drivers/ide/ide-dma.c
parent35c9b4daf4c94b30e5cede597d98016ebf31b5ad (diff)
downloadlinux-1cee52de28aa687760ad262ad0834d1bf6c6d2ac.tar.xz
ide: inline ide_dma_timeout() into ide_dma_timeout_retry()
Since ide_dma_timeout() is only used by ide_dma_timeout_retry() inline it there. There should be no functional changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-dma.c')
-rw-r--r--drivers/ide/ide-dma.c21
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)
}
EXPORT_SYMBOL_GPL(ide_dma_lost_irq);
-static void ide_dma_timeout(ide_drive_t *drive)
-{
- ide_hwif_t *hwif = drive->hwif;
-
- printk(KERN_ERR "%s: timeout waiting for DMA\n", drive->name);
-
- if (hwif->dma_ops->dma_test_irq(drive))
- return;
-
- ide_dump_status(drive, "DMA timeout", hwif->tp_ops->read_status(hwif));
-
- hwif->dma_ops->dma_end(drive);
-}
-
/*
* un-busy the port etc, and clear any pending DMA status. we want to
* 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)
printk(KERN_WARNING "%s: DMA timeout retry\n", drive->name);
if (dma_ops->dma_clear)
dma_ops->dma_clear(drive);
- ide_dma_timeout(drive);
+ printk(KERN_ERR "%s: timeout waiting for DMA\n", drive->name);
+ if (dma_ops->dma_test_irq(drive) == 0) {
+ ide_dump_status(drive, "DMA timeout",
+ hwif->tp_ops->read_status(hwif));
+ (void)dma_ops->dma_end(drive);
+ }
}
/*