#include <sys/conf.h> #include <sys/ddi.h> #include <sys/sunddi.h>
int ddi_dma_coff(ddi_dma_handle_t handle, ddi_dma_cookie_t *cookiep, off_t *offp);
Solaris SPARC DDI (Solaris SPARC DDI).
ddi_dma_coff() converts the values in DMA cookie pointed to by cookiep to an offset (in bytes) from the beginning of the object that the DMA handle has mapped.
ddi_dma_coff() allows a driver to update a DMA cookie with values it reads from its device’s DMA engine after a transfer completes and convert that value into an offset into the object that is mapped for DMA.
- DDI_SUCCESS
- Successfully filled in offp.
- DDI_FAILURE
- Failed to successfully fill in offp.
ddi_dma_coff() can be called from user or interrupt context.