[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]
Technical Reference: Kernel and Subsystems, Volume 1
d_unmap_slave Kernel Service
Purpose
Deallocates resources previously allocated on a d_map_slave call.
Syntax
#include <sys/dma.h>
int d_unmap_slave (*handle)
struct d_handle *handle;
Parameters
handle |
Indicates the unique handle returned by the d_map_init kernel service. |
Description
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.
Return Values
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. |
Related Information
The d_map_init kernel service.
[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]