Skip to content

Commit

Permalink
ide: always set DMA masks in ide_pci_setup_ports()
Browse files Browse the repository at this point in the history
Always set DMA masks in ide_pci_setup_ports() to make sure that the valid
masks for a host are set.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Feb 2, 2008
1 parent d4e6d4e commit bf77c53
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions drivers/ide/setup-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,10 +558,15 @@ void ide_pci_setup_ports(struct pci_dev *dev, const struct ide_port_info *d, int
hwif->drives[1].unmask = 1;
}

if (hwif->dma_base) {
hwif->swdma_mask = d->swdma_mask;
hwif->mwdma_mask = d->mwdma_mask;
hwif->ultra_mask = d->udma_mask;
hwif->swdma_mask = d->swdma_mask;
hwif->mwdma_mask = d->mwdma_mask;
hwif->ultra_mask = d->udma_mask;

if ((d->host_flags && IDE_HFLAG_NO_DMA) == 0 &&
hwif->dma_base == 0) {
hwif->swdma_mask = 0;
hwif->mwdma_mask = 0;
hwif->ultra_mask = 0;
}

hwif->drives[0].autotune = 1;
Expand Down

0 comments on commit bf77c53

Please sign in to comment.