aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2009-03-31 14:15:27 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-31 14:15:27 -0400
commitc4199930b119eb9c1ffb102ed57eaac4d4424d08 (patch)
treed411514db277035116d7994b65c5c3b4e7c097f1
parent8d64fcd9357798ad0d61f8877de13d5e1b1ab510 (diff)
ide-iops: only clear DMA words on setting DMA mode
The bytes indicating current DMA mode in the identify data words 62, 63, and 88 should only change on setting a DMA mode, so stop clearing them on setting PIO mode in ide_config_drive_speed(). While at it, correct SW/MW DMA mode masks... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r--drivers/ide/ide-iops.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index 5403e4a44be4..0e62698146b6 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -386,9 +386,11 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
386 return error; 386 return error;
387 } 387 }
388 388
389 id[ATA_ID_UDMA_MODES] &= ~0xFF00; 389 if (speed >= XFER_SW_DMA_0) {
390 id[ATA_ID_MWDMA_MODES] &= ~0x0F00; 390 id[ATA_ID_UDMA_MODES] &= ~0xFF00;
391 id[ATA_ID_SWDMA_MODES] &= ~0x0F00; 391 id[ATA_ID_MWDMA_MODES] &= ~0x0700;
392 id[ATA_ID_SWDMA_MODES] &= ~0x0700;
393 }
392 394
393 skip: 395 skip:
394#ifdef CONFIG_BLK_DEV_IDEDMA 396#ifdef CONFIG_BLK_DEV_IDEDMA