Merge commit '9276b3991ba20d5a5660887ba81b0bc7bed25a0c'
[unleashed.git] / share / man / man9f / ddi_dma_numwin.9f
blob475fbe2e535789af98ed9d2ad18308084ea2a187
1 '\" te
2 .\" Copyright (c) 1994, 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_NUMWIN 9F "Sep 29, 1994"
7 .SH NAME
8 ddi_dma_numwin \- retrieve number of DMA windows
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/ddi.h>
13 #include <sys/sunddi.h>
17 \fBint\fR \fBddi_dma_numwin\fR(\fBddi_dma_handle_t\fR \fIhandle\fR, \fBuint_t *\fR\fInwinp\fR);
18 .fi
20 .SH PARAMETERS
21 .sp
22 .ne 2
23 .na
24 \fB\fIhandle\fR \fR
25 .ad
26 .RS 11n
27 The  \fBDMA\fR handle previously allocated by a call to
28 \fBddi_dma_alloc_handle\fR(9F).
29 .RE
31 .sp
32 .ne 2
33 .na
34 \fB\fInwinp\fR \fR
35 .ad
36 .RS 11n
37 Upon a successful return,  \fInwinp\fR will contain the number of  \fBDMA\fR
38 windows for this object.
39 .RE
41 .SH INTERFACE LEVEL
42 .sp
43 .LP
44 Solaris DDI specific (Solaris DDI).
45 .SH DESCRIPTION
46 .sp
47 .LP
48 \fBddi_dma_numwin()\fR returns the number of  \fBDMA\fR windows for a
49 \fBDMA\fR object if partial resource allocation was permitted.
50 .SH RETURN VALUES
51 .sp
52 .LP
53 \fBddi_dma_numwin()\fR returns:
54 .sp
55 .ne 2
56 .na
57 \fB\fBDDI_SUCCESS\fR \fR
58 .ad
59 .RS 16n
60 Successfully filled in the number of  \fBDMA\fR windows.
61 .RE
63 .sp
64 .ne 2
65 .na
66 \fB\fBDDI_FAILURE\fR \fR
67 .ad
68 .RS 16n
69 \fBDMA\fR windows are not activated.
70 .RE
72 .SH CONTEXT
73 .sp
74 .LP
75 \fBddi_dma_numwin()\fR can be called from user, kernel, or interrupt context.
76 .SH SEE ALSO
77 .sp
78 .LP
79 \fBddi_dma_addr_bind_handle\fR(9F), \fBddi_dma_alloc_handle\fR(9F),
80 \fBddi_dma_buf_bind_handle\fR(9F), \fBddi_dma_unbind_handle\fR(9F)
81 .sp
82 .LP
83 \fIWriting Device Drivers\fR