]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/ide-dma.c
ide: call udma_filter() before resorting to the UltraDMA mask
[linux-2.6-omap-h63xx.git] / drivers / ide / ide-dma.c
index 097d6e9865bc3c5a2411591e7affe7e2771c7965..f073ea35da000f9799abf710f9bf94fb9a9afe5b 100644 (file)
@@ -664,10 +664,11 @@ static unsigned int ide_get_mode_mask(ide_drive_t *drive, u8 base)
                if ((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;