summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/kernel/pci-dma.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/mips/kernel/pci-dma.c b/arch/mips/kernel/pci-dma.c
index de9cb90aa..3788ef997 100644
--- a/arch/mips/kernel/pci-dma.c
+++ b/arch/mips/kernel/pci-dma.c
@@ -1,6 +1,7 @@
/*
- *
- * Dynamic DMA mapping support.
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
*
* Copyright (C) 2000 Ani Joshi <ajoshi@unixbox.com>
* swiped from i386, and cloned for MIPS by Geert, polished by Ralf.
@@ -23,11 +24,13 @@ void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
ret = (void *) __get_free_pages(gfp, get_order(size));
if (ret != NULL) {
+ memset(ret, 0, size);
dma_cache_inv((unsigned long) ret, size);
*dma_handle = virt_to_bus(ret);
+ ret = KSEG1ADDR(ret);
}
- return KSEG1ADDR(ret);
+ return ret;
}
void pci_free_consistent(struct pci_dev *hwdev, size_t size,