mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch] pci dma patch rediffed for 2.5.21
@ 2002-06-11  1:58 Benjamin LaHaise
  0 siblings, 0 replies; only message in thread
From: Benjamin LaHaise @ 2002-06-11  1:58 UTC (permalink / raw)
  To: Linus Torvalds, Linux Kernel

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,

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-06-11  1:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-11  1:58 [patch] pci dma patch rediffed for 2.5.21 Benjamin LaHaise

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®