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
9  * http://www.opensource.org/licenses/cddl1.txt.
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 (c) 2004-2011 Emulex. All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _EMLXS_FCT_H
28 #define	_EMLXS_FCT_H
29 
30 #ifdef	__cplusplus
31 extern "C" {
32 #endif
33 
34 #ifdef SFCT_SUPPORT
35 
36 #include <sys/conf.h>
37 #include <sys/ddi.h>
38 #include <sys/stat.h>
39 #include <sys/pci.h>
40 #include <sys/sunddi.h>
41 #include <sys/modctl.h>
42 
43 #ifdef FC_WELL_KNOWN_ADDR
44 #undef FC_WELL_KNOWN_ADDR
45 #endif /* FC_WELL_KNOWN_ADDR */
46 
47 #include <sys/stmf.h>
48 #include <sys/fct.h>
49 
50 #ifndef LINK_SPEED_8G
51 #define	LINK_SPEED_8G		5
52 #endif /* LINK_SPEED_8G */
53 
54 #ifndef LINK_SPEED_10G
55 #define	LINK_SPEED_10G		6
56 #endif /* LINK_SPEED_10G */
57 
58 #ifndef PORT_SPEED_10G
59 #define	PORT_SPEED_10G		0x10
60 #endif /* PORT_SPEED_10G */
61 
62 #ifndef PORT_SPEED_16G
63 #define	PORT_SPEED_16G		0x20
64 #endif /* PORT_SPEED_16G */
65 
66 /*
67  * Number of ports that do not require a valid cmd handle
68  * because they will not be sending any IO, ELS cmds ONLY.
69  */
70 #define	EMLXS_FCT_NUM_ELS_ONLY		8
71 
72 #ifndef MODSYM_SUPPORT
73 #pragma weak fct_alloc
74 #pragma weak fct_free
75 #pragma weak fct_scsi_task_alloc
76 #pragma weak fct_register_local_port
77 #pragma weak fct_deregister_local_port
78 #pragma weak fct_handle_event
79 #pragma weak fct_post_rcvd_cmd
80 #pragma weak fct_ctl
81 #pragma weak fct_queue_cmd_for_termination
82 #pragma weak fct_send_response_done
83 #pragma weak fct_send_cmd_done
84 #pragma weak fct_scsi_data_xfer_done
85 #pragma weak fct_handle_rcvd_flogi
86 #pragma weak fct_port_shutdown
87 #pragma weak fct_port_initialize
88 #pragma weak stmf_deregister_port_provider
89 #pragma weak stmf_free
90 #pragma weak stmf_alloc
91 #pragma weak stmf_register_port_provider
92 extern void* stmf_alloc();
93 extern void* fct_alloc();
94 #endif /* MODSYM_SUPPORT */
95 
96 #endif	/* SFCT_SUPPORT */
97 
98 #ifdef	__cplusplus
99 }
100 #endif
101 
102 #endif	/* _EMLXS_FCT_H */
103