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.
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.
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]
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").
27 * You may not use this file except in compliance with the License.
29 * You can obtain a copy of the License at available
30 * at http://opensource.org/licenses/CDDL-1.0
32 * See the License for the specific language governing permissions and
33 * limitations under the License.
36 #ifndef __ECORE_ISCSI_H__
37 #define __ECORE_ISCSI_H__
40 #include "ecore_chain.h"
41 #include "ecore_hsi_common.h"
42 #include "tcp_common.h"
43 #include "ecore_hsi_iscsi.h"
44 #include "ecore_sp_commands.h"
45 #include "ecore_iscsi_api.h"
47 struct ecore_iscsi_info
{
49 osal_list_t free_list
;
50 u16 max_num_outstanding_tasks
;
52 iscsi_event_cb_t event_cb
;
55 enum _ecore_status_t
ecore_iscsi_alloc(struct ecore_hwfn
*p_hwfn
);
57 void ecore_iscsi_setup(struct ecore_hwfn
*p_hwfn
);
59 void ecore_iscsi_free(struct ecore_hwfn
*p_hwfn
);
61 void ecore_iscsi_free_connection(struct ecore_hwfn
*p_hwfn
,
62 struct ecore_iscsi_conn
*p_conn
);
65 * @brief ecore_sp_iscsi_conn_offload - iSCSI connection offload
67 * This ramrod offloads iSCSI connection to FW
74 * @return enum _ecore_status_t
77 ecore_sp_iscsi_conn_offload(struct ecore_hwfn
*p_hwfn
,
78 struct ecore_iscsi_conn
*p_conn
,
79 enum spq_mode comp_mode
,
80 struct ecore_spq_comp_cb
*p_comp_addr
);
83 * @brief ecore_sp_iscsi_conn_update - iSCSI connection update
85 * This ramrod updatess iSCSI ofloadedconnection in FW
92 * @return enum _ecore_status_t
95 ecore_sp_iscsi_conn_update(struct ecore_hwfn
*p_hwfn
,
96 struct ecore_iscsi_conn
*p_conn
,
97 enum spq_mode comp_mode
,
98 struct ecore_spq_comp_cb
*p_comp_addr
);
101 * @brief ecore_sp_iscsi_mac_update - iSCSI connection's MAC update
103 * This ramrod updates remote MAC for iSCSI offloaded connection in FW
110 * @return enum _ecore_status_t
113 ecore_sp_iscsi_mac_update(struct ecore_hwfn
*p_hwfn
,
114 struct ecore_iscsi_conn
*p_conn
,
115 enum spq_mode comp_mode
,
116 struct ecore_spq_comp_cb
*p_comp_addr
);
119 * @brief ecore_sp_iscsi_conn_terminate - iSCSI connection
122 * This ramrod deletes iSCSI offloaded connection in FW
129 * @return enum _ecore_status_t
132 ecore_sp_iscsi_conn_terminate(struct ecore_hwfn
*p_hwfn
,
133 struct ecore_iscsi_conn
*p_conn
,
134 enum spq_mode comp_mode
,
135 struct ecore_spq_comp_cb
*p_comp_addr
);
138 * @brief ecore_sp_iscsi_conn_clear_sq - iSCSI connection
141 * This ramrod clears connection's SQ in FW
148 * @return enum _ecore_status_t
151 ecore_sp_iscsi_conn_clear_sq(struct ecore_hwfn
*p_hwfn
,
152 struct ecore_iscsi_conn
*p_conn
,
153 enum spq_mode comp_mode
,
154 struct ecore_spq_comp_cb
*p_comp_addr
);
156 #endif /*__ECORE_ISCSI_H__*/