diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-31 14:15:22 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-31 14:15:22 -0400 |
commit | 88b4132e101e60e8fa67996ae3072ab6b71e8500 (patch) | |
tree | 6b65c2d0d8691c577d60e6d1f84ad6db172a82d7 /drivers/ide/ide-dma.c | |
parent | 11998b316173f814698f9037ce9179d634d1f423 (diff) |
ide: set/clear drive->waiting_for_dma flag in the core code
Set/clear drive->waiting_for_dma flag in the core code
instead of in ->dma_setup and ->dma_end methods.
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.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 | } |