* [PATCH] ide-iops: only clear DMA words on setting DMA mode
@ 2009-03-10 19:38 Sergei Shtylyov
2009-03-11 16:35 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 2+ messages in thread
From: Sergei Shtylyov @ 2009-03-10 19:38 UTC (permalink / raw)
To: bzolnier; +Cc: linux-ide
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>
---
This patch is against the recent Linus' tree...
drivers/ide/ide-iops.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
Index: linux-2.6/drivers/ide/ide-iops.c
===================================================================
--- linux-2.6.orig/drivers/ide/ide-iops.c
+++ linux-2.6/drivers/ide/ide-iops.c
@@ -774,9 +774,11 @@ int ide_config_drive_speed(ide_drive_t *
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-11 17:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-10 19:38 [PATCH] ide-iops: only clear DMA words on setting DMA mode Sergei Shtylyov
2009-03-11 16:35 ` Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).