1*1bdd6c0eSSue Gleeson /*
2*1bdd6c0eSSue Gleeson  * CDDL HEADER START
3*1bdd6c0eSSue Gleeson  *
4*1bdd6c0eSSue Gleeson  * The contents of this file are subject to the terms of the
5*1bdd6c0eSSue Gleeson  * Common Development and Distribution License (the "License").
6*1bdd6c0eSSue Gleeson  * You may not use this file except in compliance with the License.
7*1bdd6c0eSSue Gleeson  *
8*1bdd6c0eSSue Gleeson  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*1bdd6c0eSSue Gleeson  * or http://www.opensolaris.org/os/licensing.
10*1bdd6c0eSSue Gleeson  * See the License for the specific language governing permissions
11*1bdd6c0eSSue Gleeson  * and limitations under the License.
12*1bdd6c0eSSue Gleeson  *
13*1bdd6c0eSSue Gleeson  * When distributing Covered Code, include this CDDL HEADER in each
14*1bdd6c0eSSue Gleeson  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*1bdd6c0eSSue Gleeson  * If applicable, add the following below this CDDL HEADER, with the
16*1bdd6c0eSSue Gleeson  * fields enclosed by brackets "[]" replaced with your own identifying
17*1bdd6c0eSSue Gleeson  * information: Portions Copyright [yyyy] [name of copyright owner]
18*1bdd6c0eSSue Gleeson  *
19*1bdd6c0eSSue Gleeson  * CDDL HEADER END
20*1bdd6c0eSSue Gleeson  */
21*1bdd6c0eSSue Gleeson 
22*1bdd6c0eSSue Gleeson /*
23*1bdd6c0eSSue Gleeson  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24*1bdd6c0eSSue Gleeson  * Use is subject to license terms.
25*1bdd6c0eSSue Gleeson  */
26*1bdd6c0eSSue Gleeson 
27*1bdd6c0eSSue Gleeson #ifndef _SRPT_CH_H
28*1bdd6c0eSSue Gleeson #define	_SRPT_CH_H
29*1bdd6c0eSSue Gleeson 
30*1bdd6c0eSSue Gleeson /*
31*1bdd6c0eSSue Gleeson  * Prototypes and data structures specific to SCSI Session
32*1bdd6c0eSSue Gleeson  * interface.
33*1bdd6c0eSSue Gleeson  */
34*1bdd6c0eSSue Gleeson 
35*1bdd6c0eSSue Gleeson #ifdef	__cplusplus
36*1bdd6c0eSSue Gleeson extern "C" {
37*1bdd6c0eSSue Gleeson #endif
38*1bdd6c0eSSue Gleeson 
39*1bdd6c0eSSue Gleeson /*
40*1bdd6c0eSSue Gleeson  * Prototypes
41*1bdd6c0eSSue Gleeson  */
42*1bdd6c0eSSue Gleeson srpt_channel_t *srpt_ch_alloc(srpt_target_port_t *tgt, uint8_t port);
43*1bdd6c0eSSue Gleeson void srpt_ch_add_ref(srpt_channel_t *ch);
44*1bdd6c0eSSue Gleeson void srpt_ch_release_ref(srpt_channel_t *ch, uint_t wait);
45*1bdd6c0eSSue Gleeson void srpt_ch_disconnect(srpt_channel_t *ch);
46*1bdd6c0eSSue Gleeson void srpt_ch_cleanup(srpt_channel_t *ch);
47*1bdd6c0eSSue Gleeson 
48*1bdd6c0eSSue Gleeson ibt_wrid_t srpt_ch_alloc_swqe_wrid(srpt_channel_t *ch,
49*1bdd6c0eSSue Gleeson 	srpt_swqe_type_t wqe_type, void *addr);
50*1bdd6c0eSSue Gleeson void srpt_ch_free_swqe_wrid(srpt_channel_t *ch, ibt_wrid_t id);
51*1bdd6c0eSSue Gleeson 
52*1bdd6c0eSSue Gleeson ibt_status_t srpt_ch_post_send(srpt_channel_t *ch, srpt_iu_t *iu,
53*1bdd6c0eSSue Gleeson 	uint32_t len, uint_t fence);
54*1bdd6c0eSSue Gleeson 
55*1bdd6c0eSSue Gleeson #ifdef	__cplusplus
56*1bdd6c0eSSue Gleeson }
57*1bdd6c0eSSue Gleeson #endif
58*1bdd6c0eSSue Gleeson 
59*1bdd6c0eSSue Gleeson #endif /* _SRPT_CH_H */
60