Allows a device driver to indicate that previously mapped buffers may need to be refreshed.
int d_sync_mem(d_handle_t handle, dio_t blist)
The d_sync_mem service allows a device driver to indicate that previously mapped buffers may need to be refreshed, either because a new DMA is about to start or a previous DMA has now completed. d_sync_mem is not an exported kernel service, but a bus-specific utility determined by d_map_init based on platform characteristics and provided to the caller through the d_handle structure. d_sync_mem allows the driver to identify additional coherency points beyond those of the initial mapping (d_map_list) and termination of the mapping (d_unmap_list). Thus d_sync_mem provides a way to long-term map buffers and still handle potential data consistency problems.
Item | Description |
---|---|
d_handle_t | Indicates the unique dma handle returned by d_map_init. |
dio_t blist | List of vectors returned by original d_map_list. |
Item | Description |
---|---|
DMA_SUCC | Buffers described by the blist have been synchronized. |
DMA_FAIL | Buffers could not be synchronized. |