aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-13 15:39:37 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-13 15:39:37 -0400
commitc39220483ebe6871fb129d4b2236cd95290c41fc (patch)
tree3bdd4a754d2103a73aa2df4b218093765aa92c2b /drivers
parent97100fc816badbbc162644cfde7ad39ae9211fb4 (diff)
ide: DMA_PIO_RETRY -> IDE_DFLAG_DMA_PIO_RETRY
Add IDE_DFLAG_DMA_PIO_RETRY and use it instead of ide_drive_t.state + DMA_PIO_RETRY. There should be no functional changes cause by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/ide-io.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 5f0ed59bac6b..11b602bb5741 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -78,8 +78,9 @@ static int __ide_end_request(ide_drive_t *drive, struct request *rq,
78 * decide whether to reenable DMA -- 3 is a random magic for now, 78 * decide whether to reenable DMA -- 3 is a random magic for now,
79 * if we DMA timeout more than 3 times, just stay in PIO 79 * if we DMA timeout more than 3 times, just stay in PIO
80 */ 80 */
81 if (drive->state == DMA_PIO_RETRY && drive->retry_pio <= 3) { 81 if ((drive->dev_flags & IDE_DFLAG_DMA_PIO_RETRY) &&
82 drive->state = 0; 82 drive->retry_pio <= 3) {
83 drive->dev_flags &= ~IDE_DFLAG_DMA_PIO_RETRY;
83 ide_dma_on(drive); 84 ide_dma_on(drive);
84 } 85 }
85 86
@@ -1195,8 +1196,8 @@ static ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error)
1195 * a timeout -- we'll reenable after we finish this next request 1196 * a timeout -- we'll reenable after we finish this next request
1196 * (or rather the first chunk of it) in pio. 1197 * (or rather the first chunk of it) in pio.
1197 */ 1198 */
1199 drive->dev_flags |= IDE_DFLAG_DMA_PIO_RETRY;
1198 drive->retry_pio++; 1200 drive->retry_pio++;
1199 drive->state = DMA_PIO_RETRY;
1200 ide_dma_off_quietly(drive); 1201 ide_dma_off_quietly(drive);
1201 1202
1202 /* 1203 /*