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>
This commit is contained in:
committed by
Adrian Bunk
parent
0a55d471f1
commit
1987ad05d5
@@ -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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user