Skip to content

Commit

Permalink
microblaze: Fix sg_dma_len() regression
Browse files Browse the repository at this point in the history
The commit "asm-generic: add NEED_SG_DMA_LENGTH to define sg_dma_len()"
18e9830 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>
  • Loading branch information
fujita authored and michalsimek committed Jun 9, 2010
1 parent ffe57d0 commit fcdcddb
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion arch/microblaze/kernel/dma.c
Expand Up @@ -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);
}
Expand Down

0 comments on commit fcdcddb

Please sign in to comment.