提交 c4199930 编写于 作者: S Sergei Shtylyov 提交者: Bartlomiej Zolnierkiewicz

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: NSergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
上级 8d64fcd9
......@@ -386,9 +386,11 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
return error;
}
id[ATA_ID_UDMA_MODES] &= ~0xFF00;
id[ATA_ID_MWDMA_MODES] &= ~0x0F00;
id[ATA_ID_SWDMA_MODES] &= ~0x0F00;
if (speed >= XFER_SW_DMA_0) {
id[ATA_ID_UDMA_MODES] &= ~0xFF00;
id[ATA_ID_MWDMA_MODES] &= ~0x0700;
id[ATA_ID_SWDMA_MODES] &= ~0x0700;
}
skip:
#ifdef CONFIG_BLK_DEV_IDEDMA
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册