dma-debug: allow DMA_BIDIRECTIONAL mappings to be synced with DMA_FROM_DEVICE and
authorKrzysztof Halasa <khc@pm.waw.pl>
Fri, 8 Jan 2010 22:42:36 +0000 (14:42 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 18 Jan 2010 18:19:33 +0000 (10:19 -0800)
commitecac13f4da35b215152e8dab78470662e1b9685d
tree10d2c4691f02b21afbc93f350b46f34a938f1a48
parentf21efc5709f5e0285389a10ede7e3cef54977029
dma-debug: allow DMA_BIDIRECTIONAL mappings to be synced with DMA_FROM_DEVICE and

commit 42d53b4ff7d61487d18274ebdf1f70c1aef6f122 upstream.

There is no need to perform full BIDIR sync (copying the buffers in case
of swiotlb and similar schemes) if we know that the owner (CPU or device)
hasn't altered the data.

Addresses the false-positive reported at
http://bugzilla.kernel.org/show_bug.cgi?id=14169

Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Cc: David Miller <davem@davemloft.net>
Cc: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
lib/dma-debug.c