From db1f0bb0882cd96f1eb0457fa87afc9b55bf1460 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Tue, 31 Mar 2009 20:15:19 +0200 Subject: [PATCH] --- yaml --- r: 139423 b: refs/heads/master c: 1cee52de28aa687760ad262ad0834d1bf6c6d2ac h: refs/heads/master i: 139421: 556bea8f7f34b3f55d42303a5d7cb207f3d8bb88 139419: 6c23249262f7aa0df06616857335e81586505a50 139415: ad11483c6dd2501d4fdeb92653740781b370200c 139407: 0463946344ef19dbd2780695899bcb7f7a1b6b74 139391: 0254053a22d7b40a345d92a428fa46183b922123 v: v3 --- [refs] | 2 +- trunk/drivers/ide/ide-dma.c | 21 ++++++--------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/[refs] b/[refs] index 12328687aabe..194987e28113 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 35c9b4daf4c94b30e5cede597d98016ebf31b5ad +refs/heads/master: 1cee52de28aa687760ad262ad0834d1bf6c6d2ac diff --git a/trunk/drivers/ide/ide-dma.c b/trunk/drivers/ide/ide-dma.c index dc5d9bc4ced0..4e2005071113 100644 --- a/trunk/drivers/ide/ide-dma.c +++ b/trunk/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); + } } /*