From: James S. <jsi...@us...> - 2001-11-12 18:38:48
|
Update of /cvsroot/linux-mips/linux/include/asm-mips64 In directory usw-pr-cvs1:/tmp/cvs-serv6813 Modified Files: pci.h Log Message: pci_map_page fixes. Index: pci.h =================================================================== RCS file: /cvsroot/linux-mips/linux/include/asm-mips64/pci.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- pci.h 2001/11/06 09:10:22 1.6 +++ pci.h 2001/11/12 18:38:46 1.7 @@ -134,14 +134,17 @@ unsigned long offset, size_t size, int direction) { + unsigned long addr; + if (direction == PCI_DMA_NONE) BUG(); + addr = (unsigned long) page_address(page) + offset; #ifndef CONFIG_COHERENT_IO - dma_cache_wback_inv((unsigned long) page_address(page), size); + dma_cache_wback_inv(addr, size); #endif - return page_to_bus(page); + return virt_to_bus(addr); } static inline void pci_unmap_page(struct pci_dev *hwdev, dma_addr_t dma_address, |