hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/include/linux/qed/iscsi_common.h
....@@ -1,33 +1,7 @@
1
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
12 /* QLogic qed NIC Driver
23 * Copyright (c) 2015-2017 QLogic Corporation
3
- *
4
- * This software is available to you under a choice of one of two
5
- * licenses. You may choose to be licensed under the terms of the GNU
6
- * General Public License (GPL) Version 2, available from the file
7
- * COPYING in the main directory of this source tree, or the
8
- * OpenIB.org BSD license below:
9
- *
10
- * Redistribution and use in source and binary forms, with or
11
- * without modification, are permitted provided that the following
12
- * conditions are met:
13
- *
14
- * - Redistributions of source code must retain the above
15
- * copyright notice, this list of conditions and the following
16
- * disclaimer.
17
- *
18
- * - Redistributions in binary form must reproduce the above
19
- * copyright notice, this list of conditions and the following
20
- * disclaimer in the documentation and /or other materials
21
- * provided with the distribution.
22
- *
23
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
- * SOFTWARE.
4
+ * Copyright (c) 2019-2020 Marvell International Ltd.
315 */
326
337 #ifndef __ISCSI_COMMON__
....@@ -896,7 +870,7 @@
896870 __le32 exp_cont_len;
897871 __le32 total_data_acked;
898872 __le32 exp_data_acked;
899
- u8 next_tid_valid;
873
+ u8 byte2;
900874 u8 byte3;
901875 __le16 word1;
902876 __le16 next_tid;
....@@ -999,7 +973,6 @@
999973 struct regpair r2tq_pbl_addr;
1000974 struct regpair xhq_pbl_addr;
1001975 struct regpair uhq_pbl_addr;
1002
- __le32 initial_ack;
1003976 __le16 physical_q0;
1004977 __le16 physical_q1;
1005978 u8 flags;
....@@ -1011,10 +984,10 @@
1011984 #define ISCSI_CONN_OFFLOAD_PARAMS_RESTRICTED_MODE_SHIFT 2
1012985 #define ISCSI_CONN_OFFLOAD_PARAMS_RESERVED1_MASK 0x1F
1013986 #define ISCSI_CONN_OFFLOAD_PARAMS_RESERVED1_SHIFT 3
1014
- u8 pbl_page_size_log;
1015
- u8 pbe_page_size_log;
1016987 u8 default_cq;
988
+ __le16 reserved0;
1017989 __le32 stat_sn;
990
+ __le32 initial_ack;
1018991 };
1019992
1020993 /* iSCSI connection statistics */
....@@ -1029,25 +1002,14 @@
10291002 __le32 reserved;
10301003 };
10311004
1032
-/* spe message header */
1033
-struct iscsi_slow_path_hdr {
1034
- u8 op_code;
1035
- u8 flags;
1036
-#define ISCSI_SLOW_PATH_HDR_RESERVED0_MASK 0xF
1037
-#define ISCSI_SLOW_PATH_HDR_RESERVED0_SHIFT 0
1038
-#define ISCSI_SLOW_PATH_HDR_LAYER_CODE_MASK 0x7
1039
-#define ISCSI_SLOW_PATH_HDR_LAYER_CODE_SHIFT 4
1040
-#define ISCSI_SLOW_PATH_HDR_RESERVED1_MASK 0x1
1041
-#define ISCSI_SLOW_PATH_HDR_RESERVED1_SHIFT 7
1042
-};
10431005
10441006 /* iSCSI connection update params passed by driver to FW in ISCSI update
10451007 *ramrod.
10461008 */
10471009 struct iscsi_conn_update_ramrod_params {
1048
- struct iscsi_slow_path_hdr hdr;
1010
+ __le16 reserved0;
10491011 __le16 conn_id;
1050
- __le32 fw_cid;
1012
+ __le32 reserved1;
10511013 u8 flags;
10521014 #define ISCSI_CONN_UPDATE_RAMROD_PARAMS_HD_EN_MASK 0x1
10531015 #define ISCSI_CONN_UPDATE_RAMROD_PARAMS_HD_EN_SHIFT 0
....@@ -1065,7 +1027,7 @@
10651027 #define ISCSI_CONN_UPDATE_RAMROD_PARAMS_DIF_ON_IMM_EN_SHIFT 6
10661028 #define ISCSI_CONN_UPDATE_RAMROD_PARAMS_LUN_MAPPER_EN_MASK 0x1
10671029 #define ISCSI_CONN_UPDATE_RAMROD_PARAMS_LUN_MAPPER_EN_SHIFT 7
1068
- u8 reserved0[3];
1030
+ u8 reserved3[3];
10691031 __le32 max_seq_size;
10701032 __le32 max_send_pdu_length;
10711033 __le32 max_recv_pdu_length;
....@@ -1251,22 +1213,22 @@
12511213
12521214 /* iSCSI connection termination request */
12531215 struct iscsi_spe_conn_mac_update {
1254
- struct iscsi_slow_path_hdr hdr;
1216
+ __le16 reserved0;
12551217 __le16 conn_id;
1256
- __le32 fw_cid;
1218
+ __le32 reserved1;
12571219 __le16 remote_mac_addr_lo;
12581220 __le16 remote_mac_addr_mid;
12591221 __le16 remote_mac_addr_hi;
1260
- u8 reserved0[2];
1222
+ u8 reserved2[2];
12611223 };
12621224
12631225 /* iSCSI and TCP connection (Option 1) offload params passed by driver to FW in
12641226 * iSCSI offload ramrod.
12651227 */
12661228 struct iscsi_spe_conn_offload {
1267
- struct iscsi_slow_path_hdr hdr;
1229
+ __le16 reserved0;
12681230 __le16 conn_id;
1269
- __le32 fw_cid;
1231
+ __le32 reserved1;
12701232 struct iscsi_conn_offload_params iscsi;
12711233 struct tcp_offload_params tcp;
12721234 };
....@@ -1275,44 +1237,36 @@
12751237 * iSCSI offload ramrod.
12761238 */
12771239 struct iscsi_spe_conn_offload_option2 {
1278
- struct iscsi_slow_path_hdr hdr;
1240
+ __le16 reserved0;
12791241 __le16 conn_id;
1280
- __le32 fw_cid;
1242
+ __le32 reserved1;
12811243 struct iscsi_conn_offload_params iscsi;
12821244 struct tcp_offload_params_opt2 tcp;
12831245 };
12841246
12851247 /* iSCSI collect connection statistics request */
12861248 struct iscsi_spe_conn_statistics {
1287
- struct iscsi_slow_path_hdr hdr;
1249
+ __le16 reserved0;
12881250 __le16 conn_id;
1289
- __le32 fw_cid;
1251
+ __le32 reserved1;
12901252 u8 reset_stats;
1291
- u8 reserved0[7];
1253
+ u8 reserved2[7];
12921254 struct regpair stats_cnts_addr;
12931255 };
12941256
12951257 /* iSCSI connection termination request */
12961258 struct iscsi_spe_conn_termination {
1297
- struct iscsi_slow_path_hdr hdr;
1259
+ __le16 reserved0;
12981260 __le16 conn_id;
1299
- __le32 fw_cid;
1261
+ __le32 reserved1;
13001262 u8 abortive;
1301
- u8 reserved0[7];
1263
+ u8 reserved2[7];
13021264 struct regpair queue_cnts_addr;
13031265 struct regpair query_params_addr;
13041266 };
13051267
1306
-/* iSCSI firmware function destroy parameters */
1307
-struct iscsi_spe_func_dstry {
1308
- struct iscsi_slow_path_hdr hdr;
1309
- __le16 reserved0;
1310
- __le32 reserved1;
1311
-};
1312
-
13131268 /* iSCSI firmware function init parameters */
13141269 struct iscsi_spe_func_init {
1315
- struct iscsi_slow_path_hdr hdr;
13161270 __le16 half_way_close_timeout;
13171271 u8 num_sq_pages_in_ring;
13181272 u8 num_r2tq_pages_in_ring;
....@@ -1324,8 +1278,12 @@
13241278 #define ISCSI_SPE_FUNC_INIT_RESERVED0_MASK 0x7F
13251279 #define ISCSI_SPE_FUNC_INIT_RESERVED0_SHIFT 1
13261280 struct iscsi_debug_modes debug_mode;
1327
- __le16 reserved1;
1328
- __le32 reserved2;
1281
+ u8 params;
1282
+#define ISCSI_SPE_FUNC_INIT_MAX_SYN_RT_MASK 0xF
1283
+#define ISCSI_SPE_FUNC_INIT_MAX_SYN_RT_SHIFT 0
1284
+#define ISCSI_SPE_FUNC_INIT_RESERVED1_MASK 0xF
1285
+#define ISCSI_SPE_FUNC_INIT_RESERVED1_SHIFT 4
1286
+ u8 reserved2[7];
13291287 struct scsi_init_func_params func_params;
13301288 struct scsi_init_func_queues q_params;
13311289 };