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