2 .\" Copyright (c) 2006, Sun Microsystems, Inc.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH DDI_DMA_COFF 9F "Jan 16, 2006"
8 ddi_dma_coff \- convert a DMA cookie to an offset within a DMA handle.
14 #include <sys/sunddi.h>
18 \fBint\fR \fBddi_dma_coff\fR(\fBddi_dma_handle_t\fR \fIhandle\fR, \fBddi_dma_cookie_t *\fR\fIcookiep\fR,
19 \fBoff_t *\fR\fIoffp\fR);
25 Solaris SPARC DDI (Solaris SPARC DDI). This interface is obsolete.
33 The \fIhandle\fR filled in by a call to \fBddi_dma_setup\fR(9F).
42 A pointer to a \fBDMA\fR cookie (see \fBddi_dma_cookie\fR(9S)) that contains
43 the appropriate address, length and bus type to be used in programming the
53 A pointer to an offset to be filled in.
59 The \fBddi_dma_coff()\fR function converts the values in \fBDMA\fR cookie
60 pointed to by \fIcookiep\fR to an offset (in bytes) from the beginning of the
61 object that the DMA\fBhandle\fR has mapped.
64 The \fBddi_dma_coff()\fR function allows a driver to update a \fBDMA\fR cookie
65 with values it reads from its device's \fBDMA\fR engine after a transfer
66 completes and convert that value into an offset into the object that is mapped
71 The \fBddi_dma_coff()\fR function returns:
75 \fB\fBDDI_SUCCESS\fR\fR
78 Successfully filled in \fIoffp\fR.
84 \fB\fBDDI_FAILURE\fR\fR
87 Failed to successfully fill in \fIoffp\fR.
93 The \fBddi_dma_coff()\fR function can be called from user, interrupt, or kernel
98 See \fBattributes\fR(5) for descriptions of the following attributes:
106 ATTRIBUTE TYPE ATTRIBUTE VALUE
108 Interface Stability Obsolete
114 \fBddi_dma_setup\fR(9F), \fBddi_dma_sync\fR(9F), \fBddi_dma_cookie\fR(9S)
117 \fIWriting Device Drivers\fR