DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

udi_dma_scgth_sync(3udi)


Sync host & device views of scatter/gather list

SYNOPSIS

#include <udi.h>

void udi_dma_scgth_sync (

	udi_dma_scgth_sync_call_t *callback,

	udi_cb_t *gcb,

	udi_dma_handle_t dma_handle );
 
typedef void udi_dma_scgth_sync_call_t (

	udi_cb_t *gcb );
 

ARGUMENTS callback, gcb are standard arguments described in the "Asynchronous Service Calls" section of "Standard Calling Sequences" in the UDI Core Specification.

dma_handle is a DMA handle previously mapped via udi_dma_buf_map or udi_dma_mem_alloc.

DESCRIPTION udi_dma_scgth_sync is used to synchronize the host and device views of the scatter/gather list memory for a data object that has been loaded for DMA, since udi_dma_sync only affects the actual data memory. This may involve flushes of CPU or I/O caches, or assuring that hardware write buffers have drained.

The entire set of scatter/gather elements, in all segments, as well as any prefix bytes (UDI_DMA_SCGTH_PREFIX_BYTES in udi_dma_constraints_attr_t) included in the synchronization. It is assumed that the DMA device did not write to this memory unless UDI_DMA_SCGTH_PREFIX_BYTES was greater than zero, but the driver may have read and/or written.

This function is only needed when the scatter/gather list is both DMA-mapped and driver-mapped (see udi_scgth_t), since this is the only case in which the driver will write to the scatter/gather segment memory and the device will read from it, and must not be used in other cases. In this case, udi_dma_scgth_sync must be called before the device reads from the scatter/gather list.

REFERENCES udi_dma_buf_map, udi_dma_mem_alloc, udi_dma_sync


UDI Physical I/O Specification Contents