1fcf3ce44SJohn Forte /*
2fcf3ce44SJohn Forte  * CDDL HEADER START
3fcf3ce44SJohn Forte  *
4fcf3ce44SJohn Forte  * The contents of this file are subject to the terms of the
5fcf3ce44SJohn Forte  * Common Development and Distribution License (the "License").
6fcf3ce44SJohn Forte  * You may not use this file except in compliance with the License.
7fcf3ce44SJohn Forte  *
88f23e9faSHans Rosenfeld  * You can obtain a copy of the license at
98f23e9faSHans Rosenfeld  * http://www.opensource.org/licenses/cddl1.txt.
10fcf3ce44SJohn Forte  * See the License for the specific language governing permissions
11fcf3ce44SJohn Forte  * and limitations under the License.
12fcf3ce44SJohn Forte  *
13fcf3ce44SJohn Forte  * When distributing Covered Code, include this CDDL HEADER in each
14fcf3ce44SJohn Forte  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15fcf3ce44SJohn Forte  * If applicable, add the following below this CDDL HEADER, with the
16fcf3ce44SJohn Forte  * fields enclosed by brackets "[]" replaced with your own identifying
17fcf3ce44SJohn Forte  * information: Portions Copyright [yyyy] [name of copyright owner]
18fcf3ce44SJohn Forte  *
19fcf3ce44SJohn Forte  * CDDL HEADER END
20fcf3ce44SJohn Forte  */
21fcf3ce44SJohn Forte 
22fcf3ce44SJohn Forte /*
238f23e9faSHans Rosenfeld  * Copyright (c) 2004-2011 Emulex. All rights reserved.
2482527734SSukumar Swaminathan  * Use is subject to license terms.
25*a3170057SPaul Winder  * Copyright 2020 RackTop Systems, Inc.
26fcf3ce44SJohn Forte  */
27fcf3ce44SJohn Forte 
28fcf3ce44SJohn Forte #ifndef _EMLXS_FCT_H
29fcf3ce44SJohn Forte #define	_EMLXS_FCT_H
30fcf3ce44SJohn Forte 
31fcf3ce44SJohn Forte #ifdef	__cplusplus
32fcf3ce44SJohn Forte extern "C" {
33fcf3ce44SJohn Forte #endif
34fcf3ce44SJohn Forte 
35fcf3ce44SJohn Forte #ifdef SFCT_SUPPORT
36fcf3ce44SJohn Forte 
37fcf3ce44SJohn Forte #include <sys/conf.h>
38fcf3ce44SJohn Forte #include <sys/ddi.h>
39fcf3ce44SJohn Forte #include <sys/stat.h>
40fcf3ce44SJohn Forte #include <sys/pci.h>
41fcf3ce44SJohn Forte #include <sys/sunddi.h>
42fcf3ce44SJohn Forte #include <sys/modctl.h>
43fcf3ce44SJohn Forte 
44fcf3ce44SJohn Forte #ifdef FC_WELL_KNOWN_ADDR
45fcf3ce44SJohn Forte #undef FC_WELL_KNOWN_ADDR
46291a2b48SSukumar Swaminathan #endif /* FC_WELL_KNOWN_ADDR */
47fcf3ce44SJohn Forte 
488f23e9faSHans Rosenfeld #include <sys/stmf.h>
498f23e9faSHans Rosenfeld #include <sys/fct.h>
50fcf3ce44SJohn Forte 
51fcf3ce44SJohn Forte #ifndef LINK_SPEED_8G
52291a2b48SSukumar Swaminathan #define	LINK_SPEED_8G		5
53291a2b48SSukumar Swaminathan #endif /* LINK_SPEED_8G */
54fcf3ce44SJohn Forte 
55fcf3ce44SJohn Forte #ifndef LINK_SPEED_10G
56291a2b48SSukumar Swaminathan #define	LINK_SPEED_10G		6
57291a2b48SSukumar Swaminathan #endif /* LINK_SPEED_10G */
58fcf3ce44SJohn Forte 
5982527734SSukumar Swaminathan #ifndef PORT_SPEED_10G
6082527734SSukumar Swaminathan #define	PORT_SPEED_10G		0x10
6182527734SSukumar Swaminathan #endif /* PORT_SPEED_10G */
6282527734SSukumar Swaminathan 
638f23e9faSHans Rosenfeld #ifndef PORT_SPEED_16G
648f23e9faSHans Rosenfeld #define	PORT_SPEED_16G		0x20
658f23e9faSHans Rosenfeld #endif /* PORT_SPEED_16G */
668f23e9faSHans Rosenfeld 
67*a3170057SPaul Winder #ifndef PORT_SPEED_32G
68*a3170057SPaul Winder #define	PORT_SPEED_32G		0x40
69*a3170057SPaul Winder #endif /* PORT_SPEED_32G */
70*a3170057SPaul Winder 
718f23e9faSHans Rosenfeld /*
728f23e9faSHans Rosenfeld  * Number of ports that do not require a valid cmd handle
738f23e9faSHans Rosenfeld  * because they will not be sending any IO, ELS cmds ONLY.
748f23e9faSHans Rosenfeld  */
758f23e9faSHans Rosenfeld #define	EMLXS_FCT_NUM_ELS_ONLY		8
768f23e9faSHans Rosenfeld 
77fcf3ce44SJohn Forte #ifndef MODSYM_SUPPORT
78fcf3ce44SJohn Forte #pragma weak fct_alloc
79fcf3ce44SJohn Forte #pragma weak fct_free
80fcf3ce44SJohn Forte #pragma weak fct_scsi_task_alloc
81fcf3ce44SJohn Forte #pragma weak fct_register_local_port
82fcf3ce44SJohn Forte #pragma weak fct_deregister_local_port
83fcf3ce44SJohn Forte #pragma weak fct_handle_event
84fcf3ce44SJohn Forte #pragma weak fct_post_rcvd_cmd
85fcf3ce44SJohn Forte #pragma weak fct_ctl
86291a2b48SSukumar Swaminathan #pragma weak fct_queue_cmd_for_termination
87fcf3ce44SJohn Forte #pragma weak fct_send_response_done
88fcf3ce44SJohn Forte #pragma weak fct_send_cmd_done
89fcf3ce44SJohn Forte #pragma weak fct_scsi_data_xfer_done
90fcf3ce44SJohn Forte #pragma weak fct_handle_rcvd_flogi
91fcf3ce44SJohn Forte #pragma weak fct_port_shutdown
92fcf3ce44SJohn Forte #pragma weak fct_port_initialize
93fcf3ce44SJohn Forte #pragma weak stmf_deregister_port_provider
94fcf3ce44SJohn Forte #pragma weak stmf_free
95fcf3ce44SJohn Forte #pragma weak stmf_alloc
96fcf3ce44SJohn Forte #pragma weak stmf_register_port_provider
97291a2b48SSukumar Swaminathan extern void* stmf_alloc();
98291a2b48SSukumar Swaminathan extern void* fct_alloc();
99291a2b48SSukumar Swaminathan #endif /* MODSYM_SUPPORT */
100fcf3ce44SJohn Forte 
101fcf3ce44SJohn Forte #endif	/* SFCT_SUPPORT */
102fcf3ce44SJohn Forte 
103fcf3ce44SJohn Forte #ifdef	__cplusplus
104fcf3ce44SJohn Forte }
105fcf3ce44SJohn Forte #endif
106fcf3ce44SJohn Forte 
107fcf3ce44SJohn Forte #endif	/* _EMLXS_FCT_H */
108