diff options
author | Jan Andersson <jan.andersson@ieee.org> | 2007-01-25 00:10:10 +0100 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2007-01-25 00:10:10 +0100 |
commit | 1987ad05d5aaadd104dfe66b2caee35dc83b0b6f (patch) | |
tree | fbc2a95c768a401a465b58f42448f95b8c78a22b /arch | |
parent | 0a55d471f11619490031ccbf834d9b9521d19681 (diff) |
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>
Acked-By: David Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc/kernel/ioport.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index d39c9f206271..aa07df5bcffe 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c @@ -581,7 +581,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++) { if (page_address(sg->page) == NULL) BUG(); - 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++; } |