9506 Want support for QLogic QL41000/45000 series devices
[unleashed.git] / usr / src / uts / common / io / qede / 579xx / drivers / ecore / ecore_iscsi.h
blob3581669f4a558345ebeb18a09c727b89cbc3aa84
1 /*
2 * CDDL HEADER START
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]
19 * CDDL HEADER END
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__
39 #include "ecore.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 {
48 osal_spinlock_t lock;
49 osal_list_t free_list;
50 u16 max_num_outstanding_tasks;
51 void *event_context;
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);
64 /**
65 * @brief ecore_sp_iscsi_conn_offload - iSCSI connection offload
67 * This ramrod offloads iSCSI connection to FW
69 * @param p_path
70 * @param p_conn
71 * @param comp_mode
72 * @param comp_addr
74 * @return enum _ecore_status_t
76 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);
82 /**
83 * @brief ecore_sp_iscsi_conn_update - iSCSI connection update
85 * This ramrod updatess iSCSI ofloadedconnection in FW
87 * @param p_path
88 * @param p_conn
89 * @param comp_mode
90 * @param comp_addr
92 * @return enum _ecore_status_t
94 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
105 * @param p_path
106 * @param p_conn
107 * @param comp_mode
108 * @param comp_addr
110 * @return enum _ecore_status_t
112 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
120 * terminate
122 * This ramrod deletes iSCSI offloaded connection in FW
124 * @param p_path
125 * @param p_conn
126 * @param comp_mode
127 * @param comp_addr
129 * @return enum _ecore_status_t
131 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
139 * clear SQ
141 * This ramrod clears connection's SQ in FW
143 * @param p_path
144 * @param p_conn
145 * @param comp_mode
146 * @param comp_addr
148 * @return enum _ecore_status_t
150 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__*/