Commit 726f11b1 authored by Benjamin LaHaise's avatar Benjamin LaHaise

[PATCH] pci dma patch rediffed for 2.5.21

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.
parent 7ef17402
...@@ -109,7 +109,7 @@ static inline dma_addr_t pci_map_page(struct pci_dev *hwdev, struct page *page, ...@@ -109,7 +109,7 @@ static inline dma_addr_t pci_map_page(struct pci_dev *hwdev, struct page *page,
if (direction == PCI_DMA_NONE) if (direction == PCI_DMA_NONE)
BUG(); 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, static inline void pci_unmap_page(struct pci_dev *hwdev, dma_addr_t dma_address,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment