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