.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
---|
1 | 2 | /* |
---|
2 | 3 | * 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. |
---|
8 | 4 | */ |
---|
9 | 5 | |
---|
10 | 6 | #ifndef __NCSI_PKT_H__ |
---|
.. | .. |
---|
149 | 145 | unsigned char mode; /* Flow control mode */ |
---|
150 | 146 | __be32 checksum; /* Checksum */ |
---|
151 | 147 | 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 */ |
---|
152 | 179 | }; |
---|
153 | 180 | |
---|
154 | 181 | /* Get Link Status */ |
---|
.. | .. |
---|
360 | 387 | #define NCSI_PKT_CMD_OEM 0x50 /* OEM */ |
---|
361 | 388 | #define NCSI_PKT_CMD_PLDM 0x51 /* PLDM request over NCSI over RBT */ |
---|
362 | 389 | #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 | + |
---|
363 | 393 | |
---|
364 | 394 | /* NCSI packet responses */ |
---|
365 | 395 | #define NCSI_PKT_RSP_CIS (NCSI_PKT_CMD_CIS + 0x80) |
---|
.. | .. |
---|
392 | 422 | #define NCSI_PKT_RSP_OEM (NCSI_PKT_CMD_OEM + 0x80) |
---|
393 | 423 | #define NCSI_PKT_RSP_PLDM (NCSI_PKT_CMD_PLDM + 0x80) |
---|
394 | 424 | #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) |
---|
395 | 427 | |
---|
396 | 428 | /* NCSI response code/reason */ |
---|
397 | 429 | #define NCSI_PKT_RSP_C_COMPLETED 0x0000 /* Command Completed */ |
---|