lkml.org 
[lkml]   [2002]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjecthighmem pci dma mapping does not work, missing cast in asm-i386/pci.h
Hello all,

There's a missing cast in pci_map_page that causes 64 bit capable
drivers to access the wrong memory for highmem pages. Please
include the patch below to fix it.

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

:r ~/patches/v2.4/v2.4.19-pre10-pci_highmem.diff
diff -urN v2.4.19-pre10/include/asm-i386/pci.h pci-v2.4.19-pre10/include/asm-i386/pci.h
--- v2.4.19-pre10/include/asm-i386/pci.h Thu Jun 6 20:10:08 2002
+++ pci-v2.4.19-pre10/include/asm-i386/pci.h Mon Jun 10 19:54:16 2002
@@ -103,7 +103,7 @@
if (direction == PCI_DMA_NONE)
out_of_line_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/

\
 
 \ /
  Last update: 2005-03-22 13:26    [W:0.030 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site