Skip to content

Commit

Permalink
ide: call udma_filter() before resorting to the UltraDMA mask
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sergei Shtylyov authored and Bartlomiej Zolnierkiewicz committed Oct 11, 2007
1 parent bda7970 commit 851dd33
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/ide/ide-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 851dd33

Please sign in to comment.