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)
commit88f3907f6f447899544beadf491dccb32015dacb
tree65566b6711d85b951d55982d3bcc0c7393d6ad73
parent884d05970bfbc3db368f23460dc4ce63257f240d
dma-debug: fix debug_dma_sync_sg_for_cpu and debug_dma_sync_sg_for_device

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