浏览代码

ide: call udma_filter() before resorting to the UltraDMA mask

Give the udma_filter() method call precedence over using the mode masks.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sergei Shtylyov 17 年之前
父节点
当前提交
851dd33bcf
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      drivers/ide/ide-dma.c

+ 4 - 3
drivers/ide/ide-dma.c

@@ -664,10 +664,11 @@ static unsigned int ide_get_mode_mask(ide_drive_t *drive, u8 base)
 		if ((id->field_valid & 4) == 0)
 		if ((id->field_valid & 4) == 0)
 			break;
 			break;
 
 
-		mask = id->dma_ultra & hwif->ultra_mask;
-
 		if (hwif->udma_filter)
 		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))
 		if ((mask & 0x78) && (eighty_ninty_three(drive) == 0))
 			mask &= 0x07;
 			mask &= 0x07;