ide: make ide_rate_filter() also respect PIO and SW/MW DMA mode masks
PATCH 3/4 ide: make ide_rate_filter() also respect PIO and SW/MW DMA mode masks
Make ide_rate_filter() also respect PIO/SWDMA/MWDMA mode masks. While at it, make the udma_filter() method calls take precedence over using the mode masks.
---
This version doesn't use explicit UltraDMA masks, so converting them to the ATA_UDMA* is left for another, global patch. This patch against the current Linus' tree and unfortunately I was able to only compile test it since that tree gives MODPOST warning and dies early on bootup.
drivers/ide/ide-dma.c | 7 +++-- drivers/ide/ide-lib.c | 65 +++++++++++++++++++++++++++++++++----------------- 2 files changed, 47 insertions(+), 25 deletions(-)
drivers/ide/ide-dma.c +4 -3
@@ -664,10 +664,11 @@ static unsigned int ide_get_mode_mask(idif ((id->field_valid &4 ) ==0 )break ; - mask = id->dma_ultra & hwif->ultra_mask; -if (hwif->udma_filter) - mask &= hwif->udma_filter (drive); + mask = hwif->udma_filter (drive); +else + mask = hwif->ultra_mask; + mask &= id->dma_ultra;if ((mask &0x78 ) && (eighty_ninty_three (drive) ==0 )) mask &=0x07 ;
drivers/ide/ide-lib.c +43 -22
81 lines not on this page · raw message
Quoted 6 lines · Hello, I wrote:
Make
ide_rate_filter()also respect PIO/SWDMA/MWDMA mode masks. While at it, make theudma_filter()method calls take precedence over using the mode masks.---
This version doesn't use explicit UltraDMA masks, so converting them to the ATA_UDMA* is left for another, global patch.
Argh, ignore the above sentense.
Quoted 3 lines
This patch against the current
Linus' tree and unfortunately I was able to only compile test it since that tree gives MODPOST warning and dies early on bootup.
This is still so. I'll try to test it whenever I have enought time...
MBR, Sergei