microblaze: Fix sg_dma_len() regression

Previous thread: misc: Fix allocation 'borrowed' by vhost_net by Linux Kernel Mailing List on Wednesday, June 9, 2010 - 8:59 am. (1 message)

Next thread: msm: dma: add completion.h header by Linux Kernel Mailing List on Wednesday, June 9, 2010 - 12:59 pm. (1 message)
From: Linux Kernel Mailing List
Date: Wednesday, June 9, 2010 - 8:59 am

Gitweb:     http://git.kernel.org/linus/fcdcddbcbbd39a3363bd48414bfe44553b6d698a
Commit:     fcdcddbcbbd39a3363bd48414bfe44553b6d698a
Parent:     ffe57d02b23ebc5422cf81566b3ce566d68a3e22
Author:     FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
AuthorDate: Tue Jun 8 20:03:15 2010 +0900
Committer:  Michal Simek <monstr@monstr.eu>
CommitDate: Wed Jun 9 16:20:54 2010 +0200

    microblaze: Fix sg_dma_len() regression
    
    The commit "asm-generic: add NEED_SG_DMA_LENGTH to define sg_dma_len()"
    18e98307de0d746cb0845ebf66535ce2184c25a2 broke microblaze compilation.
    
    dma_direct_map_sg() sets sg->dma_length, however microblaze doesn't
    set NEED_SG_DMA_LENGTH so scatterlist strcutres doesn't include
    dma_length.
    
    sg->dma_length is always equal to sg->length on microblaze. So we
    don't need to set set dma_length, that is, microblaze can simply use
    sg->length.
    
    Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
    Signed-off-by: Michal Simek <monstr@monstr.eu>
---
 arch/microblaze/kernel/dma.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/arch/microblaze/kernel/dma.c b/arch/microblaze/kernel/dma.c
index 9dcd90b..79c7465 100644
--- a/arch/microblaze/kernel/dma.c
+++ b/arch/microblaze/kernel/dma.c
@@ -90,7 +90,6 @@ 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) + get_dma_direct_offset(dev);
-		sg->dma_length = sg->length;
 		__dma_sync_page(page_to_phys(sg_page(sg)), sg->offset,
 							sg->length, direction);
 	}
--

Previous thread: misc: Fix allocation 'borrowed' by vhost_net by Linux Kernel Mailing List on Wednesday, June 9, 2010 - 8:59 am. (1 message)

Next thread: msm: dma: add completion.h header by Linux Kernel Mailing List on Wednesday, June 9, 2010 - 12:59 pm. (1 message)