* [PATCH] sparc32: add offset in pci_map_sg()
@ 2006-12-28 17:44 Jan Andersson
0 siblings, 0 replies; only message in thread
From: Jan Andersson @ 2006-12-28 17:44 UTC (permalink / raw)
To: wli; +Cc: linux-kernel, sparclinux
From: Jan Andersson jan.andersson@ieee.org
Add sg->offset to sg->dvma_address in pci_map_sg() on sparc32. Without
the offset, transfers to buffers that do not begin on a page boundary
will not work as expected.
Signed-off-by: Jan Andersson <jan.andersson@ieee.org>
---
diff -uprN a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
--- a/arch/sparc/kernel/ioport.c 2006-12-28 15:00:46.000000000 +0100
+++ b/arch/sparc/kernel/ioport.c 2006-12-28 16:22:40.000000000 +0100
@@ -728,7 +728,8 @@ int pci_map_sg(struct pci_dev *hwdev, st
/* IIep is write-through, not flushing. */
for (n = 0; n < nents; n++) {
BUG_ON(page_address(sg->page) == NULL);
- sg->dvma_address = virt_to_phys(page_address(sg->page));
+ sg->dvma_address =
+ virt_to_phys(page_address(sg->page)) + sg->offset;
sg->dvma_length = sg->length;
sg++;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-12-28 17:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-28 17:44 [PATCH] sparc32: add offset in pci_map_sg() Jan Andersson
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®