xref: /illumos-gate/usr/src/uts/intel/io/dktp/hba/ghd/ghd_dma.h (revision 2d6eb4a5e0a47d30189497241345dc5466bb68ab)
1*507c3241Smlf /*
2*507c3241Smlf  * CDDL HEADER START
3*507c3241Smlf  *
4*507c3241Smlf  * The contents of this file are subject to the terms of the
5*507c3241Smlf  * Common Development and Distribution License (the "License").
6*507c3241Smlf  * You may not use this file except in compliance with the License.
7*507c3241Smlf  *
8*507c3241Smlf  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*507c3241Smlf  * or http://www.opensolaris.org/os/licensing.
10*507c3241Smlf  * See the License for the specific language governing permissions
11*507c3241Smlf  * and limitations under the License.
12*507c3241Smlf  *
13*507c3241Smlf  * When distributing Covered Code, include this CDDL HEADER in each
14*507c3241Smlf  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*507c3241Smlf  * If applicable, add the following below this CDDL HEADER, with the
16*507c3241Smlf  * fields enclosed by brackets "[]" replaced with your own identifying
17*507c3241Smlf  * information: Portions Copyright [yyyy] [name of copyright owner]
18*507c3241Smlf  *
19*507c3241Smlf  * CDDL HEADER END
20*507c3241Smlf  */
21*507c3241Smlf /*
22*507c3241Smlf  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
23*507c3241Smlf  * Use is subject to license terms.
24*507c3241Smlf  */
25*507c3241Smlf 
26*507c3241Smlf #ifndef _GHD_DMA_H
27*507c3241Smlf #define	_GHD_DMA_H
28*507c3241Smlf 
29*507c3241Smlf #ifdef	__cplusplus
30*507c3241Smlf extern "C" {
31*507c3241Smlf #endif
32*507c3241Smlf 
33*507c3241Smlf 
34*507c3241Smlf #include <sys/ddi.h>
35*507c3241Smlf #include <sys/sunddi.h>
36*507c3241Smlf 
37*507c3241Smlf #include "ghd.h"
38*507c3241Smlf 
39*507c3241Smlf int	ghd_dmaget_attr(ccc_t *cccp, gcmd_t *gcmdp, long count, int sg_size,
40*507c3241Smlf 			uint_t *xfer);
41*507c3241Smlf 
42*507c3241Smlf int	ghd_dma_buf_bind_attr(ccc_t *ccp, gcmd_t *gcmdp, struct buf *bp,
43*507c3241Smlf 		int dma_flags, int (*callback)(), caddr_t arg,
44*507c3241Smlf 		ddi_dma_attr_t *sg_attrp);
45*507c3241Smlf 
46*507c3241Smlf void	ghd_dmafree_attr(gcmd_t *gcmdp);
47*507c3241Smlf 
48*507c3241Smlf uint_t	ghd_dmaget_next_attr(ccc_t *cccp, gcmd_t *gcmdp, long max_transfer_cnt,
49*507c3241Smlf 		int sg_size, ddi_dma_cookie_t cookie);
50*507c3241Smlf 
51*507c3241Smlf #ifdef	__cplusplus
52*507c3241Smlf }
53*507c3241Smlf #endif
54*507c3241Smlf 
55*507c3241Smlf #endif /* _GHD_DMA_H */
56