aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-dma.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-31 14:15:20 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-31 14:15:20 -0400
commit4453011f959a5f5c6c7a33aea54fe17f5e43a867 (patch)
tree7ac781ab8d82b21cdf932b1736026ebe9fea757a /drivers/ide/ide-dma.c
parent1cee52de28aa687760ad262ad0834d1bf6c6d2ac (diff)
ide: destroy DMA mappings after ending DMA (v2)
Move ide_destroy_dmatable() call out from ->dma_end method to {ide_pc,cdrom_newpc,ide_dma}_intr(), ide_dma_timeout_retry() and sgiioc4_resetproc(). This causes minor/safe behavior changes w.r.t.: * cmd64x.c::cmd64{8,x}_dma_end() * cs5536.c::cs5536_dma_end() * icside.c::icside_dma_end() * it821x.c::it821x_dma_end() * scc_pata.c::__scc_dma_end() * sl82c105.c::sl82c105_dma_end() * tx4939ide.c::tx4939ide_dma_end() v2: * Fix build for CONFIG_BLK_DEV_IDEDMA=n (reported by Randy Dunlap). Cc: Randy Dunlap <randy.dunlap@oracle.com> 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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index 4e2005071113..b430898bbcd6 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -92,6 +92,7 @@ ide_startstop_t ide_dma_intr(ide_drive_t *drive)
92 u8 stat = 0, dma_stat = 0; 92 u8 stat = 0, dma_stat = 0;
93 93
94 dma_stat = hwif->dma_ops->dma_end(drive); 94 dma_stat = hwif->dma_ops->dma_end(drive);
95 ide_destroy_dmatable(drive);
95 stat = hwif->tp_ops->read_status(hwif); 96 stat = hwif->tp_ops->read_status(hwif);
96 97
97 if (OK_STAT(stat, DRIVE_READY, drive->bad_wstat | ATA_DRQ)) { 98 if (OK_STAT(stat, DRIVE_READY, drive->bad_wstat | ATA_DRQ)) {
@@ -479,6 +480,7 @@ ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error)
479 if (error < 0) { 480 if (error < 0) {
480 printk(KERN_WARNING "%s: DMA timeout error\n", drive->name); 481 printk(KERN_WARNING "%s: DMA timeout error\n", drive->name);
481 (void)dma_ops->dma_end(drive); 482 (void)dma_ops->dma_end(drive);
483 ide_destroy_dmatable(drive);
482 ret = ide_error(drive, "dma timeout error", 484 ret = ide_error(drive, "dma timeout error",
483 hwif->tp_ops->read_status(hwif)); 485 hwif->tp_ops->read_status(hwif));
484 } else { 486 } else {
@@ -490,6 +492,7 @@ ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error)
490 ide_dump_status(drive, "DMA timeout", 492 ide_dump_status(drive, "DMA timeout",
491 hwif->tp_ops->read_status(hwif)); 493 hwif->tp_ops->read_status(hwif));
492 (void)dma_ops->dma_end(drive); 494 (void)dma_ops->dma_end(drive);
495 ide_destroy_dmatable(drive);
493 } 496 }
494 } 497 }
495 498