diff options
Diffstat (limited to 'drivers/ide/setup-pci.c')
-rw-r--r-- | drivers/ide/setup-pci.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index bf28970b0278..5006ea98733b 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c | |||
@@ -367,15 +367,24 @@ void ide_hwif_setup_dma(ide_hwif_t *hwif, const struct ide_port_info *d) | |||
367 | if ((d->host_flags & IDE_HFLAG_NO_AUTODMA) == 0 || | 367 | if ((d->host_flags & IDE_HFLAG_NO_AUTODMA) == 0 || |
368 | ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE && | 368 | ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE && |
369 | (dev->class & 0x80))) { | 369 | (dev->class & 0x80))) { |
370 | unsigned long dma_base = ide_get_or_set_dma_base(d, hwif); | 370 | unsigned long base = ide_get_or_set_dma_base(d, hwif); |
371 | 371 | ||
372 | if (dma_base == 0 || ide_pci_set_master(dev, d->name) < 0) | 372 | if (base == 0 || ide_pci_set_master(dev, d->name) < 0) |
373 | goto out_disabled; | 373 | goto out_disabled; |
374 | 374 | ||
375 | if (d->init_dma) | 375 | if (d->init_dma) |
376 | d->init_dma(hwif, dma_base); | 376 | d->init_dma(hwif, base); |
377 | 377 | ||
378 | ide_setup_dma(hwif, dma_base); | 378 | if (hwif->mmio) |
379 | printk(KERN_INFO " %s: MMIO-DMA\n", hwif->name); | ||
380 | else | ||
381 | printk(KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx\n", | ||
382 | hwif->name, base, base + 7); | ||
383 | |||
384 | hwif->extra_base = base + (hwif->channel ? 8 : 16); | ||
385 | |||
386 | if (ide_allocate_dma_engine(hwif) == 0) | ||
387 | ide_setup_dma(hwif, base); | ||
379 | } | 388 | } |
380 | 389 | ||
381 | return; | 390 | return; |