aboutsummaryrefslogtreecommitdiff
path: root/drivers/ide/setup-pci.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 22:25:21 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 22:25:21 +0200
commit63158d5c217e2e62665ae9b10d203bd7da817108 (patch)
treedc98e5f2b66d26f6aeb8405e8c47ea49ea784f1a /drivers/ide/setup-pci.c
parentd54452fbf84500eff77a55a2061f4669441d2cc3 (diff)
ide: cleanup ide_setup_dma()
* There is no need to call ide_release_dma_engine(). * Move the code up to (and including) ide_allocate_dma_engine() call to the callers of ide_setup_dma(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/setup-pci.c')
-rw-r--r--drivers/ide/setup-pci.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
index bf28970b027..5006ea98733 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)
if ((d->host_flags & IDE_HFLAG_NO_AUTODMA) == 0 ||
((dev->class >> 8) == PCI_CLASS_STORAGE_IDE &&
(dev->class & 0x80))) {
- unsigned long dma_base = ide_get_or_set_dma_base(d, hwif);
+ unsigned long base = ide_get_or_set_dma_base(d, hwif);
- if (dma_base == 0 || ide_pci_set_master(dev, d->name) < 0)
+ if (base == 0 || ide_pci_set_master(dev, d->name) < 0)
goto out_disabled;
if (d->init_dma)
- d->init_dma(hwif, dma_base);
+ d->init_dma(hwif, base);
- ide_setup_dma(hwif, dma_base);
+ if (hwif->mmio)
+ printk(KERN_INFO " %s: MMIO-DMA\n", hwif->name);
+ else
+ printk(KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx\n",
+ hwif->name, base, base + 7);
+
+ hwif->extra_base = base + (hwif->channel ? 8 : 16);
+
+ if (ide_allocate_dma_engine(hwif) == 0)
+ ide_setup_dma(hwif, base);
}
return;