Karl Beldan wrote: > On 7/31/12, Clemens Ladisch <clem...@ladisch.de> wrote: >> Karl Beldan wrote: >>> To tx a chunk of data from the SoC => network device, we : >>> - prepare a buffer with a leading header embedding a pattern, >>> - trigger the xfer and wait for an irq >>> // The device updates the pattern and then triggers an irq >>> - upon irq we check the pattern for the xfer completion >>> >>> I was expecting the following to work: >>> addr = dma_map_single(dev, buffer, size, DMA_TO_DEVICE); >> >> Of both the CPU and the device write to the buffer, you must use >> DMA_BIDIRECTIONAL. > > This does not work (tested) : seems to me BIDIRECTIONAL would just > add invalidate, and invalidate before the ram has been updated, as > stated, does not work.
Please show the exact sequence of dma_* calls, and also show when and how the CPU and the device access the buffer. Regards, Clemens -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/