diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2007-05-14 09:44:38 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-10-16 05:27:32 -0400 |
commit | 0912a5db0ea45d8aef3ee99a882e093285e32c3c (patch) | |
tree | eef222f8bce729c7bf0fa988e0c77918032f55a3 /arch/sparc/mm/sun4c.c | |
parent | 78bdc3106a877cfa50439fa66b52acbc4e7868df (diff) |
SPARC: sg chaining support
This updates the sparc iommu/pci dma mappers to sg chaining.
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'arch/sparc/mm/sun4c.c')
-rw-r--r-- | arch/sparc/mm/sun4c.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c index 005a3e72d4f2..ee6708fc4492 100644 --- a/arch/sparc/mm/sun4c.c +++ b/arch/sparc/mm/sun4c.c | |||
@@ -17,8 +17,8 @@ | |||
17 | #include <linux/highmem.h> | 17 | #include <linux/highmem.h> |
18 | #include <linux/fs.h> | 18 | #include <linux/fs.h> |
19 | #include <linux/seq_file.h> | 19 | #include <linux/seq_file.h> |
20 | #include <linux/scatterlist.h> | ||
20 | 21 | ||
21 | #include <asm/scatterlist.h> | ||
22 | #include <asm/page.h> | 22 | #include <asm/page.h> |
23 | #include <asm/pgalloc.h> | 23 | #include <asm/pgalloc.h> |
24 | #include <asm/pgtable.h> | 24 | #include <asm/pgtable.h> |
@@ -1228,8 +1228,9 @@ static void sun4c_get_scsi_sgl(struct scatterlist *sg, int sz, struct sbus_bus * | |||
1228 | { | 1228 | { |
1229 | while (sz != 0) { | 1229 | while (sz != 0) { |
1230 | --sz; | 1230 | --sz; |
1231 | sg[sz].dvma_address = (__u32)sun4c_lockarea(page_address(sg[sz].page) + sg[sz].offset, sg[sz].length); | 1231 | sg->dvma_address = (__u32)sun4c_lockarea(page_address(sg->page) + sg->offset, sg->length); |
1232 | sg[sz].dvma_length = sg[sz].length; | 1232 | sg->dvma_length = sg->length; |
1233 | sg = sg_next(sg); | ||
1233 | } | 1234 | } |
1234 | } | 1235 | } |
1235 | 1236 | ||
@@ -1244,7 +1245,8 @@ static void sun4c_release_scsi_sgl(struct scatterlist *sg, int sz, struct sbus_b | |||
1244 | { | 1245 | { |
1245 | while (sz != 0) { | 1246 | while (sz != 0) { |
1246 | --sz; | 1247 | --sz; |
1247 | sun4c_unlockarea((char *)sg[sz].dvma_address, sg[sz].length); | 1248 | sun4c_unlockarea((char *)sg->dvma_address, sg->length); |
1249 | sg = sg_next(sg); | ||
1248 | } | 1250 | } |
1249 | } | 1251 | } |
1250 | 1252 | ||