xref: /illumos-gate/usr/src/uts/common/io/qede/579xx/drivers/ecore/ecore_fcoe.h (revision 14b24e2b79293068c8e016a69ef1d872fb5e2fd5)
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, v.1,  (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://opensource.org/licenses/CDDL-1.0.
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 2014-2017 Cavium, Inc.
24 * The contents of this file are subject to the terms of the Common Development
25 * and Distribution License, v.1,  (the "License").
26 
27 * You may not use this file except in compliance with the License.
28 
29 * You can obtain a copy of the License at available
30 * at http://opensource.org/licenses/CDDL-1.0
31 
32 * See the License for the specific language governing permissions and
33 * limitations under the License.
34 */
35 
36 #ifndef __ECORE_FCOE_H__
37 #define __ECORE_FCOE_H__
38 
39 #include "ecore.h"
40 #include "ecore_chain.h"
41 #include "ecore_hsi_common.h"
42 #include "ecore_hsi_fcoe.h"
43 #include "ecore_fcoe_api.h"
44 
45 struct ecore_fcoe_info {
46 	osal_spinlock_t	lock;
47 	osal_list_t	free_list;
48 };
49 
50 enum _ecore_status_t ecore_fcoe_alloc(struct ecore_hwfn *p_hwfn);
51 
52 void ecore_fcoe_setup(struct ecore_hwfn *p_hwfn);
53 
54 void ecore_fcoe_free(struct ecore_hwfn *p_hwfn);
55 
56 enum _ecore_status_t
57 ecore_sp_fcoe_conn_offload(struct ecore_hwfn *p_hwfn,
58 			   struct ecore_fcoe_conn *p_conn,
59 			   enum spq_mode comp_mode,
60 			   struct ecore_spq_comp_cb *p_comp_addr);
61 
62 enum _ecore_status_t
63 ecore_sp_fcoe_conn_destroy(struct ecore_hwfn *p_hwfn,
64 			   struct ecore_fcoe_conn *p_conn,
65 			   enum spq_mode comp_mode,
66 			   struct ecore_spq_comp_cb *p_comp_addr);
67 
68 #endif  /*__ECORE_FCOE_H__*/
69 
70