]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/microblaze/kernel/dma.c
Merge tag 'for-linus-20160106' of git://git.infradead.org/linux-mtd
[karo-tx-linux.git] / arch / microblaze / kernel / dma.c
index c89da63129545a9c300e61062e9d958d4c786790..bf4dec229437a836ee1829504be7bf603ce73b37 100644 (file)
@@ -61,7 +61,8 @@ static int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl,
        /* FIXME this part of code is untested */
        for_each_sg(sgl, sg, nents, i) {
                sg->dma_address = sg_phys(sg);
-               __dma_sync(sg_phys(sg), sg->length, direction);
+               __dma_sync(page_to_phys(sg_page(sg)) + sg->offset,
+                                                       sg->length, direction);
        }
 
        return nents;