Skip to content

Commit

Permalink
m68k: add support for DMA_BIDIRECTIONAL in dma support functions
Browse files Browse the repository at this point in the history
The dma cache support functions do not currently support the direction flag
DMA_BIDIRECTIONAL. If a driver passes this direction to dma_map_single or
friends you will get console output like this:

  dma_sync_single_for_device: unsupported dir 0

For example when using the Intel e100 ethernet driver on a ColdFire platform
with PCI bus. You will get a stream of these messages coming out.

Modify the dma cache support code adding support for DMA_BIDIRECTIONAL. It is
actioned by doing a cache push operation.

Signed-off-by: Greg Ungerer <[email protected]>
  • Loading branch information
gregungerer committed Jul 17, 2012
1 parent f3ff643 commit d2661c6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/m68k/kernel/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ void dma_sync_single_for_device(struct device *dev, dma_addr_t handle,
size_t size, enum dma_data_direction dir)
{
switch (dir) {
case DMA_BIDIRECTIONAL:
case DMA_TO_DEVICE:
cache_push(handle, size);
break;
Expand Down

0 comments on commit d2661c6

Please sign in to comment.