projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8018c27
)
[PATCH] sparc32: add offset in pci_map_sg()
author
Jan Andersson
<
[email protected]
>
Sat, 30 Dec 2006 00:50:04 +0000
(16:50 -0800)
committer
Linus Torvalds
<
[email protected]
>
Sat, 30 Dec 2006 18:56:45 +0000
(10:56 -0800)
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 <
[email protected]
>
Cc: "David S. Miller" <
[email protected]
>
Cc: William Lee Irwin III <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
arch/sparc/kernel/ioport.c
patch
|
blob
|
history
diff --git
a/arch/sparc/kernel/ioport.c
b/arch/sparc/kernel/ioport.c
index cbbc98846b0081cfe322622dcca604a222b207b4..00a39760877b2669c973e2aef6a8b3375f8eb2d5 100644
(file)
--- 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,
/* 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++;
}