1*2a8164dfSZhong Wang /*
2*2a8164dfSZhong Wang  * CDDL HEADER START
3*2a8164dfSZhong Wang  *
4*2a8164dfSZhong Wang  * The contents of this file are subject to the terms of the
5*2a8164dfSZhong Wang  * Common Development and Distribution License (the "License").
6*2a8164dfSZhong Wang  * You may not use this file except in compliance with the License.
7*2a8164dfSZhong Wang  *
8*2a8164dfSZhong Wang  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*2a8164dfSZhong Wang  * or http://www.opensolaris.org/os/licensing.
10*2a8164dfSZhong Wang  * See the License for the specific language governing permissions
11*2a8164dfSZhong Wang  * and limitations under the License.
12*2a8164dfSZhong Wang  *
13*2a8164dfSZhong Wang  * When distributing Covered Code, include this CDDL HEADER in each
14*2a8164dfSZhong Wang  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*2a8164dfSZhong Wang  * If applicable, add the following below this CDDL HEADER, with the
16*2a8164dfSZhong Wang  * fields enclosed by brackets "[]" replaced with your own identifying
17*2a8164dfSZhong Wang  * information: Portions Copyright [yyyy] [name of copyright owner]
18*2a8164dfSZhong Wang  *
19*2a8164dfSZhong Wang  * CDDL HEADER END
20*2a8164dfSZhong Wang  */
21*2a8164dfSZhong Wang /*
22*2a8164dfSZhong Wang  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23*2a8164dfSZhong Wang  * Use is subject to license terms.
24*2a8164dfSZhong Wang  */
25*2a8164dfSZhong Wang #ifndef	_FCOET_FC_H
26*2a8164dfSZhong Wang #define	_FCOET_FC_H
27*2a8164dfSZhong Wang 
28*2a8164dfSZhong Wang #include <sys/stmf_defines.h>
29*2a8164dfSZhong Wang 
30*2a8164dfSZhong Wang #ifdef	__cplusplus
31*2a8164dfSZhong Wang extern "C" {
32*2a8164dfSZhong Wang #endif
33*2a8164dfSZhong Wang 
34*2a8164dfSZhong Wang #ifdef	_KERNEL
35*2a8164dfSZhong Wang 
36*2a8164dfSZhong Wang fct_status_t
37*2a8164dfSZhong Wang fcoet_get_link_info(fct_local_port_t *port, fct_link_info_t *li);
38*2a8164dfSZhong Wang fct_status_t fcoet_register_remote_port(fct_local_port_t *port,
39*2a8164dfSZhong Wang     fct_remote_port_t *rp, fct_cmd_t *login);
40*2a8164dfSZhong Wang fct_status_t
41*2a8164dfSZhong Wang fcoet_deregister_remote_port(fct_local_port_t *port, fct_remote_port_t *rp);
42*2a8164dfSZhong Wang fct_status_t fcoet_send_cmd(fct_cmd_t *cmd);
43*2a8164dfSZhong Wang fct_status_t fcoet_send_cmd_response(fct_cmd_t *cmd, uint32_t ioflags);
44*2a8164dfSZhong Wang fct_status_t
45*2a8164dfSZhong Wang fcoet_xfer_scsi_data(fct_cmd_t *cmd, stmf_data_buf_t *dbuf, uint32_t ioflags);
46*2a8164dfSZhong Wang fct_status_t
47*2a8164dfSZhong Wang fcoet_abort_cmd(struct fct_local_port *port, fct_cmd_t *cmd, uint32_t flags);
48*2a8164dfSZhong Wang fct_status_t
49*2a8164dfSZhong Wang fcoet_do_flogi(fct_local_port_t *port, fct_flogi_xchg_t *fx);
50*2a8164dfSZhong Wang void fcoet_send_sol_flogi(fcoet_soft_state_t *ss);
51*2a8164dfSZhong Wang void fcoet_send_sol_abts(fcoet_exchange_t *xch);
52*2a8164dfSZhong Wang void fcoet_ctl(struct fct_local_port *port, int cmd, void *arg);
53*2a8164dfSZhong Wang void fcoet_populate_hba_fru_details(struct fct_local_port *port,
54*2a8164dfSZhong Wang     struct fct_port_attrs *port_attrs);
55*2a8164dfSZhong Wang fct_status_t fcoet_enable_port(fcoet_soft_state_t *ss);
56*2a8164dfSZhong Wang fct_status_t fcoet_disable_port(fcoet_soft_state_t *ss);
57*2a8164dfSZhong Wang fcoet_exchange_t *fcoet_init_sol_exchange(fct_cmd_t *cmd);
58*2a8164dfSZhong Wang 
59*2a8164dfSZhong Wang #endif	/* _KERNEL */
60*2a8164dfSZhong Wang 
61*2a8164dfSZhong Wang #ifdef	__cplusplus
62*2a8164dfSZhong Wang }
63*2a8164dfSZhong Wang #endif
64*2a8164dfSZhong Wang 
65*2a8164dfSZhong Wang #endif /* _FCOET_FC_H */
66