[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[microblaze-uclinux] [PATCH] xilinx: Fix Microblaze dma_map_sg bug
There fixes a subtle bug in the dma_map_sg() function on Xilinx's GIT tree
that results in mis-population of SG DMA addresses.
Signed-off-by: Steven J. Magnani <steve@xxxxxxxxxxxxxxx>
---
diff -uprN linux-2.6-xlnx.git/include/asm-microblaze/dma-mapping.h linux-2.6-xlnx.git-fix/include/asm-microblaze/dma-mapping.h
--- linux-2.6-xlnx.git/include/asm-microblaze/dma-mapping.h 2009-05-26 09:13:50.000000000 -0500
+++ linux-2.6-xlnx.git-fix/include/asm-microblaze/dma-mapping.h 2009-05-26 09:16:07.000000000 -0500
@@ -200,7 +200,7 @@ dma_map_sg(struct device *dev, struct sc
for_each_sg(sgl, sg, nents, i) {
BUG_ON(!sg_page(sg));
- sg[i].dma_address = page_to_bus(sg_page(sg)) + sg->offset;
+ sg->dma_address = page_to_bus(sg_page(sg)) + sg->offset;
virt = page_address(sg_page(sg)) + sg->offset;
dma_cache_sync(dev, virt, sg->length, direction);
}
@@ -331,4 +331,4 @@ static inline int dma_get_cache_alignmen
return cpuinfo->dcache_line;
}
-#endif /* __ASM_AVR32_DMA_MAPPING_H */
+#endif /* __ASM_MICROBLAZE_DMA_MAPPING_H */
------------------------------------------------------------------------
Steven J. Magnani "I claim this network for MARS!
www.digidescorp.com Earthling, return my space modulator!"
#include <standard.disclaimer>
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/