diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2007-05-14 15:44:38 +0200 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-10-16 11:27:32 +0200 |
commit | 0912a5db0ea45d8aef3ee99a882e093285e32c3c (patch) | |
tree | eef222f8bce729c7bf0fa988e0c77918032f55a3 /arch/sparc/mm/sun4c.c | |
parent | 78bdc3106a877cfa50439fa66b52acbc4e7868df (diff) | |
download | talos-obmc-linux-0912a5db0ea45d8aef3ee99a882e093285e32c3c.tar.gz talos-obmc-linux-0912a5db0ea45d8aef3ee99a882e093285e32c3c.zip |
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 @@ #include <linux/highmem.h> #include <linux/fs.h> #include <linux/seq_file.h> +#include <linux/scatterlist.h> -#include <asm/scatterlist.h> #include <asm/page.h> #include <asm/pgalloc.h> #include <asm/pgtable.h> @@ -1228,8 +1228,9 @@ static void sun4c_get_scsi_sgl(struct scatterlist *sg, int sz, struct sbus_bus * { while (sz != 0) { --sz; - sg[sz].dvma_address = (__u32)sun4c_lockarea(page_address(sg[sz].page) + sg[sz].offset, sg[sz].length); - sg[sz].dvma_length = sg[sz].length; + sg->dvma_address = (__u32)sun4c_lockarea(page_address(sg->page) + sg->offset, sg->length); + sg->dvma_length = sg->length; + sg = sg_next(sg); } } @@ -1244,7 +1245,8 @@ static void sun4c_release_scsi_sgl(struct scatterlist *sg, int sz, struct sbus_b { while (sz != 0) { --sz; - sun4c_unlockarea((char *)sg[sz].dvma_address, sg[sz].length); + sun4c_unlockarea((char *)sg->dvma_address, sg->length); + sg = sg_next(sg); } } |