diff options
-rw-r--r-- | arch/sparc64/kernel/iommu_common.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/iommu_common.c b/arch/sparc64/kernel/iommu_common.c index 78e8277df655..b70324e0d83d 100644 --- a/arch/sparc64/kernel/iommu_common.c +++ b/arch/sparc64/kernel/iommu_common.c | |||
@@ -233,6 +233,11 @@ unsigned long prepare_sg(struct scatterlist *sg, int nents) | |||
233 | dma_sg->dma_address = dent_addr; | 233 | dma_sg->dma_address = dent_addr; |
234 | dma_sg->dma_length = dent_len; | 234 | dma_sg->dma_length = dent_len; |
235 | 235 | ||
236 | if (dma_sg != sg) { | ||
237 | dma_sg = next_sg(dma_sg); | ||
238 | dma_sg->dma_length = 0; | ||
239 | } | ||
240 | |||
236 | return ((unsigned long) dent_addr + | 241 | return ((unsigned long) dent_addr + |
237 | (unsigned long) dent_len + | 242 | (unsigned long) dent_len + |
238 | (IO_PAGE_SIZE - 1UL)) >> IO_PAGE_SHIFT; | 243 | (IO_PAGE_SIZE - 1UL)) >> IO_PAGE_SHIFT; |