Deallocates resources previously allocated on a d_map_slave call.
#include <sys/dma.h>
int d_unmap_slave (*handle) struct d_handle *handle;
handle | Indicates the unique handle returned by the d_map_init kernel service. |
The d_unmap_slave kernel service deallocates resources previously allocated on a d_map_slave call, disables the physical DMA channel, and returns error and status information following the DMA transfer. The d_unmap_slave kernel service is not an exported kernel service, but a bus-specific utility routine that is determined by the d_map_init kernel service and provided to the caller through the d_handle structure.
Note: You can use the D_UNMAP_SLAVE macro provided in the /usr/include/sys/dma.h file to code calls to the d_unmap_slave kernel service. If not, you must ensure that the d_unmap_slave function pointer is non-NULL before attempting to call. No all platforms require the unmapping service.
The device driver must call d_unmap_slave when the I/O is complete involving a prior mapping by the d_map_slave kernel service.
Note: The d_unmap_slave kernel should be paired with a previous d_map_slave call. Multiple outstanding slave DMA transfers are not supported. This kernel service assumes that there is no DMA in progress on the affected channel and deallocates the current channel mapping.
The d_unmap_slave kernel service is part of the base device package of your platform.
The d_map_init kernel service.