diff options
Diffstat (limited to 'drivers/ide/ide-dma.c')
-rw-r--r-- | drivers/ide/ide-dma.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index d61f9a8cc18a..4d3102887d9c 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
@@ -91,6 +91,7 @@ ide_startstop_t ide_dma_intr(ide_drive_t *drive) | |||
91 | ide_hwif_t *hwif = drive->hwif; | 91 | ide_hwif_t *hwif = drive->hwif; |
92 | u8 stat = 0, dma_stat = 0; | 92 | u8 stat = 0, dma_stat = 0; |
93 | 93 | ||
94 | drive->waiting_for_dma = 0; | ||
94 | dma_stat = hwif->dma_ops->dma_end(drive); | 95 | dma_stat = hwif->dma_ops->dma_end(drive); |
95 | ide_destroy_dmatable(drive); | 96 | ide_destroy_dmatable(drive); |
96 | stat = hwif->tp_ops->read_status(hwif); | 97 | stat = hwif->tp_ops->read_status(hwif); |
@@ -479,6 +480,7 @@ ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error) | |||
479 | 480 | ||
480 | if (error < 0) { | 481 | if (error < 0) { |
481 | printk(KERN_WARNING "%s: DMA timeout error\n", drive->name); | 482 | printk(KERN_WARNING "%s: DMA timeout error\n", drive->name); |
483 | drive->waiting_for_dma = 0; | ||
482 | (void)dma_ops->dma_end(drive); | 484 | (void)dma_ops->dma_end(drive); |
483 | ide_destroy_dmatable(drive); | 485 | ide_destroy_dmatable(drive); |
484 | ret = ide_error(drive, "dma timeout error", | 486 | ret = ide_error(drive, "dma timeout error", |
@@ -491,6 +493,7 @@ ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error) | |||
491 | if (dma_ops->dma_test_irq(drive) == 0) { | 493 | if (dma_ops->dma_test_irq(drive) == 0) { |
492 | ide_dump_status(drive, "DMA timeout", | 494 | ide_dump_status(drive, "DMA timeout", |
493 | hwif->tp_ops->read_status(hwif)); | 495 | hwif->tp_ops->read_status(hwif)); |
496 | drive->waiting_for_dma = 0; | ||
494 | (void)dma_ops->dma_end(drive); | 497 | (void)dma_ops->dma_end(drive); |
495 | ide_destroy_dmatable(drive); | 498 | ide_destroy_dmatable(drive); |
496 | } | 499 | } |
@@ -577,5 +580,6 @@ int ide_dma_prepare(ide_drive_t *drive, struct ide_cmd *cmd) | |||
577 | ide_map_sg(drive, cmd); | 580 | ide_map_sg(drive, cmd); |
578 | return 1; | 581 | return 1; |
579 | } | 582 | } |
583 | drive->waiting_for_dma = 1; | ||
580 | return 0; | 584 | return 0; |
581 | } | 585 | } |