pdiag_dd_big_dma_complete
The pdiag_dd_big_dma_complete() function unmaps, unpins, and detaches the user space DMA buffer.
Syntax
#include <sys/pdiagex_dds.h>
int32 pdiag_dd_big_dma_complete( handle, daddr, operation )
pdiag_info_handle_t handle;
pdiag_addr_t daddr;
uint32 operation;
Description
Attention:
- At this time, you can only use this call if the bus type is BUS_BID.
- The operation argument to this function must be PDIAG_DMA_MASTER.
The pdiag_dd_big_dma_complete() must be called after I/O completion involving the area mapped by the prior pdiag_dd_big_dma_setup() function call.
This function utilizes the D_UNMAP_LIST macro to unmap the specified address.
Execution Environment
The pdiag_dd_big_dma_complete() function can only be called from the process environment.
Parameters
Parameter | Description |
---|---|
handle | Points to pdiag_info_handle_t structure, which is returned from pdiag_open(). |
daddr | The bus address that was returned by the previous pdiag_dd_big_dma_setup() routine. |
operation | Type of operation to perform. Note:
At this time, this
must be PDIAG_DMA_MASTER. |
Return Value
The pdiag_dd_dma_complete function returns one of the following values:
Return Value | Description |
---|---|
DGX_OK | The operation was successful. The errno is not set. |
DGX_INVALID_HANDLE | Specified handle has been closed or was not generated by the pdiag_open() call. The errno is not set. |
DGX_BADVAL_FAIL | The daddr value is not valid. The errno is not set. |
DGX_UNPINU_FAIL | Application could not unpin the specified user buffer. The errno is set to the unpinu() return code. |
DGX_XMDETACH_FAIL | Application could not detach user space from the physical address. The errno is set to the xmdetach() return code. |