hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/net/ncsi/ncsi-pkt.h
....@@ -1,10 +1,6 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * Copyright Gavin Shan, IBM Corporation 2016.
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License as published by
6
- * the Free Software Foundation; either version 2 of the License, or
7
- * (at your option) any later version.
84 */
95
106 #ifndef __NCSI_PKT_H__
....@@ -149,6 +145,37 @@
149145 unsigned char mode; /* Flow control mode */
150146 __be32 checksum; /* Checksum */
151147 unsigned char pad[22];
148
+};
149
+
150
+/* OEM Request Command as per NCSI Specification */
151
+struct ncsi_cmd_oem_pkt {
152
+ struct ncsi_cmd_pkt_hdr cmd; /* Command header */
153
+ __be32 mfr_id; /* Manufacture ID */
154
+ unsigned char data[]; /* OEM Payload Data */
155
+};
156
+
157
+/* OEM Response Packet as per NCSI Specification */
158
+struct ncsi_rsp_oem_pkt {
159
+ struct ncsi_rsp_pkt_hdr rsp; /* Command header */
160
+ __be32 mfr_id; /* Manufacture ID */
161
+ unsigned char data[]; /* Payload data */
162
+};
163
+
164
+/* Mellanox Response Data */
165
+struct ncsi_rsp_oem_mlx_pkt {
166
+ unsigned char cmd_rev; /* Command Revision */
167
+ unsigned char cmd; /* Command ID */
168
+ unsigned char param; /* Parameter */
169
+ unsigned char optional; /* Optional data */
170
+ unsigned char data[]; /* Data */
171
+};
172
+
173
+/* Broadcom Response Data */
174
+struct ncsi_rsp_oem_bcm_pkt {
175
+ unsigned char ver; /* Payload Version */
176
+ unsigned char type; /* OEM Command type */
177
+ __be16 len; /* Payload Length */
178
+ unsigned char data[]; /* Cmd specific Data */
152179 };
153180
154181 /* Get Link Status */
....@@ -360,6 +387,9 @@
360387 #define NCSI_PKT_CMD_OEM 0x50 /* OEM */
361388 #define NCSI_PKT_CMD_PLDM 0x51 /* PLDM request over NCSI over RBT */
362389 #define NCSI_PKT_CMD_GPUUID 0x52 /* Get package UUID */
390
+#define NCSI_PKT_CMD_QPNPR 0x56 /* Query Pending NC PLDM request */
391
+#define NCSI_PKT_CMD_SNPR 0x57 /* Send NC PLDM Reply */
392
+
363393
364394 /* NCSI packet responses */
365395 #define NCSI_PKT_RSP_CIS (NCSI_PKT_CMD_CIS + 0x80)
....@@ -392,6 +422,8 @@
392422 #define NCSI_PKT_RSP_OEM (NCSI_PKT_CMD_OEM + 0x80)
393423 #define NCSI_PKT_RSP_PLDM (NCSI_PKT_CMD_PLDM + 0x80)
394424 #define NCSI_PKT_RSP_GPUUID (NCSI_PKT_CMD_GPUUID + 0x80)
425
+#define NCSI_PKT_RSP_QPNPR (NCSI_PKT_CMD_QPNPR + 0x80)
426
+#define NCSI_PKT_RSP_SNPR (NCSI_PKT_CMD_SNPR + 0x80)
395427
396428 /* NCSI response code/reason */
397429 #define NCSI_PKT_RSP_C_COMPLETED 0x0000 /* Command Completed */