aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/ioport.c
diff options
context:
space:
mode:
authorJan Andersson <jan.andersson@ieee.org>2006-12-29 19:50:04 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-30 13:56:45 -0500
commitdbc1333a347745bd55844649c19eb7d28f383a84 (patch)
treec48a4edb6d8a7fe22e3515651b6cf6bd6f0784cd /arch/sparc/kernel/ioport.c
parent8018c27b26af56af18eb8b2dc600eba825792d8f (diff)
[PATCH] sparc32: add offset in pci_map_sg()
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> Cc: "David S. Miller" <davem@davemloft.net> Cc: William Lee Irwin III <wli@holomorphy.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/sparc/kernel/ioport.c')
-rw-r--r--arch/sparc/kernel/ioport.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
index cbbc98846b00..00a39760877b 100644
--- a/arch/sparc/kernel/ioport.c
+++ b/arch/sparc/kernel/ioport.c
@@ -726,7 +726,8 @@ int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents,
726 /* IIep is write-through, not flushing. */ 726 /* IIep is write-through, not flushing. */
727 for (n = 0; n < nents; n++) { 727 for (n = 0; n < nents; n++) {
728 BUG_ON(page_address(sg->page) == NULL); 728 BUG_ON(page_address(sg->page) == NULL);
729 sg->dvma_address = virt_to_phys(page_address(sg->page)); 729 sg->dvma_address =
730 virt_to_phys(page_address(sg->page)) + sg->offset;
730 sg->dvma_length = sg->length; 731 sg->dvma_length = sg->length;
731 sg++; 732 sg++;
732 } 733 }