Deallocates resources previously allocated on a d_map_slave call.
#include <sys/dma.h>
int d_unmap_slave (*handle)
struct d_handle *handle;
Item | Description |
---|---|
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.
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.
Item | Description |
---|---|
DMA_SUCC | Indicates successful transfer. The DMA controller did not report any errors and that the Terminal Count was reached. |
DMA_TC_NOTREACHED | Indicates a successful partial transfer. The DMA controller reported the Terminal Count reached for the intended transfer as set up by the d_map_slave call. Block devices consider this an erro; however, for variable length devices this may not be an error. |
DMA_FAIL | Indicates that the transfer failed. The DMA controller reported an error. The device driver assumes the transfer was unsuccessful. |