dma-debug: fix debug_dma_sync_sg_for_cpu and debug_dma_sync_sg_for_device
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Wed, 27 May 2009 00:43:03 +0000 (09:43 +0900)
committerJoerg Roedel <joerg.roedel@amd.com>
Fri, 29 May 2009 12:27:05 +0000 (14:27 +0200)
DMA-mapping.txt says that debug_dma_sync_sg family must be called with
the _same_ one you passed into the dma_map_sg call, it should _NOT_ be
the 'count' value _returned_ from the dma_map_sg call.

debug_dma_sync_sg_for_cpu and debug_dma_sync_sg_for_device can't
handle this properly; they need to use the sg_mapped_ents in struct
dma_debug_entry as debug_dma_unmap_sg() does.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
lib/dma-debug.c

diff --cc lib/dma-debug.c
Simple merge