1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
'\" te
.\" Copyright (c) 2006, Sun Microsystems, Inc.
.\" 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.
.\" 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.
.\" 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]
.TH ddi_iomin 9F "04 Apr 2006" "SunOS 5.11" "Kernel Functions for Drivers"
.SH NAME
ddi_iomin \- find minimum alignment and transfer size for DMA
.SH SYNOPSIS
.LP
.nf
#include <sys/conf.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>
\fBint\fR \fBddi_iomin\fR(\fBdev_info_t *\fR\fIdip\fR, \fBint\fR \fIinitial\fR, \fBint\fR \fIstreaming\fR);
.fi
.SH INTERFACE LEVEL
.sp
.LP
Solaris DDI specific (Solaris DDI). This interface is obsolete.
.SH PARAMETERS
.sp
.ne 2
.mk
.na
\fB\fIdip\fR\fR
.ad
.RS 13n
.rt
A pointer to the device's \fBdev_info\fR structure.
.RE
.sp
.ne 2
.mk
.na
\fB\fIinitial\fR\fR
.ad
.RS 13n
.rt
The initial minimum \fBDMA\fRtransfer size in bytes. This may be zero or an
appropriate \fBdlim_minxfer\fR value for device's \fBddi_dma_lim\fR structure
(see \fBddi_dma_lim_sparc\fR(9S) or \fBddi_dma_lim_x86\fR(9S)). This value must
be a power of two.
.RE
.sp
.ne 2
.mk
.na
\fB\fIstreaming\fR\fR
.ad
.RS 13n
.rt
This argument, if non-zero, indicates that the returned value should be
modified to account for \fIstreaming\fR mode accesses (see
\fBddi_dma_req\fR(9S) for a discussion of streaming versus non-streaming access
mode).
.RE
.SH DESCRIPTION
.sp
.LP
The \fBddi_iomin()\fR function, finds out the minimum \fBDMA\fRtransfer size
for the device pointed to by \fIdip\fR. This provides a mechanism by which a
driver can determine the effects of underlying caches as well as intervening
bus adapters on the granularity of a DMA transfer.
.SH RETURN VALUES
.sp
.LP
The \fBddi_iomin()\fR function returns the minimum \fBDMA\fRtransfer size for
the calling device, or it returns zero, which means that you cannot get there
from here.
.SH CONTEXT
.sp
.LP
This function can be called from user, interrupt, or kernel context.
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
tab() box;
cw(2.75i) |cw(2.75i)
lw(2.75i) |lw(2.75i)
.
ATTRIBUTE TYPEATTRIBUTE VALUE
_
Interface StabilityObsolete
.TE
.SH SEE ALSO
.sp
.LP
\fBddi_dma_devalign\fR(9F), \fBddi_dma_setup\fR(9F), \fBddi_dma_sync\fR(9F),
\fBddi_dma_lim_sparc\fR(9S), \fBddi_dma_lim_x86\fR(9S), \fBddi_dma_req\fR(9S)
.sp
.LP
\fIWriting Device Drivers\fR
|