]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ide: always set DMA masks in ide_pci_setup_ports()
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sat, 2 Feb 2008 18:56:30 +0000 (19:56 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sat, 2 Feb 2008 18:56:30 +0000 (19:56 +0100)
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>
drivers/ide/setup-pci.c

index 05db429a7da8c60403c2b7d51a1ffbf3d82a8b22..acef85d1c5810e205475642d25a3fb08d56df027 100644 (file)
@@ -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;