[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20061228184459.1c51a33b@localhost.localdomain>
Date: Thu, 28 Dec 2006 18:44:59 +0100
From: Jan Andersson <jan.andersson@...e.org>
To: wli@...omorphy.com
Cc: linux-kernel@...r.kernel.org, sparclinux@...r.kernel.org
Subject: [PATCH] sparc32: add offset in pci_map_sg()
From: Jan Andersson jan.andersson@...e.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@...e.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++;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists