diff options
Diffstat (limited to 'arch/x86_64/kernel/pci-gart.c')
-rw-r--r-- | arch/x86_64/kernel/pci-gart.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c index 2fe23a6c361b..dd0718dc178b 100644 --- a/arch/x86_64/kernel/pci-gart.c +++ b/arch/x86_64/kernel/pci-gart.c | |||
@@ -310,7 +310,7 @@ void gart_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, int di | |||
310 | 310 | ||
311 | for (i = 0; i < nents; i++) { | 311 | for (i = 0; i < nents; i++) { |
312 | struct scatterlist *s = &sg[i]; | 312 | struct scatterlist *s = &sg[i]; |
313 | if (!s->dma_length || !s->length) | 313 | if (!s->dma_length) |
314 | break; | 314 | break; |
315 | dma_unmap_single(dev, s->dma_address, s->dma_length, dir); | 315 | dma_unmap_single(dev, s->dma_address, s->dma_length, dir); |
316 | } | 316 | } |
@@ -364,7 +364,6 @@ static int __dma_map_cont(struct scatterlist *sg, int start, int stopat, | |||
364 | 364 | ||
365 | BUG_ON(i > start && s->offset); | 365 | BUG_ON(i > start && s->offset); |
366 | if (i == start) { | 366 | if (i == start) { |
367 | *sout = *s; | ||
368 | sout->dma_address = iommu_bus_base; | 367 | sout->dma_address = iommu_bus_base; |
369 | sout->dma_address += iommu_page*PAGE_SIZE + s->offset; | 368 | sout->dma_address += iommu_page*PAGE_SIZE + s->offset; |
370 | sout->dma_length = s->length; | 369 | sout->dma_length = s->length; |
@@ -379,7 +378,7 @@ static int __dma_map_cont(struct scatterlist *sg, int start, int stopat, | |||
379 | SET_LEAK(iommu_page); | 378 | SET_LEAK(iommu_page); |
380 | addr += PAGE_SIZE; | 379 | addr += PAGE_SIZE; |
381 | iommu_page++; | 380 | iommu_page++; |
382 | } | 381 | } |
383 | } | 382 | } |
384 | BUG_ON(iommu_page - iommu_start != pages); | 383 | BUG_ON(iommu_page - iommu_start != pages); |
385 | return 0; | 384 | return 0; |
@@ -391,7 +390,6 @@ static inline int dma_map_cont(struct scatterlist *sg, int start, int stopat, | |||
391 | { | 390 | { |
392 | if (!need) { | 391 | if (!need) { |
393 | BUG_ON(stopat - start != 1); | 392 | BUG_ON(stopat - start != 1); |
394 | *sout = sg[start]; | ||
395 | sout->dma_length = sg[start].length; | 393 | sout->dma_length = sg[start].length; |
396 | return 0; | 394 | return 0; |
397 | } | 395 | } |