[patch] pci dma patch rediffed for 2.5.21

Benjamin LaHaise (bcrl@redhat.com)
Mon, 10 Jun 2002 21:58:23 -0400


Hello all,

This is the same patch as was posted against 2.4.19-pre10: pci_map_page
was missing a cast on x86, which resulted in the high 32 bits of an
address being silently discarded. This patch fixes that by casting
the page number before multiplying it out.

-ben

-- 
"You will be reincarnated as a toad; and you will be much happier."

:r ~/patches/v2.5/v2.5.21-pci.diff diff -urN v2.5.21/include/asm-i386/pci.h pci/include/asm-i386/pci.h --- v2.5.21/include/asm-i386/pci.h Mon Jun 10 21:41:10 2002 +++ pci/include/asm-i386/pci.h Mon Jun 10 21:54:11 2002 @@ -109,7 +109,7 @@ if (direction == PCI_DMA_NONE) BUG(); - return (page - mem_map) * PAGE_SIZE + offset; + return (dma_addr_t)(page - mem_map) * PAGE_SIZE + offset; } static inline void pci_unmap_page(struct pci_dev *hwdev, dma_addr_t dma_address, - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/