1/* SPDX-License-Identifier: GPL-2.0-only */ 2/**************************************************************************** 3 * Driver for Solarflare network controllers and boards 4 * Copyright 2009-2018 Solarflare Communications Inc. 5 * Copyright 2019-2020 Xilinx Inc. 6 */ 7 8 9#ifndef MCDI_PCOL_H 10#define MCDI_PCOL_H 11 12/* Values to be written into FMCR_CZ_RESET_STATE_REG to control boot. */ 13/* Power-on reset state */ 14#define MC_FW_STATE_POR (1) 15/* If this is set in MC_RESET_STATE_REG then it should be 16 * possible to jump into IMEM without loading code from flash. */ 17#define MC_FW_WARM_BOOT_OK (2) 18/* The MC main image has started to boot. */ 19#define MC_FW_STATE_BOOTING (4) 20/* The Scheduler has started. */ 21#define MC_FW_STATE_SCHED (8) 22/* If this is set in MC_RESET_STATE_REG then it should be 23 * possible to jump into IMEM without loading code from flash. 24 * Unlike a warm boot, assume DMEM has been reloaded, so that 25 * the MC persistent data must be reinitialised. */ 26#define MC_FW_TEPID_BOOT_OK (16) 27/* We have entered the main firmware via recovery mode. This 28 * means that MC persistent data must be reinitialised, but that 29 * we shouldn't touch PCIe config. */ 30#define MC_FW_RECOVERY_MODE_PCIE_INIT_OK (32) 31/* BIST state has been initialized */ 32#define MC_FW_BIST_INIT_OK (128) 33 34/* Siena MC shared memmory offsets */ 35/* The 'doorbell' addresses are hard-wired to alert the MC when written */ 36#define MC_SMEM_P0_DOORBELL_OFST 0x000 37#define MC_SMEM_P1_DOORBELL_OFST 0x004 38/* The rest of these are firmware-defined */ 39#define MC_SMEM_P0_PDU_OFST 0x008 40#define MC_SMEM_P1_PDU_OFST 0x108 41#define MC_SMEM_PDU_LEN 0x100 42#define MC_SMEM_P0_PTP_TIME_OFST 0x7f0 43#define MC_SMEM_P0_STATUS_OFST 0x7f8 44#define MC_SMEM_P1_STATUS_OFST 0x7fc 45 46/* Values to be written to the per-port status dword in shared 47 * memory on reboot and assert */ 48#define MC_STATUS_DWORD_REBOOT (0xb007b007) 49#define MC_STATUS_DWORD_ASSERT (0xdeaddead) 50 51/* Check whether an mcfw version (in host order) belongs to a bootloader */ 52#define MC_FW_VERSION_IS_BOOTLOADER(_v) (((_v) >> 16) == 0xb007) 53 54/* The current version of the MCDI protocol. 55 * 56 * Note that the ROM burnt into the card only talks V0, so at the very 57 * least every driver must support version 0 and MCDI_PCOL_VERSION 58 */ 59#define MCDI_PCOL_VERSION 2 60 61/* Unused commands: 0x23, 0x27, 0x30, 0x31 */ 62 63/* MCDI version 1 64 * 65 * Each MCDI request starts with an MCDI_HEADER, which is a 32bit 66 * structure, filled in by the client. 67 * 68 * 0 7 8 16 20 22 23 24 31 69 * | CODE | R | LEN | SEQ | Rsvd | E | R | XFLAGS | 70 * | | | 71 * | | \--- Response 72 * | \------- Error 73 * \------------------------------ Resync (always set) 74 * 75 * The client writes it's request into MC shared memory, and rings the 76 * doorbell. Each request is completed by either by the MC writting 77 * back into shared memory, or by writting out an event. 78 * 79 * All MCDI commands support completion by shared memory response. Each 80 * request may also contain additional data (accounted for by HEADER.LEN), 81 * and some response's may also contain additional data (again, accounted 82 * for by HEADER.LEN). 83 * 84 * Some MCDI commands support completion by event, in which any associated 85 * response data is included in the event. 86 * 87 * The protocol requires one response to be delivered for every request, a 88 * request should not be sent unless the response for the previous request 89 * has been received (either by polling shared memory, or by receiving 90 * an event). 91 */ 92 93/** Request/Response structure */ 94#define MCDI_HEADER_OFST 0 95#define MCDI_HEADER_CODE_LBN 0 96#define MCDI_HEADER_CODE_WIDTH 7 97#define MCDI_HEADER_RESYNC_LBN 7 98#define MCDI_HEADER_RESYNC_WIDTH 1 99#define MCDI_HEADER_DATALEN_LBN 8 100#define MCDI_HEADER_DATALEN_WIDTH 8 101#define MCDI_HEADER_SEQ_LBN 16 102#define MCDI_HEADER_SEQ_WIDTH 4 103#define MCDI_HEADER_RSVD_LBN 20 104#define MCDI_HEADER_RSVD_WIDTH 1 105#define MCDI_HEADER_NOT_EPOCH_LBN 21 106#define MCDI_HEADER_NOT_EPOCH_WIDTH 1 107#define MCDI_HEADER_ERROR_LBN 22 108#define MCDI_HEADER_ERROR_WIDTH 1 109#define MCDI_HEADER_RESPONSE_LBN 23 110#define MCDI_HEADER_RESPONSE_WIDTH 1 111#define MCDI_HEADER_XFLAGS_LBN 24 112#define MCDI_HEADER_XFLAGS_WIDTH 8 113/* Request response using event */ 114#define MCDI_HEADER_XFLAGS_EVREQ 0x01 115/* Request (and signal) early doorbell return */ 116#define MCDI_HEADER_XFLAGS_DBRET 0x02 117 118/* Maximum number of payload bytes */ 119#define MCDI_CTL_SDU_LEN_MAX_V1 0xfc 120#define MCDI_CTL_SDU_LEN_MAX_V2 0x400 121 122#define MCDI_CTL_SDU_LEN_MAX MCDI_CTL_SDU_LEN_MAX_V2 123 124 125/* The MC can generate events for two reasons: 126 * - To advance a shared memory request if XFLAGS_EVREQ was set 127 * - As a notification (link state, i2c event), controlled 128 * via MC_CMD_LOG_CTRL 129 * 130 * Both events share a common structure: 131 * 132 * 0 32 33 36 44 52 60 133 * | Data | Cont | Level | Src | Code | Rsvd | 134 * | 135 * \ There is another event pending in this notification 136 * 137 * If Code==CMDDONE, then the fields are further interpreted as: 138 * 139 * - LEVEL==INFO Command succeeded 140 * - LEVEL==ERR Command failed 141 * 142 * 0 8 16 24 32 143 * | Seq | Datalen | Errno | Rsvd | 144 * 145 * These fields are taken directly out of the standard MCDI header, i.e., 146 * LEVEL==ERR, Datalen == 0 => Reboot 147 * 148 * Events can be squirted out of the UART (using LOG_CTRL) without a 149 * MCDI header. An event can be distinguished from a MCDI response by 150 * examining the first byte which is 0xc0. This corresponds to the 151 * non-existent MCDI command MC_CMD_DEBUG_LOG. 152 * 153 * 0 7 8 154 * | command | Resync | = 0xc0 155 * 156 * Since the event is written in big-endian byte order, this works 157 * providing bits 56-63 of the event are 0xc0. 158 * 159 * 56 60 63 160 * | Rsvd | Code | = 0xc0 161 * 162 * Which means for convenience the event code is 0xc for all MC 163 * generated events. 164 */ 165#define FSE_AZ_EV_CODE_MCDI_EVRESPONSE 0xc 166 167 168/* Operation not permitted. */ 169#define MC_CMD_ERR_EPERM 1 170/* Non-existent command target */ 171#define MC_CMD_ERR_ENOENT 2 172/* assert() has killed the MC */ 173#define MC_CMD_ERR_EINTR 4 174/* I/O failure */ 175#define MC_CMD_ERR_EIO 5 176/* Already exists */ 177#define MC_CMD_ERR_EEXIST 6 178/* Try again */ 179#define MC_CMD_ERR_EAGAIN 11 180/* Out of memory */ 181#define MC_CMD_ERR_ENOMEM 12 182/* Caller does not hold required locks */ 183#define MC_CMD_ERR_EACCES 13 184/* Resource is currently unavailable (e.g. lock contention) */ 185#define MC_CMD_ERR_EBUSY 16 186/* No such device */ 187#define MC_CMD_ERR_ENODEV 19 188/* Invalid argument to target */ 189#define MC_CMD_ERR_EINVAL 22 190/* Broken pipe */ 191#define MC_CMD_ERR_EPIPE 32 192/* Read-only */ 193#define MC_CMD_ERR_EROFS 30 194/* Out of range */ 195#define MC_CMD_ERR_ERANGE 34 196/* Non-recursive resource is already acquired */ 197#define MC_CMD_ERR_EDEADLK 35 198/* Operation not implemented */ 199#define MC_CMD_ERR_ENOSYS 38 200/* Operation timed out */ 201#define MC_CMD_ERR_ETIME 62 202/* Link has been severed */ 203#define MC_CMD_ERR_ENOLINK 67 204/* Protocol error */ 205#define MC_CMD_ERR_EPROTO 71 206/* Operation not supported */ 207#define MC_CMD_ERR_ENOTSUP 95 208/* Address not available */ 209#define MC_CMD_ERR_EADDRNOTAVAIL 99 210/* Not connected */ 211#define MC_CMD_ERR_ENOTCONN 107 212/* Operation already in progress */ 213#define MC_CMD_ERR_EALREADY 114 214 215/* Resource allocation failed. */ 216#define MC_CMD_ERR_ALLOC_FAIL 0x1000 217/* V-adaptor not found. */ 218#define MC_CMD_ERR_NO_VADAPTOR 0x1001 219/* EVB port not found. */ 220#define MC_CMD_ERR_NO_EVB_PORT 0x1002 221/* V-switch not found. */ 222#define MC_CMD_ERR_NO_VSWITCH 0x1003 223/* Too many VLAN tags. */ 224#define MC_CMD_ERR_VLAN_LIMIT 0x1004 225/* Bad PCI function number. */ 226#define MC_CMD_ERR_BAD_PCI_FUNC 0x1005 227/* Invalid VLAN mode. */ 228#define MC_CMD_ERR_BAD_VLAN_MODE 0x1006 229/* Invalid v-switch type. */ 230#define MC_CMD_ERR_BAD_VSWITCH_TYPE 0x1007 231/* Invalid v-port type. */ 232#define MC_CMD_ERR_BAD_VPORT_TYPE 0x1008 233/* MAC address exists. */ 234#define MC_CMD_ERR_MAC_EXIST 0x1009 235/* Slave core not present */ 236#define MC_CMD_ERR_SLAVE_NOT_PRESENT 0x100a 237/* The datapath is disabled. */ 238#define MC_CMD_ERR_DATAPATH_DISABLED 0x100b 239/* The requesting client is not a function */ 240#define MC_CMD_ERR_CLIENT_NOT_FN 0x100c 241/* The requested operation might require the 242 command to be passed between MCs, and the 243 transport doesn't support that. Should 244 only ever been seen over the UART. */ 245#define MC_CMD_ERR_TRANSPORT_NOPROXY 0x100d 246/* VLAN tag(s) exists */ 247#define MC_CMD_ERR_VLAN_EXIST 0x100e 248/* No MAC address assigned to an EVB port */ 249#define MC_CMD_ERR_NO_MAC_ADDR 0x100f 250/* Notifies the driver that the request has been relayed 251 * to an admin function for authorization. The driver should 252 * wait for a PROXY_RESPONSE event and then resend its request. 253 * This error code is followed by a 32-bit handle that 254 * helps matching it with the respective PROXY_RESPONSE event. */ 255#define MC_CMD_ERR_PROXY_PENDING 0x1010 256#define MC_CMD_ERR_PROXY_PENDING_HANDLE_OFST 4 257/* The request cannot be passed for authorization because 258 * another request from the same function is currently being 259 * authorized. The drvier should try again later. */ 260#define MC_CMD_ERR_PROXY_INPROGRESS 0x1011 261/* Returned by MC_CMD_PROXY_COMPLETE if the caller is not the function 262 * that has enabled proxying or BLOCK_INDEX points to a function that 263 * doesn't await an authorization. */ 264#define MC_CMD_ERR_PROXY_UNEXPECTED 0x1012 265/* This code is currently only used internally in FW. Its meaning is that 266 * an operation failed due to lack of SR-IOV privilege. 267 * Normally it is translated to EPERM by send_cmd_err(), 268 * but it may also be used to trigger some special mechanism 269 * for handling such case, e.g. to relay the failed request 270 * to a designated admin function for authorization. */ 271#define MC_CMD_ERR_NO_PRIVILEGE 0x1013 272/* Workaround 26807 could not be turned on/off because some functions 273 * have already installed filters. See the comment at 274 * MC_CMD_WORKAROUND_BUG26807. 275 * May also returned for other operations such as sub-variant switching. */ 276#define MC_CMD_ERR_FILTERS_PRESENT 0x1014 277/* The clock whose frequency you've attempted to set set 278 * doesn't exist on this NIC */ 279#define MC_CMD_ERR_NO_CLOCK 0x1015 280/* Returned by MC_CMD_TESTASSERT if the action that should 281 * have caused an assertion failed to do so. */ 282#define MC_CMD_ERR_UNREACHABLE 0x1016 283/* This command needs to be processed in the background but there were no 284 * resources to do so. Send it again after a command has completed. */ 285#define MC_CMD_ERR_QUEUE_FULL 0x1017 286/* The operation could not be completed because the PCIe link has gone 287 * away. This error code is never expected to be returned over the TLP 288 * transport. */ 289#define MC_CMD_ERR_NO_PCIE 0x1018 290/* The operation could not be completed because the datapath has gone 291 * away. This is distinct from MC_CMD_ERR_DATAPATH_DISABLED in that the 292 * datapath absence may be temporary*/ 293#define MC_CMD_ERR_NO_DATAPATH 0x1019 294/* The operation could not complete because some VIs are allocated */ 295#define MC_CMD_ERR_VIS_PRESENT 0x101a 296/* The operation could not complete because some PIO buffers are allocated */ 297#define MC_CMD_ERR_PIOBUFS_PRESENT 0x101b 298 299#define MC_CMD_ERR_CODE_OFST 0 300 301/* We define 8 "escape" commands to allow 302 for command number space extension */ 303 304#define MC_CMD_CMD_SPACE_ESCAPE_0 0x78 305#define MC_CMD_CMD_SPACE_ESCAPE_1 0x79 306#define MC_CMD_CMD_SPACE_ESCAPE_2 0x7A 307#define MC_CMD_CMD_SPACE_ESCAPE_3 0x7B 308#define MC_CMD_CMD_SPACE_ESCAPE_4 0x7C 309#define MC_CMD_CMD_SPACE_ESCAPE_5 0x7D 310#define MC_CMD_CMD_SPACE_ESCAPE_6 0x7E 311#define MC_CMD_CMD_SPACE_ESCAPE_7 0x7F 312 313/* Vectors in the boot ROM */ 314/* Point to the copycode entry point. */ 315#define SIENA_MC_BOOTROM_COPYCODE_VEC (0x800 - 3 * 0x4) 316#define HUNT_MC_BOOTROM_COPYCODE_VEC (0x8000 - 3 * 0x4) 317#define MEDFORD_MC_BOOTROM_COPYCODE_VEC (0x10000 - 3 * 0x4) 318/* Points to the recovery mode entry point. Misnamed but kept for compatibility. */ 319#define SIENA_MC_BOOTROM_NOFLASH_VEC (0x800 - 2 * 0x4) 320#define HUNT_MC_BOOTROM_NOFLASH_VEC (0x8000 - 2 * 0x4) 321#define MEDFORD_MC_BOOTROM_NOFLASH_VEC (0x10000 - 2 * 0x4) 322/* Points to the recovery mode entry point. Same as above, but the right name. */ 323#define SIENA_MC_BOOTROM_RECOVERY_VEC (0x800 - 2 * 0x4) 324#define HUNT_MC_BOOTROM_RECOVERY_VEC (0x8000 - 2 * 0x4) 325#define MEDFORD_MC_BOOTROM_RECOVERY_VEC (0x10000 - 2 * 0x4) 326 327/* Points to noflash mode entry point. */ 328#define MEDFORD_MC_BOOTROM_REAL_NOFLASH_VEC (0x10000 - 4 * 0x4) 329 330/* The command set exported by the boot ROM (MCDI v0) */ 331#define MC_CMD_GET_VERSION_V0_SUPPORTED_FUNCS { \ 332 (1 << MC_CMD_READ32) | \ 333 (1 << MC_CMD_WRITE32) | \ 334 (1 << MC_CMD_COPYCODE) | \ 335 (1 << MC_CMD_GET_VERSION), \ 336 0, 0, 0 } 337 338#define MC_CMD_SENSOR_INFO_OUT_OFFSET_OFST(_x) \ 339 (MC_CMD_SENSOR_ENTRY_OFST + (_x)) 340 341#define MC_CMD_DBI_WRITE_IN_ADDRESS_OFST(n) \ 342 (MC_CMD_DBI_WRITE_IN_DBIWROP_OFST + \ 343 MC_CMD_DBIWROP_TYPEDEF_ADDRESS_OFST + \ 344 (n) * MC_CMD_DBIWROP_TYPEDEF_LEN) 345 346#define MC_CMD_DBI_WRITE_IN_BYTE_MASK_OFST(n) \ 347 (MC_CMD_DBI_WRITE_IN_DBIWROP_OFST + \ 348 MC_CMD_DBIWROP_TYPEDEF_BYTE_MASK_OFST + \ 349 (n) * MC_CMD_DBIWROP_TYPEDEF_LEN) 350 351#define MC_CMD_DBI_WRITE_IN_VALUE_OFST(n) \ 352 (MC_CMD_DBI_WRITE_IN_DBIWROP_OFST + \ 353 MC_CMD_DBIWROP_TYPEDEF_VALUE_OFST + \ 354 (n) * MC_CMD_DBIWROP_TYPEDEF_LEN) 355 356/* This may be ORed with an EVB_PORT_ID_xxx constant to pass a non-default 357 * stack ID (which must be in the range 1-255) along with an EVB port ID. 358 */ 359#define EVB_STACK_ID(n) (((n) & 0xff) << 16) 360 361 362/* Version 2 adds an optional argument to error returns: the errno value 363 * may be followed by the (0-based) number of the first argument that 364 * could not be processed. 365 */ 366#define MC_CMD_ERR_ARG_OFST 4 367 368/* No space */ 369#define MC_CMD_ERR_ENOSPC 28 370 371/* MCDI_EVENT structuredef */ 372#define MCDI_EVENT_LEN 8 373#define MCDI_EVENT_CONT_LBN 32 374#define MCDI_EVENT_CONT_WIDTH 1 375#define MCDI_EVENT_LEVEL_LBN 33 376#define MCDI_EVENT_LEVEL_WIDTH 3 377/* enum: Info. */ 378#define MCDI_EVENT_LEVEL_INFO 0x0 379/* enum: Warning. */ 380#define MCDI_EVENT_LEVEL_WARN 0x1 381/* enum: Error. */ 382#define MCDI_EVENT_LEVEL_ERR 0x2 383/* enum: Fatal. */ 384#define MCDI_EVENT_LEVEL_FATAL 0x3 385#define MCDI_EVENT_DATA_OFST 0 386#define MCDI_EVENT_DATA_LEN 4 387#define MCDI_EVENT_CMDDONE_SEQ_OFST 0 388#define MCDI_EVENT_CMDDONE_SEQ_LBN 0 389#define MCDI_EVENT_CMDDONE_SEQ_WIDTH 8 390#define MCDI_EVENT_CMDDONE_DATALEN_OFST 0 391#define MCDI_EVENT_CMDDONE_DATALEN_LBN 8 392#define MCDI_EVENT_CMDDONE_DATALEN_WIDTH 8 393#define MCDI_EVENT_CMDDONE_ERRNO_OFST 0 394#define MCDI_EVENT_CMDDONE_ERRNO_LBN 16 395#define MCDI_EVENT_CMDDONE_ERRNO_WIDTH 8 396#define MCDI_EVENT_LINKCHANGE_LP_CAP_OFST 0 397#define MCDI_EVENT_LINKCHANGE_LP_CAP_LBN 0 398#define MCDI_EVENT_LINKCHANGE_LP_CAP_WIDTH 16 399#define MCDI_EVENT_LINKCHANGE_SPEED_OFST 0 400#define MCDI_EVENT_LINKCHANGE_SPEED_LBN 16 401#define MCDI_EVENT_LINKCHANGE_SPEED_WIDTH 4 402/* enum: Link is down or link speed could not be determined */ 403#define MCDI_EVENT_LINKCHANGE_SPEED_UNKNOWN 0x0 404/* enum: 100Mbs */ 405#define MCDI_EVENT_LINKCHANGE_SPEED_100M 0x1 406/* enum: 1Gbs */ 407#define MCDI_EVENT_LINKCHANGE_SPEED_1G 0x2 408/* enum: 10Gbs */ 409#define MCDI_EVENT_LINKCHANGE_SPEED_10G 0x3 410/* enum: 40Gbs */ 411#define MCDI_EVENT_LINKCHANGE_SPEED_40G 0x4 412/* enum: 25Gbs */ 413#define MCDI_EVENT_LINKCHANGE_SPEED_25G 0x5 414/* enum: 50Gbs */ 415#define MCDI_EVENT_LINKCHANGE_SPEED_50G 0x6 416/* enum: 100Gbs */ 417#define MCDI_EVENT_LINKCHANGE_SPEED_100G 0x7 418#define MCDI_EVENT_LINKCHANGE_FCNTL_OFST 0 419#define MCDI_EVENT_LINKCHANGE_FCNTL_LBN 20 420#define MCDI_EVENT_LINKCHANGE_FCNTL_WIDTH 4 421#define MCDI_EVENT_LINKCHANGE_LINK_FLAGS_OFST 0 422#define MCDI_EVENT_LINKCHANGE_LINK_FLAGS_LBN 24 423#define MCDI_EVENT_LINKCHANGE_LINK_FLAGS_WIDTH 8 424#define MCDI_EVENT_SENSOREVT_MONITOR_OFST 0 425#define MCDI_EVENT_SENSOREVT_MONITOR_LBN 0 426#define MCDI_EVENT_SENSOREVT_MONITOR_WIDTH 8 427#define MCDI_EVENT_SENSOREVT_STATE_OFST 0 428#define MCDI_EVENT_SENSOREVT_STATE_LBN 8 429#define MCDI_EVENT_SENSOREVT_STATE_WIDTH 8 430#define MCDI_EVENT_SENSOREVT_VALUE_OFST 0 431#define MCDI_EVENT_SENSOREVT_VALUE_LBN 16 432#define MCDI_EVENT_SENSOREVT_VALUE_WIDTH 16 433#define MCDI_EVENT_FWALERT_DATA_OFST 0 434#define MCDI_EVENT_FWALERT_DATA_LBN 8 435#define MCDI_EVENT_FWALERT_DATA_WIDTH 24 436#define MCDI_EVENT_FWALERT_REASON_OFST 0 437#define MCDI_EVENT_FWALERT_REASON_LBN 0 438#define MCDI_EVENT_FWALERT_REASON_WIDTH 8 439/* enum: SRAM Access. */ 440#define MCDI_EVENT_FWALERT_REASON_SRAM_ACCESS 0x1 441#define MCDI_EVENT_FLR_VF_OFST 0 442#define MCDI_EVENT_FLR_VF_LBN 0 443#define MCDI_EVENT_FLR_VF_WIDTH 8 444#define MCDI_EVENT_TX_ERR_TXQ_OFST 0 445#define MCDI_EVENT_TX_ERR_TXQ_LBN 0 446#define MCDI_EVENT_TX_ERR_TXQ_WIDTH 12 447#define MCDI_EVENT_TX_ERR_TYPE_OFST 0 448#define MCDI_EVENT_TX_ERR_TYPE_LBN 12 449#define MCDI_EVENT_TX_ERR_TYPE_WIDTH 4 450/* enum: Descriptor loader reported failure */ 451#define MCDI_EVENT_TX_ERR_DL_FAIL 0x1 452/* enum: Descriptor ring empty and no EOP seen for packet */ 453#define MCDI_EVENT_TX_ERR_NO_EOP 0x2 454/* enum: Overlength packet */ 455#define MCDI_EVENT_TX_ERR_2BIG 0x3 456/* enum: Malformed option descriptor */ 457#define MCDI_EVENT_TX_BAD_OPTDESC 0x5 458/* enum: Option descriptor part way through a packet */ 459#define MCDI_EVENT_TX_OPT_IN_PKT 0x8 460/* enum: DMA or PIO data access error */ 461#define MCDI_EVENT_TX_ERR_BAD_DMA_OR_PIO 0x9 462#define MCDI_EVENT_TX_ERR_INFO_OFST 0 463#define MCDI_EVENT_TX_ERR_INFO_LBN 16 464#define MCDI_EVENT_TX_ERR_INFO_WIDTH 16 465#define MCDI_EVENT_TX_FLUSH_TO_DRIVER_OFST 0 466#define MCDI_EVENT_TX_FLUSH_TO_DRIVER_LBN 12 467#define MCDI_EVENT_TX_FLUSH_TO_DRIVER_WIDTH 1 468#define MCDI_EVENT_TX_FLUSH_TXQ_OFST 0 469#define MCDI_EVENT_TX_FLUSH_TXQ_LBN 0 470#define MCDI_EVENT_TX_FLUSH_TXQ_WIDTH 12 471#define MCDI_EVENT_PTP_ERR_TYPE_OFST 0 472#define MCDI_EVENT_PTP_ERR_TYPE_LBN 0 473#define MCDI_EVENT_PTP_ERR_TYPE_WIDTH 8 474/* enum: PLL lost lock */ 475#define MCDI_EVENT_PTP_ERR_PLL_LOST 0x1 476/* enum: Filter overflow (PDMA) */ 477#define MCDI_EVENT_PTP_ERR_FILTER 0x2 478/* enum: FIFO overflow (FPGA) */ 479#define MCDI_EVENT_PTP_ERR_FIFO 0x3 480/* enum: Merge queue overflow */ 481#define MCDI_EVENT_PTP_ERR_QUEUE 0x4 482#define MCDI_EVENT_AOE_ERR_TYPE_OFST 0 483#define MCDI_EVENT_AOE_ERR_TYPE_LBN 0 484#define MCDI_EVENT_AOE_ERR_TYPE_WIDTH 8 485/* enum: AOE failed to load - no valid image? */ 486#define MCDI_EVENT_AOE_NO_LOAD 0x1 487/* enum: AOE FC reported an exception */ 488#define MCDI_EVENT_AOE_FC_ASSERT 0x2 489/* enum: AOE FC watchdogged */ 490#define MCDI_EVENT_AOE_FC_WATCHDOG 0x3 491/* enum: AOE FC failed to start */ 492#define MCDI_EVENT_AOE_FC_NO_START 0x4 493/* enum: Generic AOE fault - likely to have been reported via other means too 494 * but intended for use by aoex driver. 495 */ 496#define MCDI_EVENT_AOE_FAULT 0x5 497/* enum: Results of reprogramming the CPLD (status in AOE_ERR_DATA) */ 498#define MCDI_EVENT_AOE_CPLD_REPROGRAMMED 0x6 499/* enum: AOE loaded successfully */ 500#define MCDI_EVENT_AOE_LOAD 0x7 501/* enum: AOE DMA operation completed (LSB of HOST_HANDLE in AOE_ERR_DATA) */ 502#define MCDI_EVENT_AOE_DMA 0x8 503/* enum: AOE byteblaster connected/disconnected (Connection status in 504 * AOE_ERR_DATA) 505 */ 506#define MCDI_EVENT_AOE_BYTEBLASTER 0x9 507/* enum: DDR ECC status update */ 508#define MCDI_EVENT_AOE_DDR_ECC_STATUS 0xa 509/* enum: PTP status update */ 510#define MCDI_EVENT_AOE_PTP_STATUS 0xb 511/* enum: FPGA header incorrect */ 512#define MCDI_EVENT_AOE_FPGA_LOAD_HEADER_ERR 0xc 513/* enum: FPGA Powered Off due to error in powering up FPGA */ 514#define MCDI_EVENT_AOE_FPGA_POWER_OFF 0xd 515/* enum: AOE FPGA load failed due to MC to MUM communication failure */ 516#define MCDI_EVENT_AOE_FPGA_LOAD_FAILED 0xe 517/* enum: Notify that invalid flash type detected */ 518#define MCDI_EVENT_AOE_INVALID_FPGA_FLASH_TYPE 0xf 519/* enum: Notify that the attempt to run FPGA Controller firmware timedout */ 520#define MCDI_EVENT_AOE_FC_RUN_TIMEDOUT 0x10 521/* enum: Failure to probe one or more FPGA boot flash chips */ 522#define MCDI_EVENT_AOE_FPGA_BOOT_FLASH_INVALID 0x11 523/* enum: FPGA boot-flash contains an invalid image header */ 524#define MCDI_EVENT_AOE_FPGA_BOOT_FLASH_HDR_INVALID 0x12 525/* enum: Failed to program clocks required by the FPGA */ 526#define MCDI_EVENT_AOE_FPGA_CLOCKS_PROGRAM_FAILED 0x13 527/* enum: Notify that FPGA Controller is alive to serve MCDI requests */ 528#define MCDI_EVENT_AOE_FC_RUNNING 0x14 529#define MCDI_EVENT_AOE_ERR_DATA_OFST 0 530#define MCDI_EVENT_AOE_ERR_DATA_LBN 8 531#define MCDI_EVENT_AOE_ERR_DATA_WIDTH 8 532#define MCDI_EVENT_AOE_ERR_FC_ASSERT_INFO_OFST 0 533#define MCDI_EVENT_AOE_ERR_FC_ASSERT_INFO_LBN 8 534#define MCDI_EVENT_AOE_ERR_FC_ASSERT_INFO_WIDTH 8 535/* enum: FC Assert happened, but the register information is not available */ 536#define MCDI_EVENT_AOE_ERR_FC_ASSERT_SEEN 0x0 537/* enum: The register information for FC Assert is ready for readinng by driver 538 */ 539#define MCDI_EVENT_AOE_ERR_FC_ASSERT_DATA_READY 0x1 540#define MCDI_EVENT_AOE_ERR_CODE_FPGA_HEADER_VERIFY_FAILED_OFST 0 541#define MCDI_EVENT_AOE_ERR_CODE_FPGA_HEADER_VERIFY_FAILED_LBN 8 542#define MCDI_EVENT_AOE_ERR_CODE_FPGA_HEADER_VERIFY_FAILED_WIDTH 8 543/* enum: Reading from NV failed */ 544#define MCDI_EVENT_AOE_ERR_FPGA_HEADER_NV_READ_FAIL 0x0 545/* enum: Invalid Magic Number if FPGA header */ 546#define MCDI_EVENT_AOE_ERR_FPGA_HEADER_MAGIC_FAIL 0x1 547/* enum: Invalid Silicon type detected in header */ 548#define MCDI_EVENT_AOE_ERR_FPGA_HEADER_SILICON_TYPE 0x2 549/* enum: Unsupported VRatio */ 550#define MCDI_EVENT_AOE_ERR_FPGA_HEADER_VRATIO 0x3 551/* enum: Unsupported DDR Type */ 552#define MCDI_EVENT_AOE_ERR_FPGA_HEADER_DDR_TYPE 0x4 553/* enum: DDR Voltage out of supported range */ 554#define MCDI_EVENT_AOE_ERR_FPGA_HEADER_DDR_VOLTAGE 0x5 555/* enum: Unsupported DDR speed */ 556#define MCDI_EVENT_AOE_ERR_FPGA_HEADER_DDR_SPEED 0x6 557/* enum: Unsupported DDR size */ 558#define MCDI_EVENT_AOE_ERR_FPGA_HEADER_DDR_SIZE 0x7 559/* enum: Unsupported DDR rank */ 560#define MCDI_EVENT_AOE_ERR_FPGA_HEADER_DDR_RANK 0x8 561#define MCDI_EVENT_AOE_ERR_CODE_INVALID_FPGA_FLASH_TYPE_INFO_OFST 0 562#define MCDI_EVENT_AOE_ERR_CODE_INVALID_FPGA_FLASH_TYPE_INFO_LBN 8 563#define MCDI_EVENT_AOE_ERR_CODE_INVALID_FPGA_FLASH_TYPE_INFO_WIDTH 8 564/* enum: Primary boot flash */ 565#define MCDI_EVENT_AOE_FLASH_TYPE_BOOT_PRIMARY 0x0 566/* enum: Secondary boot flash */ 567#define MCDI_EVENT_AOE_FLASH_TYPE_BOOT_SECONDARY 0x1 568#define MCDI_EVENT_AOE_ERR_CODE_FPGA_POWER_OFF_OFST 0 569#define MCDI_EVENT_AOE_ERR_CODE_FPGA_POWER_OFF_LBN 8 570#define MCDI_EVENT_AOE_ERR_CODE_FPGA_POWER_OFF_WIDTH 8 571#define MCDI_EVENT_AOE_ERR_CODE_FPGA_LOAD_FAILED_OFST 0 572#define MCDI_EVENT_AOE_ERR_CODE_FPGA_LOAD_FAILED_LBN 8 573#define MCDI_EVENT_AOE_ERR_CODE_FPGA_LOAD_FAILED_WIDTH 8 574#define MCDI_EVENT_RX_ERR_RXQ_OFST 0 575#define MCDI_EVENT_RX_ERR_RXQ_LBN 0 576#define MCDI_EVENT_RX_ERR_RXQ_WIDTH 12 577#define MCDI_EVENT_RX_ERR_TYPE_OFST 0 578#define MCDI_EVENT_RX_ERR_TYPE_LBN 12 579#define MCDI_EVENT_RX_ERR_TYPE_WIDTH 4 580#define MCDI_EVENT_RX_ERR_INFO_OFST 0 581#define MCDI_EVENT_RX_ERR_INFO_LBN 16 582#define MCDI_EVENT_RX_ERR_INFO_WIDTH 16 583#define MCDI_EVENT_RX_FLUSH_TO_DRIVER_OFST 0 584#define MCDI_EVENT_RX_FLUSH_TO_DRIVER_LBN 12 585#define MCDI_EVENT_RX_FLUSH_TO_DRIVER_WIDTH 1 586#define MCDI_EVENT_RX_FLUSH_RXQ_OFST 0 587#define MCDI_EVENT_RX_FLUSH_RXQ_LBN 0 588#define MCDI_EVENT_RX_FLUSH_RXQ_WIDTH 12 589#define MCDI_EVENT_MC_REBOOT_COUNT_OFST 0 590#define MCDI_EVENT_MC_REBOOT_COUNT_LBN 0 591#define MCDI_EVENT_MC_REBOOT_COUNT_WIDTH 16 592#define MCDI_EVENT_MUM_ERR_TYPE_OFST 0 593#define MCDI_EVENT_MUM_ERR_TYPE_LBN 0 594#define MCDI_EVENT_MUM_ERR_TYPE_WIDTH 8 595/* enum: MUM failed to load - no valid image? */ 596#define MCDI_EVENT_MUM_NO_LOAD 0x1 597/* enum: MUM f/w reported an exception */ 598#define MCDI_EVENT_MUM_ASSERT 0x2 599/* enum: MUM not kicking watchdog */ 600#define MCDI_EVENT_MUM_WATCHDOG 0x3 601#define MCDI_EVENT_MUM_ERR_DATA_OFST 0 602#define MCDI_EVENT_MUM_ERR_DATA_LBN 8 603#define MCDI_EVENT_MUM_ERR_DATA_WIDTH 8 604#define MCDI_EVENT_DBRET_SEQ_OFST 0 605#define MCDI_EVENT_DBRET_SEQ_LBN 0 606#define MCDI_EVENT_DBRET_SEQ_WIDTH 8 607#define MCDI_EVENT_SUC_ERR_TYPE_OFST 0 608#define MCDI_EVENT_SUC_ERR_TYPE_LBN 0 609#define MCDI_EVENT_SUC_ERR_TYPE_WIDTH 8 610/* enum: Corrupted or bad SUC application. */ 611#define MCDI_EVENT_SUC_BAD_APP 0x1 612/* enum: SUC application reported an assert. */ 613#define MCDI_EVENT_SUC_ASSERT 0x2 614/* enum: SUC application reported an exception. */ 615#define MCDI_EVENT_SUC_EXCEPTION 0x3 616/* enum: SUC watchdog timer expired. */ 617#define MCDI_EVENT_SUC_WATCHDOG 0x4 618#define MCDI_EVENT_SUC_ERR_ADDRESS_OFST 0 619#define MCDI_EVENT_SUC_ERR_ADDRESS_LBN 8 620#define MCDI_EVENT_SUC_ERR_ADDRESS_WIDTH 24 621#define MCDI_EVENT_SUC_ERR_DATA_OFST 0 622#define MCDI_EVENT_SUC_ERR_DATA_LBN 8 623#define MCDI_EVENT_SUC_ERR_DATA_WIDTH 24 624#define MCDI_EVENT_LINKCHANGE_V2_LP_CAP_OFST 0 625#define MCDI_EVENT_LINKCHANGE_V2_LP_CAP_LBN 0 626#define MCDI_EVENT_LINKCHANGE_V2_LP_CAP_WIDTH 24 627#define MCDI_EVENT_LINKCHANGE_V2_SPEED_OFST 0 628#define MCDI_EVENT_LINKCHANGE_V2_SPEED_LBN 24 629#define MCDI_EVENT_LINKCHANGE_V2_SPEED_WIDTH 4 630/* Enum values, see field(s): */ 631/* MCDI_EVENT/LINKCHANGE_SPEED */ 632#define MCDI_EVENT_LINKCHANGE_V2_FLAGS_LINK_UP_OFST 0 633#define MCDI_EVENT_LINKCHANGE_V2_FLAGS_LINK_UP_LBN 28 634#define MCDI_EVENT_LINKCHANGE_V2_FLAGS_LINK_UP_WIDTH 1 635#define MCDI_EVENT_LINKCHANGE_V2_FCNTL_OFST 0 636#define MCDI_EVENT_LINKCHANGE_V2_FCNTL_LBN 29 637#define MCDI_EVENT_LINKCHANGE_V2_FCNTL_WIDTH 3 638/* Enum values, see field(s): */ 639/* MC_CMD_SET_MAC/MC_CMD_SET_MAC_IN/FCNTL */ 640#define MCDI_EVENT_MODULECHANGE_LD_CAP_OFST 0 641#define MCDI_EVENT_MODULECHANGE_LD_CAP_LBN 0 642#define MCDI_EVENT_MODULECHANGE_LD_CAP_WIDTH 30 643#define MCDI_EVENT_MODULECHANGE_SEQ_OFST 0 644#define MCDI_EVENT_MODULECHANGE_SEQ_LBN 30 645#define MCDI_EVENT_MODULECHANGE_SEQ_WIDTH 2 646#define MCDI_EVENT_DATA_LBN 0 647#define MCDI_EVENT_DATA_WIDTH 32 648/* Alias for PTP_DATA. */ 649#define MCDI_EVENT_SRC_LBN 36 650#define MCDI_EVENT_SRC_WIDTH 8 651/* Data associated with PTP events which doesn't fit into the main DATA field 652 */ 653#define MCDI_EVENT_PTP_DATA_LBN 36 654#define MCDI_EVENT_PTP_DATA_WIDTH 8 655/* EF100 specific. Defined by QDMA. The phase bit, changes each time round the 656 * event ring 657 */ 658#define MCDI_EVENT_EV_EVQ_PHASE_LBN 59 659#define MCDI_EVENT_EV_EVQ_PHASE_WIDTH 1 660#define MCDI_EVENT_EV_CODE_LBN 60 661#define MCDI_EVENT_EV_CODE_WIDTH 4 662#define MCDI_EVENT_CODE_LBN 44 663#define MCDI_EVENT_CODE_WIDTH 8 664/* enum: Event generated by host software */ 665#define MCDI_EVENT_SW_EVENT 0x0 666/* enum: Bad assert. */ 667#define MCDI_EVENT_CODE_BADSSERT 0x1 668/* enum: PM Notice. */ 669#define MCDI_EVENT_CODE_PMNOTICE 0x2 670/* enum: Command done. */ 671#define MCDI_EVENT_CODE_CMDDONE 0x3 672/* enum: Link change. */ 673#define MCDI_EVENT_CODE_LINKCHANGE 0x4 674/* enum: Sensor Event. */ 675#define MCDI_EVENT_CODE_SENSOREVT 0x5 676/* enum: Schedule error. */ 677#define MCDI_EVENT_CODE_SCHEDERR 0x6 678/* enum: Reboot. */ 679#define MCDI_EVENT_CODE_REBOOT 0x7 680/* enum: Mac stats DMA. */ 681#define MCDI_EVENT_CODE_MAC_STATS_DMA 0x8 682/* enum: Firmware alert. */ 683#define MCDI_EVENT_CODE_FWALERT 0x9 684/* enum: Function level reset. */ 685#define MCDI_EVENT_CODE_FLR 0xa 686/* enum: Transmit error */ 687#define MCDI_EVENT_CODE_TX_ERR 0xb 688/* enum: Tx flush has completed */ 689#define MCDI_EVENT_CODE_TX_FLUSH 0xc 690/* enum: PTP packet received timestamp */ 691#define MCDI_EVENT_CODE_PTP_RX 0xd 692/* enum: PTP NIC failure */ 693#define MCDI_EVENT_CODE_PTP_FAULT 0xe 694/* enum: PTP PPS event */ 695#define MCDI_EVENT_CODE_PTP_PPS 0xf 696/* enum: Rx flush has completed */ 697#define MCDI_EVENT_CODE_RX_FLUSH 0x10 698/* enum: Receive error */ 699#define MCDI_EVENT_CODE_RX_ERR 0x11 700/* enum: AOE fault */ 701#define MCDI_EVENT_CODE_AOE 0x12 702/* enum: Network port calibration failed (VCAL). */ 703#define MCDI_EVENT_CODE_VCAL_FAIL 0x13 704/* enum: HW PPS event */ 705#define MCDI_EVENT_CODE_HW_PPS 0x14 706/* enum: The MC has rebooted (huntington and later, siena uses CODE_REBOOT and 707 * a different format) 708 */ 709#define MCDI_EVENT_CODE_MC_REBOOT 0x15 710/* enum: the MC has detected a parity error */ 711#define MCDI_EVENT_CODE_PAR_ERR 0x16 712/* enum: the MC has detected a correctable error */ 713#define MCDI_EVENT_CODE_ECC_CORR_ERR 0x17 714/* enum: the MC has detected an uncorrectable error */ 715#define MCDI_EVENT_CODE_ECC_FATAL_ERR 0x18 716/* enum: The MC has entered offline BIST mode */ 717#define MCDI_EVENT_CODE_MC_BIST 0x19 718/* enum: PTP tick event providing current NIC time */ 719#define MCDI_EVENT_CODE_PTP_TIME 0x1a 720/* enum: MUM fault */ 721#define MCDI_EVENT_CODE_MUM 0x1b 722/* enum: notify the designated PF of a new authorization request */ 723#define MCDI_EVENT_CODE_PROXY_REQUEST 0x1c 724/* enum: notify a function that awaits an authorization that its request has 725 * been processed and it may now resend the command 726 */ 727#define MCDI_EVENT_CODE_PROXY_RESPONSE 0x1d 728/* enum: MCDI command accepted. New commands can be issued but this command is 729 * not done yet. 730 */ 731#define MCDI_EVENT_CODE_DBRET 0x1e 732/* enum: The MC has detected a fault on the SUC */ 733#define MCDI_EVENT_CODE_SUC 0x1f 734/* enum: Link change. This event is sent instead of LINKCHANGE if 735 * WANT_V2_LINKCHANGES was set on driver attach. 736 */ 737#define MCDI_EVENT_CODE_LINKCHANGE_V2 0x20 738/* enum: This event is sent if WANT_V2_LINKCHANGES was set on driver attach 739 * when the local device capabilities changes. This will usually correspond to 740 * a module change. 741 */ 742#define MCDI_EVENT_CODE_MODULECHANGE 0x21 743/* enum: Notification that the sensors have been added and/or removed from the 744 * sensor table. This event includes the new sensor table generation count, if 745 * this does not match the driver's local copy it is expected to call 746 * DYNAMIC_SENSORS_LIST to refresh it. 747 */ 748#define MCDI_EVENT_CODE_DYNAMIC_SENSORS_CHANGE 0x22 749/* enum: Notification that a sensor has changed state as a result of a reading 750 * crossing a threshold. This is sent as two events, the first event contains 751 * the handle and the sensor's state (in the SRC field), and the second 752 * contains the value. 753 */ 754#define MCDI_EVENT_CODE_DYNAMIC_SENSORS_STATE_CHANGE 0x23 755/* enum: Notification that a descriptor proxy function configuration has been 756 * pushed to "live" status (visible to host). SRC field contains the handle of 757 * the affected descriptor proxy function. DATA field contains the generation 758 * count of configuration set applied. See MC_CMD_DESC_PROXY_FUNC_CONFIG_SET / 759 * MC_CMD_DESC_PROXY_FUNC_CONFIG_COMMIT and SF-122927-TC for details. 760 */ 761#define MCDI_EVENT_CODE_DESC_PROXY_FUNC_CONFIG_COMMITTED 0x24 762/* enum: Notification that a descriptor proxy function has been reset. SRC 763 * field contains the handle of the affected descriptor proxy function. See 764 * SF-122927-TC for details. 765 */ 766#define MCDI_EVENT_CODE_DESC_PROXY_FUNC_RESET 0x25 767/* enum: Notification that a driver attached to a descriptor proxy function. 768 * SRC field contains the handle of the affected descriptor proxy function. For 769 * Virtio proxy functions this message consists of two MCDI events, where the 770 * first event's (CONT=1) DATA field carries negotiated virtio feature bits 0 771 * to 31 and the second (CONT=0) carries bits 32 to 63. For EF100 proxy 772 * functions event length and meaning of DATA field is not yet defined. See 773 * SF-122927-TC for details. 774 */ 775#define MCDI_EVENT_CODE_DESC_PROXY_FUNC_DRIVER_ATTACH 0x26 776/* enum: Artificial event generated by host and posted via MC for test 777 * purposes. 778 */ 779#define MCDI_EVENT_CODE_TESTGEN 0xfa 780#define MCDI_EVENT_CMDDONE_DATA_OFST 0 781#define MCDI_EVENT_CMDDONE_DATA_LEN 4 782#define MCDI_EVENT_CMDDONE_DATA_LBN 0 783#define MCDI_EVENT_CMDDONE_DATA_WIDTH 32 784#define MCDI_EVENT_LINKCHANGE_DATA_OFST 0 785#define MCDI_EVENT_LINKCHANGE_DATA_LEN 4 786#define MCDI_EVENT_LINKCHANGE_DATA_LBN 0 787#define MCDI_EVENT_LINKCHANGE_DATA_WIDTH 32 788#define MCDI_EVENT_SENSOREVT_DATA_OFST 0 789#define MCDI_EVENT_SENSOREVT_DATA_LEN 4 790#define MCDI_EVENT_SENSOREVT_DATA_LBN 0 791#define MCDI_EVENT_SENSOREVT_DATA_WIDTH 32 792#define MCDI_EVENT_MAC_STATS_DMA_GENERATION_OFST 0 793#define MCDI_EVENT_MAC_STATS_DMA_GENERATION_LEN 4 794#define MCDI_EVENT_MAC_STATS_DMA_GENERATION_LBN 0 795#define MCDI_EVENT_MAC_STATS_DMA_GENERATION_WIDTH 32 796#define MCDI_EVENT_TX_ERR_DATA_OFST 0 797#define MCDI_EVENT_TX_ERR_DATA_LEN 4 798#define MCDI_EVENT_TX_ERR_DATA_LBN 0 799#define MCDI_EVENT_TX_ERR_DATA_WIDTH 32 800/* For CODE_PTP_RX, CODE_PTP_PPS and CODE_HW_PPS events the seconds field of 801 * timestamp 802 */ 803#define MCDI_EVENT_PTP_SECONDS_OFST 0 804#define MCDI_EVENT_PTP_SECONDS_LEN 4 805#define MCDI_EVENT_PTP_SECONDS_LBN 0 806#define MCDI_EVENT_PTP_SECONDS_WIDTH 32 807/* For CODE_PTP_RX, CODE_PTP_PPS and CODE_HW_PPS events the major field of 808 * timestamp 809 */ 810#define MCDI_EVENT_PTP_MAJOR_OFST 0 811#define MCDI_EVENT_PTP_MAJOR_LEN 4 812#define MCDI_EVENT_PTP_MAJOR_LBN 0 813#define MCDI_EVENT_PTP_MAJOR_WIDTH 32 814/* For CODE_PTP_RX, CODE_PTP_PPS and CODE_HW_PPS events the nanoseconds field 815 * of timestamp 816 */ 817#define MCDI_EVENT_PTP_NANOSECONDS_OFST 0 818#define MCDI_EVENT_PTP_NANOSECONDS_LEN 4 819#define MCDI_EVENT_PTP_NANOSECONDS_LBN 0 820#define MCDI_EVENT_PTP_NANOSECONDS_WIDTH 32 821/* For CODE_PTP_RX, CODE_PTP_PPS and CODE_HW_PPS events the minor field of 822 * timestamp 823 */ 824#define MCDI_EVENT_PTP_MINOR_OFST 0 825#define MCDI_EVENT_PTP_MINOR_LEN 4 826#define MCDI_EVENT_PTP_MINOR_LBN 0 827#define MCDI_EVENT_PTP_MINOR_WIDTH 32 828/* For CODE_PTP_RX events, the lowest four bytes of sourceUUID from PTP packet 829 */ 830#define MCDI_EVENT_PTP_UUID_OFST 0 831#define MCDI_EVENT_PTP_UUID_LEN 4 832#define MCDI_EVENT_PTP_UUID_LBN 0 833#define MCDI_EVENT_PTP_UUID_WIDTH 32 834#define MCDI_EVENT_RX_ERR_DATA_OFST 0 835#define MCDI_EVENT_RX_ERR_DATA_LEN 4 836#define MCDI_EVENT_RX_ERR_DATA_LBN 0 837#define MCDI_EVENT_RX_ERR_DATA_WIDTH 32 838#define MCDI_EVENT_PAR_ERR_DATA_OFST 0 839#define MCDI_EVENT_PAR_ERR_DATA_LEN 4 840#define MCDI_EVENT_PAR_ERR_DATA_LBN 0 841#define MCDI_EVENT_PAR_ERR_DATA_WIDTH 32 842#define MCDI_EVENT_ECC_CORR_ERR_DATA_OFST 0 843#define MCDI_EVENT_ECC_CORR_ERR_DATA_LEN 4 844#define MCDI_EVENT_ECC_CORR_ERR_DATA_LBN 0 845#define MCDI_EVENT_ECC_CORR_ERR_DATA_WIDTH 32 846#define MCDI_EVENT_ECC_FATAL_ERR_DATA_OFST 0 847#define MCDI_EVENT_ECC_FATAL_ERR_DATA_LEN 4 848#define MCDI_EVENT_ECC_FATAL_ERR_DATA_LBN 0 849#define MCDI_EVENT_ECC_FATAL_ERR_DATA_WIDTH 32 850/* For CODE_PTP_TIME events, the major value of the PTP clock */ 851#define MCDI_EVENT_PTP_TIME_MAJOR_OFST 0 852#define MCDI_EVENT_PTP_TIME_MAJOR_LEN 4 853#define MCDI_EVENT_PTP_TIME_MAJOR_LBN 0 854#define MCDI_EVENT_PTP_TIME_MAJOR_WIDTH 32 855/* For CODE_PTP_TIME events, bits 19-26 of the minor value of the PTP clock */ 856#define MCDI_EVENT_PTP_TIME_MINOR_26_19_LBN 36 857#define MCDI_EVENT_PTP_TIME_MINOR_26_19_WIDTH 8 858/* For CODE_PTP_TIME events, most significant bits of the minor value of the 859 * PTP clock. This is a more generic equivalent of PTP_TIME_MINOR_26_19. 860 */ 861#define MCDI_EVENT_PTP_TIME_MINOR_MS_8BITS_LBN 36 862#define MCDI_EVENT_PTP_TIME_MINOR_MS_8BITS_WIDTH 8 863/* For CODE_PTP_TIME events where report sync status is enabled, indicates 864 * whether the NIC clock has ever been set 865 */ 866#define MCDI_EVENT_PTP_TIME_NIC_CLOCK_VALID_LBN 36 867#define MCDI_EVENT_PTP_TIME_NIC_CLOCK_VALID_WIDTH 1 868/* For CODE_PTP_TIME events where report sync status is enabled, indicates 869 * whether the NIC and System clocks are in sync 870 */ 871#define MCDI_EVENT_PTP_TIME_HOST_NIC_IN_SYNC_LBN 37 872#define MCDI_EVENT_PTP_TIME_HOST_NIC_IN_SYNC_WIDTH 1 873/* For CODE_PTP_TIME events where report sync status is enabled, bits 21-26 of 874 * the minor value of the PTP clock 875 */ 876#define MCDI_EVENT_PTP_TIME_MINOR_26_21_LBN 38 877#define MCDI_EVENT_PTP_TIME_MINOR_26_21_WIDTH 6 878/* For CODE_PTP_TIME events, most significant bits of the minor value of the 879 * PTP clock. This is a more generic equivalent of PTP_TIME_MINOR_26_21. 880 */ 881#define MCDI_EVENT_PTP_TIME_MINOR_MS_6BITS_LBN 38 882#define MCDI_EVENT_PTP_TIME_MINOR_MS_6BITS_WIDTH 6 883#define MCDI_EVENT_PROXY_REQUEST_BUFF_INDEX_OFST 0 884#define MCDI_EVENT_PROXY_REQUEST_BUFF_INDEX_LEN 4 885#define MCDI_EVENT_PROXY_REQUEST_BUFF_INDEX_LBN 0 886#define MCDI_EVENT_PROXY_REQUEST_BUFF_INDEX_WIDTH 32 887#define MCDI_EVENT_PROXY_RESPONSE_HANDLE_OFST 0 888#define MCDI_EVENT_PROXY_RESPONSE_HANDLE_LEN 4 889#define MCDI_EVENT_PROXY_RESPONSE_HANDLE_LBN 0 890#define MCDI_EVENT_PROXY_RESPONSE_HANDLE_WIDTH 32 891/* Zero means that the request has been completed or authorized, and the driver 892 * should resend it. A non-zero value means that the authorization has been 893 * denied, and gives the reason. Typically it will be EPERM. 894 */ 895#define MCDI_EVENT_PROXY_RESPONSE_RC_LBN 36 896#define MCDI_EVENT_PROXY_RESPONSE_RC_WIDTH 8 897#define MCDI_EVENT_DBRET_DATA_OFST 0 898#define MCDI_EVENT_DBRET_DATA_LEN 4 899#define MCDI_EVENT_DBRET_DATA_LBN 0 900#define MCDI_EVENT_DBRET_DATA_WIDTH 32 901#define MCDI_EVENT_LINKCHANGE_V2_DATA_OFST 0 902#define MCDI_EVENT_LINKCHANGE_V2_DATA_LEN 4 903#define MCDI_EVENT_LINKCHANGE_V2_DATA_LBN 0 904#define MCDI_EVENT_LINKCHANGE_V2_DATA_WIDTH 32 905#define MCDI_EVENT_MODULECHANGE_DATA_OFST 0 906#define MCDI_EVENT_MODULECHANGE_DATA_LEN 4 907#define MCDI_EVENT_MODULECHANGE_DATA_LBN 0 908#define MCDI_EVENT_MODULECHANGE_DATA_WIDTH 32 909/* The new generation count after a sensor has been added or deleted. */ 910#define MCDI_EVENT_DYNAMIC_SENSORS_GENERATION_OFST 0 911#define MCDI_EVENT_DYNAMIC_SENSORS_GENERATION_LEN 4 912#define MCDI_EVENT_DYNAMIC_SENSORS_GENERATION_LBN 0 913#define MCDI_EVENT_DYNAMIC_SENSORS_GENERATION_WIDTH 32 914/* The handle of a dynamic sensor. */ 915#define MCDI_EVENT_DYNAMIC_SENSORS_HANDLE_OFST 0 916#define MCDI_EVENT_DYNAMIC_SENSORS_HANDLE_LEN 4 917#define MCDI_EVENT_DYNAMIC_SENSORS_HANDLE_LBN 0 918#define MCDI_EVENT_DYNAMIC_SENSORS_HANDLE_WIDTH 32 919/* The current values of a sensor. */ 920#define MCDI_EVENT_DYNAMIC_SENSORS_VALUE_OFST 0 921#define MCDI_EVENT_DYNAMIC_SENSORS_VALUE_LEN 4 922#define MCDI_EVENT_DYNAMIC_SENSORS_VALUE_LBN 0 923#define MCDI_EVENT_DYNAMIC_SENSORS_VALUE_WIDTH 32 924/* The current state of a sensor. */ 925#define MCDI_EVENT_DYNAMIC_SENSORS_STATE_LBN 36 926#define MCDI_EVENT_DYNAMIC_SENSORS_STATE_WIDTH 8 927#define MCDI_EVENT_DESC_PROXY_DATA_OFST 0 928#define MCDI_EVENT_DESC_PROXY_DATA_LEN 4 929#define MCDI_EVENT_DESC_PROXY_DATA_LBN 0 930#define MCDI_EVENT_DESC_PROXY_DATA_WIDTH 32 931/* Generation count of applied configuration set */ 932#define MCDI_EVENT_DESC_PROXY_GENERATION_OFST 0 933#define MCDI_EVENT_DESC_PROXY_GENERATION_LEN 4 934#define MCDI_EVENT_DESC_PROXY_GENERATION_LBN 0 935#define MCDI_EVENT_DESC_PROXY_GENERATION_WIDTH 32 936/* Virtio features negotiated with the host driver. First event (CONT=1) 937 * carries bits 0 to 31. Second event (CONT=0) carries bits 32 to 63. 938 */ 939#define MCDI_EVENT_DESC_PROXY_VIRTIO_FEATURES_OFST 0 940#define MCDI_EVENT_DESC_PROXY_VIRTIO_FEATURES_LEN 4 941#define MCDI_EVENT_DESC_PROXY_VIRTIO_FEATURES_LBN 0 942#define MCDI_EVENT_DESC_PROXY_VIRTIO_FEATURES_WIDTH 32 943 944/* FCDI_EVENT structuredef */ 945#define FCDI_EVENT_LEN 8 946#define FCDI_EVENT_CONT_LBN 32 947#define FCDI_EVENT_CONT_WIDTH 1 948#define FCDI_EVENT_LEVEL_LBN 33 949#define FCDI_EVENT_LEVEL_WIDTH 3 950/* enum: Info. */ 951#define FCDI_EVENT_LEVEL_INFO 0x0 952/* enum: Warning. */ 953#define FCDI_EVENT_LEVEL_WARN 0x1 954/* enum: Error. */ 955#define FCDI_EVENT_LEVEL_ERR 0x2 956/* enum: Fatal. */ 957#define FCDI_EVENT_LEVEL_FATAL 0x3 958#define FCDI_EVENT_DATA_OFST 0 959#define FCDI_EVENT_DATA_LEN 4 960#define FCDI_EVENT_LINK_STATE_STATUS_OFST 0 961#define FCDI_EVENT_LINK_STATE_STATUS_LBN 0 962#define FCDI_EVENT_LINK_STATE_STATUS_WIDTH 1 963#define FCDI_EVENT_LINK_DOWN 0x0 /* enum */ 964#define FCDI_EVENT_LINK_UP 0x1 /* enum */ 965#define FCDI_EVENT_DATA_LBN 0 966#define FCDI_EVENT_DATA_WIDTH 32 967#define FCDI_EVENT_SRC_LBN 36 968#define FCDI_EVENT_SRC_WIDTH 8 969#define FCDI_EVENT_EV_CODE_LBN 60 970#define FCDI_EVENT_EV_CODE_WIDTH 4 971#define FCDI_EVENT_CODE_LBN 44 972#define FCDI_EVENT_CODE_WIDTH 8 973/* enum: The FC was rebooted. */ 974#define FCDI_EVENT_CODE_REBOOT 0x1 975/* enum: Bad assert. */ 976#define FCDI_EVENT_CODE_ASSERT 0x2 977/* enum: DDR3 test result. */ 978#define FCDI_EVENT_CODE_DDR_TEST_RESULT 0x3 979/* enum: Link status. */ 980#define FCDI_EVENT_CODE_LINK_STATE 0x4 981/* enum: A timed read is ready to be serviced. */ 982#define FCDI_EVENT_CODE_TIMED_READ 0x5 983/* enum: One or more PPS IN events */ 984#define FCDI_EVENT_CODE_PPS_IN 0x6 985/* enum: Tick event from PTP clock */ 986#define FCDI_EVENT_CODE_PTP_TICK 0x7 987/* enum: ECC error counters */ 988#define FCDI_EVENT_CODE_DDR_ECC_STATUS 0x8 989/* enum: Current status of PTP */ 990#define FCDI_EVENT_CODE_PTP_STATUS 0x9 991/* enum: Port id config to map MC-FC port idx */ 992#define FCDI_EVENT_CODE_PORT_CONFIG 0xa 993/* enum: Boot result or error code */ 994#define FCDI_EVENT_CODE_BOOT_RESULT 0xb 995#define FCDI_EVENT_REBOOT_SRC_LBN 36 996#define FCDI_EVENT_REBOOT_SRC_WIDTH 8 997#define FCDI_EVENT_REBOOT_FC_FW 0x0 /* enum */ 998#define FCDI_EVENT_REBOOT_FC_BOOTLOADER 0x1 /* enum */ 999#define FCDI_EVENT_ASSERT_INSTR_ADDRESS_OFST 0 1000#define FCDI_EVENT_ASSERT_INSTR_ADDRESS_LEN 4
1001#define FCDI_EVENT_ASSERT_INSTR_ADDRESS_LBN 0 1002#define FCDI_EVENT_ASSERT_INSTR_ADDRESS_WIDTH 32 1003#define FCDI_EVENT_ASSERT_TYPE_LBN 36 1004#define FCDI_EVENT_ASSERT_TYPE_WIDTH 8 1005#define FCDI_EVENT_DDR_TEST_RESULT_STATUS_CODE_LBN 36 1006#define FCDI_EVENT_DDR_TEST_RESULT_STATUS_CODE_WIDTH 8 1007#define FCDI_EVENT_DDR_TEST_RESULT_RESULT_OFST 0 1008#define FCDI_EVENT_DDR_TEST_RESULT_RESULT_LEN 4 1009#define FCDI_EVENT_DDR_TEST_RESULT_RESULT_LBN 0 1010#define FCDI_EVENT_DDR_TEST_RESULT_RESULT_WIDTH 32 1011#define FCDI_EVENT_LINK_STATE_DATA_OFST 0 1012#define FCDI_EVENT_LINK_STATE_DATA_LEN 4 1013#define FCDI_EVENT_LINK_STATE_DATA_LBN 0 1014#define FCDI_EVENT_LINK_STATE_DATA_WIDTH 32 1015#define FCDI_EVENT_PTP_STATE_OFST 0 1016#define FCDI_EVENT_PTP_STATE_LEN 4 1017#define FCDI_EVENT_PTP_UNDEFINED 0x0 /* enum */ 1018#define FCDI_EVENT_PTP_SETUP_FAILED 0x1 /* enum */ 1019#define FCDI_EVENT_PTP_OPERATIONAL 0x2 /* enum */ 1020#define FCDI_EVENT_PTP_STATE_LBN 0 1021#define FCDI_EVENT_PTP_STATE_WIDTH 32 1022#define FCDI_EVENT_DDR_ECC_STATUS_BANK_ID_LBN 36 1023#define FCDI_EVENT_DDR_ECC_STATUS_BANK_ID_WIDTH 8 1024#define FCDI_EVENT_DDR_ECC_STATUS_STATUS_OFST 0 1025#define FCDI_EVENT_DDR_ECC_STATUS_STATUS_LEN 4 1026#define FCDI_EVENT_DDR_ECC_STATUS_STATUS_LBN 0 1027#define FCDI_EVENT_DDR_ECC_STATUS_STATUS_WIDTH 32 1028/* Index of MC port being referred to */ 1029#define FCDI_EVENT_PORT_CONFIG_SRC_LBN 36 1030#define FCDI_EVENT_PORT_CONFIG_SRC_WIDTH 8 1031/* FC Port index that matches the MC port index in SRC */ 1032#define FCDI_EVENT_PORT_CONFIG_DATA_OFST 0 1033#define FCDI_EVENT_PORT_CONFIG_DATA_LEN 4 1034#define FCDI_EVENT_PORT_CONFIG_DATA_LBN 0 1035#define FCDI_EVENT_PORT_CONFIG_DATA_WIDTH 32 1036#define FCDI_EVENT_BOOT_RESULT_OFST 0 1037#define FCDI_EVENT_BOOT_RESULT_LEN 4 1038/* Enum values, see field(s): */ 1039/* MC_CMD_AOE/MC_CMD_AOE_OUT_INFO/FC_BOOT_RESULT */ 1040#define FCDI_EVENT_BOOT_RESULT_LBN 0 1041#define FCDI_EVENT_BOOT_RESULT_WIDTH 32 1042 1043/* FCDI_EXTENDED_EVENT_PPS structuredef: Extended FCDI event to send PPS events 1044 * to the MC. Note that this structure | is overlayed over a normal FCDI event 1045 * such that bits 32-63 containing | event code, level, source etc remain the 1046 * same. In this case the data | field of the header is defined to be the 1047 * number of timestamps 1048 */ 1049#define FCDI_EXTENDED_EVENT_PPS_LENMIN 16 1050#define FCDI_EXTENDED_EVENT_PPS_LENMAX 248 1051#define FCDI_EXTENDED_EVENT_PPS_LENMAX_MCDI2 1016 1052#define FCDI_EXTENDED_EVENT_PPS_LEN(num) (8+8*(num)) 1053#define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_NUM(len) (((len)-8)/8) 1054/* Number of timestamps following */ 1055#define FCDI_EXTENDED_EVENT_PPS_COUNT_OFST 0 1056#define FCDI_EXTENDED_EVENT_PPS_COUNT_LEN 4 1057#define FCDI_EXTENDED_EVENT_PPS_COUNT_LBN 0 1058#define FCDI_EXTENDED_EVENT_PPS_COUNT_WIDTH 32 1059/* Seconds field of a timestamp record */ 1060#define FCDI_EXTENDED_EVENT_PPS_SECONDS_OFST 8 1061#define FCDI_EXTENDED_EVENT_PPS_SECONDS_LEN 4 1062#define FCDI_EXTENDED_EVENT_PPS_SECONDS_LBN 64 1063#define FCDI_EXTENDED_EVENT_PPS_SECONDS_WIDTH 32 1064/* Nanoseconds field of a timestamp record */ 1065#define FCDI_EXTENDED_EVENT_PPS_NANOSECONDS_OFST 12 1066#define FCDI_EXTENDED_EVENT_PPS_NANOSECONDS_LEN 4 1067#define FCDI_EXTENDED_EVENT_PPS_NANOSECONDS_LBN 96 1068#define FCDI_EXTENDED_EVENT_PPS_NANOSECONDS_WIDTH 32 1069/* Timestamp records comprising the event */ 1070#define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_OFST 8 1071#define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_LEN 8 1072#define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_LO_OFST 8 1073#define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_HI_OFST 12 1074#define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_MINNUM 1 1075#define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_MAXNUM 30 1076#define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_MAXNUM_MCDI2 126 1077#define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_LBN 64 1078#define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_WIDTH 64 1079 1080/* MUM_EVENT structuredef */ 1081#define MUM_EVENT_LEN 8 1082#define MUM_EVENT_CONT_LBN 32 1083#define MUM_EVENT_CONT_WIDTH 1 1084#define MUM_EVENT_LEVEL_LBN 33 1085#define MUM_EVENT_LEVEL_WIDTH 3 1086/* enum: Info. */ 1087#define MUM_EVENT_LEVEL_INFO 0x0 1088/* enum: Warning. */ 1089#define MUM_EVENT_LEVEL_WARN 0x1 1090/* enum: Error. */ 1091#define MUM_EVENT_LEVEL_ERR 0x2 1092/* enum: Fatal. */ 1093#define MUM_EVENT_LEVEL_FATAL 0x3 1094#define MUM_EVENT_DATA_OFST 0 1095#define MUM_EVENT_DATA_LEN 4 1096#define MUM_EVENT_SENSOR_ID_OFST 0 1097#define MUM_EVENT_SENSOR_ID_LBN 0 1098#define MUM_EVENT_SENSOR_ID_WIDTH 8 1099/* Enum values, see field(s): */ 1100/* MC_CMD_SENSOR_INFO/MC_CMD_SENSOR_INFO_OUT/MASK */ 1101#define MUM_EVENT_SENSOR_STATE_OFST 0 1102#define MUM_EVENT_SENSOR_STATE_LBN 8 1103#define MUM_EVENT_SENSOR_STATE_WIDTH 8 1104#define MUM_EVENT_PORT_PHY_READY_OFST 0 1105#define MUM_EVENT_PORT_PHY_READY_LBN 0 1106#define MUM_EVENT_PORT_PHY_READY_WIDTH 1 1107#define MUM_EVENT_PORT_PHY_LINK_UP_OFST 0 1108#define MUM_EVENT_PORT_PHY_LINK_UP_LBN 1 1109#define MUM_EVENT_PORT_PHY_LINK_UP_WIDTH 1 1110#define MUM_EVENT_PORT_PHY_TX_LOL_OFST 0 1111#define MUM_EVENT_PORT_PHY_TX_LOL_LBN 2 1112#define MUM_EVENT_PORT_PHY_TX_LOL_WIDTH 1 1113#define MUM_EVENT_PORT_PHY_RX_LOL_OFST 0 1114#define MUM_EVENT_PORT_PHY_RX_LOL_LBN 3 1115#define MUM_EVENT_PORT_PHY_RX_LOL_WIDTH 1 1116#define MUM_EVENT_PORT_PHY_TX_LOS_OFST 0 1117#define MUM_EVENT_PORT_PHY_TX_LOS_LBN 4 1118#define MUM_EVENT_PORT_PHY_TX_LOS_WIDTH 1 1119#define MUM_EVENT_PORT_PHY_RX_LOS_OFST 0 1120#define MUM_EVENT_PORT_PHY_RX_LOS_LBN 5 1121#define MUM_EVENT_PORT_PHY_RX_LOS_WIDTH 1 1122#define MUM_EVENT_PORT_PHY_TX_FAULT_OFST 0 1123#define MUM_EVENT_PORT_PHY_TX_FAULT_LBN 6 1124#define MUM_EVENT_PORT_PHY_TX_FAULT_WIDTH 1 1125#define MUM_EVENT_DATA_LBN 0 1126#define MUM_EVENT_DATA_WIDTH 32 1127#define MUM_EVENT_SRC_LBN 36 1128#define MUM_EVENT_SRC_WIDTH 8 1129#define MUM_EVENT_EV_CODE_LBN 60 1130#define MUM_EVENT_EV_CODE_WIDTH 4 1131#define MUM_EVENT_CODE_LBN 44 1132#define MUM_EVENT_CODE_WIDTH 8 1133/* enum: The MUM was rebooted. */ 1134#define MUM_EVENT_CODE_REBOOT 0x1 1135/* enum: Bad assert. */ 1136#define MUM_EVENT_CODE_ASSERT 0x2 1137/* enum: Sensor failure. */ 1138#define MUM_EVENT_CODE_SENSOR 0x3 1139/* enum: Link fault has been asserted, or has cleared. */ 1140#define MUM_EVENT_CODE_QSFP_LASI_INTERRUPT 0x4 1141#define MUM_EVENT_SENSOR_DATA_OFST 0 1142#define MUM_EVENT_SENSOR_DATA_LEN 4 1143#define MUM_EVENT_SENSOR_DATA_LBN 0 1144#define MUM_EVENT_SENSOR_DATA_WIDTH 32 1145#define MUM_EVENT_PORT_PHY_FLAGS_OFST 0 1146#define MUM_EVENT_PORT_PHY_FLAGS_LEN 4 1147#define MUM_EVENT_PORT_PHY_FLAGS_LBN 0 1148#define MUM_EVENT_PORT_PHY_FLAGS_WIDTH 32 1149#define MUM_EVENT_PORT_PHY_COPPER_LEN_OFST 0 1150#define MUM_EVENT_PORT_PHY_COPPER_LEN_LEN 4 1151#define MUM_EVENT_PORT_PHY_COPPER_LEN_LBN 0 1152#define MUM_EVENT_PORT_PHY_COPPER_LEN_WIDTH 32 1153#define MUM_EVENT_PORT_PHY_CAPS_OFST 0 1154#define MUM_EVENT_PORT_PHY_CAPS_LEN 4 1155#define MUM_EVENT_PORT_PHY_CAPS_LBN 0 1156#define MUM_EVENT_PORT_PHY_CAPS_WIDTH 32 1157#define MUM_EVENT_PORT_PHY_TECH_OFST 0 1158#define MUM_EVENT_PORT_PHY_TECH_LEN 4 1159#define MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_UNKNOWN 0x0 /* enum */ 1160#define MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_OPTICAL 0x1 /* enum */ 1161#define MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_COPPER_PASSIVE 0x2 /* enum */ 1162#define MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_COPPER_PASSIVE_EQUALIZED 0x3 /* enum */ 1163#define MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_COPPER_ACTIVE_LIMITING 0x4 /* enum */ 1164#define MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_COPPER_ACTIVE_LINEAR 0x5 /* enum */ 1165#define MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_BASE_T 0x6 /* enum */ 1166#define MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_LOOPBACK_PASSIVE 0x7 /* enum */ 1167#define MUM_EVENT_PORT_PHY_TECH_LBN 0 1168#define MUM_EVENT_PORT_PHY_TECH_WIDTH 32 1169#define MUM_EVENT_PORT_PHY_SRC_DATA_ID_LBN 36 1170#define MUM_EVENT_PORT_PHY_SRC_DATA_ID_WIDTH 4 1171#define MUM_EVENT_PORT_PHY_SRC_DATA_ID_FLAGS 0x0 /* enum */ 1172#define MUM_EVENT_PORT_PHY_SRC_DATA_ID_COPPER_LEN 0x1 /* enum */ 1173#define MUM_EVENT_PORT_PHY_SRC_DATA_ID_CAPS 0x2 /* enum */ 1174#define MUM_EVENT_PORT_PHY_SRC_DATA_ID_TECH 0x3 /* enum */ 1175#define MUM_EVENT_PORT_PHY_SRC_DATA_ID_MAX 0x4 /* enum */ 1176#define MUM_EVENT_PORT_PHY_SRC_PORT_NO_LBN 40 1177#define MUM_EVENT_PORT_PHY_SRC_PORT_NO_WIDTH 4 1178 1179 1180/***********************************/ 1181/* MC_CMD_READ32 1182 * Read multiple 32byte words from MC memory. Note - this command really 1183 * belongs to INSECURE category but is required by shmboot. The command handler 1184 * has additional checks to reject insecure calls. 1185 */ 1186#define MC_CMD_READ32 0x1 1187#undef MC_CMD_0x1_PRIVILEGE_CTG 1188 1189#define MC_CMD_0x1_PRIVILEGE_CTG SRIOV_CTG_ADMIN 1190 1191/* MC_CMD_READ32_IN msgrequest */ 1192#define MC_CMD_READ32_IN_LEN 8 1193#define MC_CMD_READ32_IN_ADDR_OFST 0 1194#define MC_CMD_READ32_IN_ADDR_LEN 4 1195#define MC_CMD_READ32_IN_NUMWORDS_OFST 4 1196#define MC_CMD_READ32_IN_NUMWORDS_LEN 4 1197 1198/* MC_CMD_READ32_OUT msgresponse */ 1199#define MC_CMD_READ32_OUT_LENMIN 4 1200#define MC_CMD_READ32_OUT_LENMAX 252 1201#define MC_CMD_READ32_OUT_LENMAX_MCDI2 1020 1202#define MC_CMD_READ32_OUT_LEN(num) (0+4*(num)) 1203#define MC_CMD_READ32_OUT_BUFFER_NUM(len) (((len)-0)/4) 1204#define MC_CMD_READ32_OUT_BUFFER_OFST 0 1205#define MC_CMD_READ32_OUT_BUFFER_LEN 4 1206#define MC_CMD_READ32_OUT_BUFFER_MINNUM 1 1207#define MC_CMD_READ32_OUT_BUFFER_MAXNUM 63 1208#define MC_CMD_READ32_OUT_BUFFER_MAXNUM_MCDI2 255 1209 1210 1211/***********************************/ 1212/* MC_CMD_WRITE32 1213 * Write multiple 32byte words to MC memory. 1214 */ 1215#define MC_CMD_WRITE32 0x2 1216#undef MC_CMD_0x2_PRIVILEGE_CTG 1217 1218#define MC_CMD_0x2_PRIVILEGE_CTG SRIOV_CTG_INSECURE 1219 1220/* MC_CMD_WRITE32_IN msgrequest */ 1221#define MC_CMD_WRITE32_IN_LENMIN 8 1222#define MC_CMD_WRITE32_IN_LENMAX 252 1223#define MC_CMD_WRITE32_IN_LENMAX_MCDI2 1020 1224#define MC_CMD_WRITE32_IN_LEN(num) (4+4*(num)) 1225#define MC_CMD_WRITE32_IN_BUFFER_NUM(len) (((len)-4)/4) 1226#define MC_CMD_WRITE32_IN_ADDR_OFST 0 1227#define MC_CMD_WRITE32_IN_ADDR_LEN 4 1228#define MC_CMD_WRITE32_IN_BUFFER_OFST 4 1229#define MC_CMD_WRITE32_IN_BUFFER_LEN 4 1230#define MC_CMD_WRITE32_IN_BUFFER_MINNUM 1 1231#define MC_CMD_WRITE32_IN_BUFFER_MAXNUM 62 1232#define MC_CMD_WRITE32_IN_BUFFER_MAXNUM_MCDI2 254 1233 1234/* MC_CMD_WRITE32_OUT msgresponse */ 1235#define MC_CMD_WRITE32_OUT_LEN 0 1236 1237 1238/***********************************/ 1239/* MC_CMD_COPYCODE 1240 * Copy MC code between two locations and jump. Note - this command really 1241 * belongs to INSECURE category but is required by shmboot. The command handler 1242 * has additional checks to reject insecure calls. 1243 */ 1244#define MC_CMD_COPYCODE 0x3 1245#undef MC_CMD_0x3_PRIVILEGE_CTG 1246 1247#define MC_CMD_0x3_PRIVILEGE_CTG SRIOV_CTG_ADMIN 1248 1249/* MC_CMD_COPYCODE_IN msgrequest */ 1250#define MC_CMD_COPYCODE_IN_LEN 16 1251/* Source address 1252 * 1253 * The main image should be entered via a copy of a single word from and to a 1254 * magic address, which controls various aspects of the boot. The magic address 1255 * is a bitfield, with each bit as documented below. 1256 */ 1257#define MC_CMD_COPYCODE_IN_SRC_ADDR_OFST 0 1258#define MC_CMD_COPYCODE_IN_SRC_ADDR_LEN 4 1259/* enum: Deprecated; equivalent to setting BOOT_MAGIC_PRESENT (see below) */ 1260#define MC_CMD_COPYCODE_HUNT_NO_MAGIC_ADDR 0x10000 1261/* enum: Deprecated; equivalent to setting BOOT_MAGIC_PRESENT and 1262 * BOOT_MAGIC_SATELLITE_CPUS_NOT_LOADED (see below) 1263 */ 1264#define MC_CMD_COPYCODE_HUNT_NO_DATAPATH_MAGIC_ADDR 0x1d0d0 1265/* enum: Deprecated; equivalent to setting BOOT_MAGIC_PRESENT, 1266 * BOOT_MAGIC_SATELLITE_CPUS_NOT_LOADED and BOOT_MAGIC_IGNORE_CONFIG (see 1267 * below) 1268 */ 1269#define MC_CMD_COPYCODE_HUNT_IGNORE_CONFIG_MAGIC_ADDR 0x1badc 1270#define MC_CMD_COPYCODE_IN_BOOT_MAGIC_PRESENT_OFST 0 1271#define MC_CMD_COPYCODE_IN_BOOT_MAGIC_PRESENT_LBN 17 1272#define MC_CMD_COPYCODE_IN_BOOT_MAGIC_PRESENT_WIDTH 1 1273#define MC_CMD_COPYCODE_IN_BOOT_MAGIC_SATELLITE_CPUS_NOT_LOADED_OFST 0 1274#define MC_CMD_COPYCODE_IN_BOOT_MAGIC_SATELLITE_CPUS_NOT_LOADED_LBN 2 1275#define MC_CMD_COPYCODE_IN_BOOT_MAGIC_SATELLITE_CPUS_NOT_LOADED_WIDTH 1 1276#define MC_CMD_COPYCODE_IN_BOOT_MAGIC_IGNORE_CONFIG_OFST 0 1277#define MC_CMD_COPYCODE_IN_BOOT_MAGIC_IGNORE_CONFIG_LBN 3 1278#define MC_CMD_COPYCODE_IN_BOOT_MAGIC_IGNORE_CONFIG_WIDTH 1 1279#define MC_CMD_COPYCODE_IN_BOOT_MAGIC_SKIP_BOOT_ICORE_SYNC_OFST 0 1280#define MC_CMD_COPYCODE_IN_BOOT_MAGIC_SKIP_BOOT_ICORE_SYNC_LBN 4 1281#define MC_CMD_COPYCODE_IN_BOOT_MAGIC_SKIP_BOOT_ICORE_SYNC_WIDTH 1 1282#define MC_CMD_COPYCODE_IN_BOOT_MAGIC_FORCE_STANDALONE_OFST 0 1283#define MC_CMD_COPYCODE_IN_BOOT_MAGIC_FORCE_STANDALONE_LBN 5 1284#define MC_CMD_COPYCODE_IN_BOOT_MAGIC_FORCE_STANDALONE_WIDTH 1 1285#define MC_CMD_COPYCODE_IN_BOOT_MAGIC_DISABLE_XIP_OFST 0 1286#define MC_CMD_COPYCODE_IN_BOOT_MAGIC_DISABLE_XIP_LBN 6 1287#define MC_CMD_COPYCODE_IN_BOOT_MAGIC_DISABLE_XIP_WIDTH 1 1288/* Destination address */ 1289#define MC_CMD_COPYCODE_IN_DEST_ADDR_OFST 4 1290#define MC_CMD_COPYCODE_IN_DEST_ADDR_LEN 4 1291#define MC_CMD_COPYCODE_IN_NUMWORDS_OFST 8 1292#define MC_CMD_COPYCODE_IN_NUMWORDS_LEN 4 1293/* Address of where to jump after copy. */ 1294#define MC_CMD_COPYCODE_IN_JUMP_OFST 12 1295#define MC_CMD_COPYCODE_IN_JUMP_LEN 4 1296/* enum: Control should return to the caller rather than jumping */ 1297#define MC_CMD_COPYCODE_JUMP_NONE 0x1 1298 1299/* MC_CMD_COPYCODE_OUT msgresponse */ 1300#define MC_CMD_COPYCODE_OUT_LEN 0 1301 1302 1303/***********************************/ 1304/* MC_CMD_SET_FUNC 1305 * Select function for function-specific commands. 1306 */ 1307#define MC_CMD_SET_FUNC 0x4 1308#undef MC_CMD_0x4_PRIVILEGE_CTG 1309 1310#define MC_CMD_0x4_PRIVILEGE_CTG SRIOV_CTG_INSECURE 1311 1312/* MC_CMD_SET_FUNC_IN msgrequest */ 1313#define MC_CMD_SET_FUNC_IN_LEN 4 1314/* Set function */ 1315#define MC_CMD_SET_FUNC_IN_FUNC_OFST 0 1316#define MC_CMD_SET_FUNC_IN_FUNC_LEN 4 1317 1318/* MC_CMD_SET_FUNC_OUT msgresponse */ 1319#define MC_CMD_SET_FUNC_OUT_LEN 0 1320 1321 1322/***********************************/ 1323/* MC_CMD_GET_BOOT_STATUS 1324 * Get the instruction address from which the MC booted. 1325 */ 1326#define MC_CMD_GET_BOOT_STATUS 0x5 1327#undef MC_CMD_0x5_PRIVILEGE_CTG 1328 1329#define MC_CMD_0x5_PRIVILEGE_CTG SRIOV_CTG_GENERAL 1330 1331/* MC_CMD_GET_BOOT_STATUS_IN msgrequest */ 1332#define MC_CMD_GET_BOOT_STATUS_IN_LEN 0 1333 1334/* MC_CMD_GET_BOOT_STATUS_OUT msgresponse */ 1335#define MC_CMD_GET_BOOT_STATUS_OUT_LEN 8 1336/* ?? */ 1337#define MC_CMD_GET_BOOT_STATUS_OUT_BOOT_OFFSET_OFST 0 1338#define MC_CMD_GET_BOOT_STATUS_OUT_BOOT_OFFSET_LEN 4 1339/* enum: indicates that the MC wasn't flash booted */ 1340#define MC_CMD_GET_BOOT_STATUS_OUT_BOOT_OFFSET_NULL 0xdeadbeef 1341#define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_OFST 4 1342#define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_LEN 4 1343#define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_WATCHDOG_OFST 4 1344#define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_WATCHDOG_LBN 0 1345#define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_WATCHDOG_WIDTH 1 1346#define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_PRIMARY_OFST 4 1347#define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_PRIMARY_LBN 1 1348#define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_PRIMARY_WIDTH 1 1349#define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_BACKUP_OFST 4 1350#define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_BACKUP_LBN 2 1351#define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_BACKUP_WIDTH 1 1352 1353 1354/***********************************/ 1355/* MC_CMD_GET_ASSERTS 1356 * Get (and optionally clear) the current assertion status. Only 1357 * OUT.GLOBAL_FLAGS is guaranteed to exist in the completion payload. The other 1358 * fields will only be present if OUT.GLOBAL_FLAGS != NO_FAILS 1359 */ 1360#define MC_CMD_GET_ASSERTS 0x6 1361#undef MC_CMD_0x6_PRIVILEGE_CTG 1362 1363#define MC_CMD_0x6_PRIVILEGE_CTG SRIOV_CTG_ADMIN 1364 1365/* MC_CMD_GET_ASSERTS_IN msgrequest */ 1366#define MC_CMD_GET_ASSERTS_IN_LEN 4 1367/* Set to clear assertion */ 1368#define MC_CMD_GET_ASSERTS_IN_CLEAR_OFST 0 1369#define MC_CMD_GET_ASSERTS_IN_CLEAR_LEN 4 1370 1371/* MC_CMD_GET_ASSERTS_OUT msgresponse */ 1372#define MC_CMD_GET_ASSERTS_OUT_LEN 140 1373/* Assertion status flag. */ 1374#define MC_CMD_GET_ASSERTS_OUT_GLOBAL_FLAGS_OFST 0 1375#define MC_CMD_GET_ASSERTS_OUT_GLOBAL_FLAGS_LEN 4 1376/* enum: No assertions have failed. */ 1377#define MC_CMD_GET_ASSERTS_FLAGS_NO_FAILS 0x1 1378/* enum: A system-level assertion has failed. */ 1379#define MC_CMD_GET_ASSERTS_FLAGS_SYS_FAIL 0x2 1380/* enum: A thread-level assertion has failed. */ 1381#define MC_CMD_GET_ASSERTS_FLAGS_THR_FAIL 0x3 1382/* enum: The system was reset by the watchdog. */ 1383#define MC_CMD_GET_ASSERTS_FLAGS_WDOG_FIRED 0x4 1384/* enum: An illegal address trap stopped the system (huntington and later) */ 1385#define MC_CMD_GET_ASSERTS_FLAGS_ADDR_TRAP 0x5 1386/* Failing PC value */ 1387#define MC_CMD_GET_ASSERTS_OUT_SAVED_PC_OFFS_OFST 4 1388#define MC_CMD_GET_ASSERTS_OUT_SAVED_PC_OFFS_LEN 4 1389/* Saved GP regs */ 1390#define MC_CMD_GET_ASSERTS_OUT_GP_REGS_OFFS_OFST 8 1391#define MC_CMD_GET_ASSERTS_OUT_GP_REGS_OFFS_LEN 4 1392#define MC_CMD_GET_ASSERTS_OUT_GP_REGS_OFFS_NUM 31 1393/* enum: A magic value hinting that the value in this register at the time of 1394 * the failure has likely been lost. 1395 */ 1396#define MC_CMD_GET_ASSERTS_REG_NO_DATA 0xda7a1057 1397/* Failing thread address */ 1398#define MC_CMD_GET_ASSERTS_OUT_THREAD_OFFS_OFST 132 1399#define MC_CMD_GET_ASSERTS_OUT_THREAD_OFFS_LEN 4 1400#define MC_CMD_GET_ASSERTS_OUT_RESERVED_OFST 136 1401#define MC_CMD_GET_ASSERTS_OUT_RESERVED_LEN 4 1402 1403/* MC_CMD_GET_ASSERTS_OUT_V2 msgresponse: Extended response for MicroBlaze CPUs 1404 * found on Riverhead designs 1405 */ 1406#define MC_CMD_GET_ASSERTS_OUT_V2_LEN 240 1407/* Assertion status flag. */ 1408#define MC_CMD_GET_ASSERTS_OUT_V2_GLOBAL_FLAGS_OFST 0 1409#define MC_CMD_GET_ASSERTS_OUT_V2_GLOBAL_FLAGS_LEN 4 1410/* enum: No assertions have failed. */ 1411/* MC_CMD_GET_ASSERTS_FLAGS_NO_FAILS 0x1 */ 1412/* enum: A system-level assertion has failed. */ 1413/* MC_CMD_GET_ASSERTS_FLAGS_SYS_FAIL 0x2 */ 1414/* enum: A thread-level assertion has failed. */ 1415/* MC_CMD_GET_ASSERTS_FLAGS_THR_FAIL 0x3 */ 1416/* enum: The system was reset by the watchdog. */ 1417/* MC_CMD_GET_ASSERTS_FLAGS_WDOG_FIRED 0x4 */ 1418/* enum: An illegal address trap stopped the system (huntington and later) */ 1419/* MC_CMD_GET_ASSERTS_FLAGS_ADDR_TRAP 0x5 */ 1420/* Failing PC value */ 1421#define MC_CMD_GET_ASSERTS_OUT_V2_SAVED_PC_OFFS_OFST 4 1422#define MC_CMD_GET_ASSERTS_OUT_V2_SAVED_PC_OFFS_LEN 4 1423/* Saved GP regs */ 1424#define MC_CMD_GET_ASSERTS_OUT_V2_GP_REGS_OFFS_OFST 8 1425#define MC_CMD_GET_ASSERTS_OUT_V2_GP_REGS_OFFS_LEN 4 1426#define MC_CMD_GET_ASSERTS_OUT_V2_GP_REGS_OFFS_NUM 31 1427/* enum: A magic value hinting that the value in this register at the time of 1428 * the failure has likely been lost. 1429 */ 1430/* MC_CMD_GET_ASSERTS_REG_NO_DATA 0xda7a1057 */ 1431/* Failing thread address */ 1432#define MC_CMD_GET_ASSERTS_OUT_V2_THREAD_OFFS_OFST 132 1433#define MC_CMD_GET_ASSERTS_OUT_V2_THREAD_OFFS_LEN 4 1434#define MC_CMD_GET_ASSERTS_OUT_V2_RESERVED_OFST 136 1435#define MC_CMD_GET_ASSERTS_OUT_V2_RESERVED_LEN 4 1436/* Saved Special Function Registers */ 1437#define MC_CMD_GET_ASSERTS_OUT_V2_SF_REGS_OFFS_OFST 136 1438#define MC_CMD_GET_ASSERTS_OUT_V2_SF_REGS_OFFS_LEN 4 1439#define MC_CMD_GET_ASSERTS_OUT_V2_SF_REGS_OFFS_NUM 26 1440 1441/* MC_CMD_GET_ASSERTS_OUT_V3 msgresponse: Extended response with asserted 1442 * firmware version information 1443 */ 1444#define MC_CMD_GET_ASSERTS_OUT_V3_LEN 360 1445/* Assertion status flag. */ 1446#define MC_CMD_GET_ASSERTS_OUT_V3_GLOBAL_FLAGS_OFST 0 1447#define MC_CMD_GET_ASSERTS_OUT_V3_GLOBAL_FLAGS_LEN 4 1448/* enum: No assertions have failed. */ 1449/* MC_CMD_GET_ASSERTS_FLAGS_NO_FAILS 0x1 */ 1450/* enum: A system-level assertion has failed. */ 1451/* MC_CMD_GET_ASSERTS_FLAGS_SYS_FAIL 0x2 */ 1452/* enum: A thread-level assertion has failed. */ 1453/* MC_CMD_GET_ASSERTS_FLAGS_THR_FAIL 0x3 */ 1454/* enum: The system was reset by the watchdog. */ 1455/* MC_CMD_GET_ASSERTS_FLAGS_WDOG_FIRED 0x4 */ 1456/* enum: An illegal address trap stopped the system (huntington and later) */ 1457/* MC_CMD_GET_ASSERTS_FLAGS_ADDR_TRAP 0x5 */ 1458/* Failing PC value */ 1459#define MC_CMD_GET_ASSERTS_OUT_V3_SAVED_PC_OFFS_OFST 4 1460#define MC_CMD_GET_ASSERTS_OUT_V3_SAVED_PC_OFFS_LEN 4 1461/* Saved GP regs */ 1462#define MC_CMD_GET_ASSERTS_OUT_V3_GP_REGS_OFFS_OFST 8 1463#define MC_CMD_GET_ASSERTS_OUT_V3_GP_REGS_OFFS_LEN 4 1464#define MC_CMD_GET_ASSERTS_OUT_V3_GP_REGS_OFFS_NUM 31 1465/* enum: A magic value hinting that the value in this register at the time of 1466 * the failure has likely been lost. 1467 */ 1468/* MC_CMD_GET_ASSERTS_REG_NO_DATA 0xda7a1057 */ 1469/* Failing thread address */ 1470#define MC_CMD_GET_ASSERTS_OUT_V3_THREAD_OFFS_OFST 132 1471#define MC_CMD_GET_ASSERTS_OUT_V3_THREAD_OFFS_LEN 4 1472#define MC_CMD_GET_ASSERTS_OUT_V3_RESERVED_OFST 136 1473#define MC_CMD_GET_ASSERTS_OUT_V3_RESERVED_LEN 4 1474/* Saved Special Function Registers */ 1475#define MC_CMD_GET_ASSERTS_OUT_V3_SF_REGS_OFFS_OFST 136 1476#define MC_CMD_GET_ASSERTS_OUT_V3_SF_REGS_OFFS_LEN 4 1477#define MC_CMD_GET_ASSERTS_OUT_V3_SF_REGS_OFFS_NUM 26 1478/* MC firmware unique build ID (as binary SHA-1 value) */ 1479#define MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_BUILD_ID_OFST 240 1480#define MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_BUILD_ID_LEN 20 1481/* MC firmware build date (as Unix timestamp) */ 1482#define MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_BUILD_TIMESTAMP_OFST 260 1483#define MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_BUILD_TIMESTAMP_LEN 8 1484#define MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_BUILD_TIMESTAMP_LO_OFST 260 1485#define MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_BUILD_TIMESTAMP_HI_OFST 264 1486/* MC firmware version number */ 1487#define MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_VERSION_OFST 268 1488#define MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_VERSION_LEN 8 1489#define MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_VERSION_LO_OFST 268 1490#define MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_VERSION_HI_OFST 272 1491/* MC firmware security level */ 1492#define MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_SECURITY_LEVEL_OFST 276 1493#define MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_SECURITY_LEVEL_LEN 4 1494/* MC firmware extra version info (as null-terminated US-ASCII string) */ 1495#define MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_EXTRA_INFO_OFST 280 1496#define MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_EXTRA_INFO_LEN 16 1497/* MC firmware build name (as null-terminated US-ASCII string) */ 1498#define MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_BUILD_NAME_OFST 296 1499#define MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_BUILD_NAME_LEN 64 1500 1501 1502/***********************************/ 1503/* MC_CMD_LOG_CTRL 1504 * Configure the output stream for log events such as link state changes, 1505 * sensor notifications and MCDI completions 1506 */ 1507#define MC_CMD_LOG_CTRL 0x7 1508#undef MC_CMD_0x7_PRIVILEGE_CTG 1509 1510#define MC_CMD_0x7_PRIVILEGE_CTG SRIOV_CTG_GENERAL 1511 1512/* MC_CMD_LOG_CTRL_IN msgrequest */ 1513#define MC_CMD_LOG_CTRL_IN_LEN 8 1514/* Log destination */ 1515#define MC_CMD_LOG_CTRL_IN_LOG_DEST_OFST 0 1516#define MC_CMD_LOG_CTRL_IN_LOG_DEST_LEN 4 1517/* enum: UART. */ 1518#define MC_CMD_LOG_CTRL_IN_LOG_DEST_UART 0x1 1519/* enum: Event queue. */ 1520#define MC_CMD_LOG_CTRL_IN_LOG_DEST_EVQ 0x2 1521/* Legacy argument. Must be zero. */ 1522#define MC_CMD_LOG_CTRL_IN_LOG_DEST_EVQ_OFST 4 1523#define MC_CMD_LOG_CTRL_IN_LOG_DEST_EVQ_LEN 4 1524 1525/* MC_CMD_LOG_CTRL_OUT msgresponse */ 1526#define MC_CMD_LOG_CTRL_OUT_LEN 0 1527 1528 1529/***********************************/ 1530/* MC_CMD_GET_VERSION 1531 * Get version information about adapter components. 1532 */ 1533#define MC_CMD_GET_VERSION 0x8 1534#undef MC_CMD_0x8_PRIVILEGE_CTG 1535 1536#define MC_CMD_0x8_PRIVILEGE_CTG SRIOV_CTG_GENERAL 1537 1538/* MC_CMD_GET_VERSION_IN msgrequest */ 1539#define MC_CMD_GET_VERSION_IN_LEN 0 1540 1541/* MC_CMD_GET_VERSION_EXT_IN msgrequest: Asks for the extended version */ 1542#define MC_CMD_GET_VERSION_EXT_IN_LEN 4 1543/* placeholder, set to 0 */ 1544#define MC_CMD_GET_VERSION_EXT_IN_EXT_FLAGS_OFST 0 1545#define MC_CMD_GET_VERSION_EXT_IN_EXT_FLAGS_LEN 4 1546 1547/* MC_CMD_GET_VERSION_V0_OUT msgresponse: deprecated version format */ 1548#define MC_CMD_GET_VERSION_V0_OUT_LEN 4 1549#define MC_CMD_GET_VERSION_OUT_FIRMWARE_OFST 0 1550#define MC_CMD_GET_VERSION_OUT_FIRMWARE_LEN 4 1551/* enum: Reserved version number to indicate "any" version. */ 1552#define MC_CMD_GET_VERSION_OUT_FIRMWARE_ANY 0xffffffff 1553/* enum: Bootrom version value for Siena. */ 1554#define MC_CMD_GET_VERSION_OUT_FIRMWARE_SIENA_BOOTROM 0xb0070000 1555/* enum: Bootrom version value for Huntington. */ 1556#define MC_CMD_GET_VERSION_OUT_FIRMWARE_HUNT_BOOTROM 0xb0070001 1557/* enum: Bootrom version value for Medford2. */ 1558#define MC_CMD_GET_VERSION_OUT_FIRMWARE_MEDFORD2_BOOTROM 0xb0070002 1559 1560/* MC_CMD_GET_VERSION_OUT msgresponse */ 1561#define MC_CMD_GET_VERSION_OUT_LEN 32 1562/* MC_CMD_GET_VERSION_OUT_FIRMWARE_OFST 0 */ 1563/* MC_CMD_GET_VERSION_OUT_FIRMWARE_LEN 4 */ 1564/* Enum values, see field(s): */ 1565/* MC_CMD_GET_VERSION_V0_OUT/MC_CMD_GET_VERSION_OUT_FIRMWARE */ 1566#define MC_CMD_GET_VERSION_OUT_PCOL_OFST 4 1567#define MC_CMD_GET_VERSION_OUT_PCOL_LEN 4 1568/* 128bit mask of functions supported by the current firmware */ 1569#define MC_CMD_GET_VERSION_OUT_SUPPORTED_FUNCS_OFST 8 1570#define MC_CMD_GET_VERSION_OUT_SUPPORTED_FUNCS_LEN 16 1571#define MC_CMD_GET_VERSION_OUT_VERSION_OFST 24 1572#define MC_CMD_GET_VERSION_OUT_VERSION_LEN 8 1573#define MC_CMD_GET_VERSION_OUT_VERSION_LO_OFST 24 1574#define MC_CMD_GET_VERSION_OUT_VERSION_HI_OFST 28 1575 1576/* MC_CMD_GET_VERSION_EXT_OUT msgresponse */ 1577#define MC_CMD_GET_VERSION_EXT_OUT_LEN 48 1578/* MC_CMD_GET_VERSION_OUT_FIRMWARE_OFST 0 */ 1579/* MC_CMD_GET_VERSION_OUT_FIRMWARE_LEN 4 */ 1580/* Enum values, see field(s): */ 1581/* MC_CMD_GET_VERSION_V0_OUT/MC_CMD_GET_VERSION_OUT_FIRMWARE */ 1582#define MC_CMD_GET_VERSION_EXT_OUT_PCOL_OFST 4 1583#define MC_CMD_GET_VERSION_EXT_OUT_PCOL_LEN 4 1584/* 128bit mask of functions supported by the current firmware */ 1585#define MC_CMD_GET_VERSION_EXT_OUT_SUPPORTED_FUNCS_OFST 8 1586#define MC_CMD_GET_VERSION_EXT_OUT_SUPPORTED_FUNCS_LEN 16 1587#define MC_CMD_GET_VERSION_EXT_OUT_VERSION_OFST 24 1588#define MC_CMD_GET_VERSION_EXT_OUT_VERSION_LEN 8 1589#define MC_CMD_GET_VERSION_EXT_OUT_VERSION_LO_OFST 24 1590#define MC_CMD_GET_VERSION_EXT_OUT_VERSION_HI_OFST 28 1591/* extra info */ 1592#define MC_CMD_GET_VERSION_EXT_OUT_EXTRA_OFST 32 1593#define MC_CMD_GET_VERSION_EXT_OUT_EXTRA_LEN 16 1594 1595/* MC_CMD_GET_VERSION_V2_OUT msgresponse: Extended response providing version 1596 * information for all adapter components. For Riverhead based designs, base MC 1597 * firmware version fields refer to NMC firmware, while CMC firmware data is in 1598 * dedicated CMC fields. Flags indicate which data is present in the response 1599 * (depending on which components exist on a particular adapter) 1600 */ 1601#define MC_CMD_GET_VERSION_V2_OUT_LEN 304 1602/* MC_CMD_GET_VERSION_OUT_FIRMWARE_OFST 0 */ 1603/* MC_CMD_GET_VERSION_OUT_FIRMWARE_LEN 4 */ 1604/* Enum values, see field(s): */ 1605/* MC_CMD_GET_VERSION_V0_OUT/MC_CMD_GET_VERSION_OUT_FIRMWARE */ 1606#define MC_CMD_GET_VERSION_V2_OUT_PCOL_OFST 4 1607#define MC_CMD_GET_VERSION_V2_OUT_PCOL_LEN 4 1608/* 128bit mask of functions supported by the current firmware */ 1609#define MC_CMD_GET_VERSION_V2_OUT_SUPPORTED_FUNCS_OFST 8 1610#define MC_CMD_GET_VERSION_V2_OUT_SUPPORTED_FUNCS_LEN 16 1611#define MC_CMD_GET_VERSION_V2_OUT_VERSION_OFST 24 1612#define MC_CMD_GET_VERSION_V2_OUT_VERSION_LEN 8 1613#define MC_CMD_GET_VERSION_V2_OUT_VERSION_LO_OFST 24 1614#define MC_CMD_GET_VERSION_V2_OUT_VERSION_HI_OFST 28 1615/* extra info */ 1616#define MC_CMD_GET_VERSION_V2_OUT_EXTRA_OFST 32 1617#define MC_CMD_GET_VERSION_V2_OUT_EXTRA_LEN 16 1618/* Flags indicating which extended fields are valid */ 1619#define MC_CMD_GET_VERSION_V2_OUT_FLAGS_OFST 48 1620#define MC_CMD_GET_VERSION_V2_OUT_FLAGS_LEN 4 1621#define MC_CMD_GET_VERSION_V2_OUT_MCFW_EXT_INFO_PRESENT_OFST 48 1622#define MC_CMD_GET_VERSION_V2_OUT_MCFW_EXT_INFO_PRESENT_LBN 0 1623#define MC_CMD_GET_VERSION_V2_OUT_MCFW_EXT_INFO_PRESENT_WIDTH 1 1624#define MC_CMD_GET_VERSION_V2_OUT_SUCFW_EXT_INFO_PRESENT_OFST 48 1625#define MC_CMD_GET_VERSION_V2_OUT_SUCFW_EXT_INFO_PRESENT_LBN 1 1626#define MC_CMD_GET_VERSION_V2_OUT_SUCFW_EXT_INFO_PRESENT_WIDTH 1 1627#define MC_CMD_GET_VERSION_V2_OUT_CMC_EXT_INFO_PRESENT_OFST 48 1628#define MC_CMD_GET_VERSION_V2_OUT_CMC_EXT_INFO_PRESENT_LBN 2 1629#define MC_CMD_GET_VERSION_V2_OUT_CMC_EXT_INFO_PRESENT_WIDTH 1 1630#define MC_CMD_GET_VERSION_V2_OUT_FPGA_EXT_INFO_PRESENT_OFST 48 1631#define MC_CMD_GET_VERSION_V2_OUT_FPGA_EXT_INFO_PRESENT_LBN 3 1632#define MC_CMD_GET_VERSION_V2_OUT_FPGA_EXT_INFO_PRESENT_WIDTH 1 1633#define MC_CMD_GET_VERSION_V2_OUT_BOARD_EXT_INFO_PRESENT_OFST 48 1634#define MC_CMD_GET_VERSION_V2_OUT_BOARD_EXT_INFO_PRESENT_LBN 4 1635#define MC_CMD_GET_VERSION_V2_OUT_BOARD_EXT_INFO_PRESENT_WIDTH 1 1636/* MC firmware unique build ID (as binary SHA-1 value) */ 1637#define MC_CMD_GET_VERSION_V2_OUT_MCFW_BUILD_ID_OFST 52 1638#define MC_CMD_GET_VERSION_V2_OUT_MCFW_BUILD_ID_LEN 20 1639/* MC firmware security level */ 1640#define MC_CMD_GET_VERSION_V2_OUT_MCFW_SECURITY_LEVEL_OFST 72 1641#define MC_CMD_GET_VERSION_V2_OUT_MCFW_SECURITY_LEVEL_LEN 4 1642/* MC firmware build name (as null-terminated US-ASCII string) */ 1643#define MC_CMD_GET_VERSION_V2_OUT_MCFW_BUILD_NAME_OFST 76 1644#define MC_CMD_GET_VERSION_V2_OUT_MCFW_BUILD_NAME_LEN 64 1645/* The SUC firmware version as four numbers - a.b.c.d */ 1646#define MC_CMD_GET_VERSION_V2_OUT_SUCFW_VERSION_OFST 140 1647#define MC_CMD_GET_VERSION_V2_OUT_SUCFW_VERSION_LEN 4 1648#define MC_CMD_GET_VERSION_V2_OUT_SUCFW_VERSION_NUM 4 1649/* SUC firmware build date (as 64-bit Unix timestamp) */ 1650#define MC_CMD_GET_VERSION_V2_OUT_SUCFW_BUILD_DATE_OFST 156 1651#define MC_CMD_GET_VERSION_V2_OUT_SUCFW_BUILD_DATE_LEN 8 1652#define MC_CMD_GET_VERSION_V2_OUT_SUCFW_BUILD_DATE_LO_OFST 156 1653#define MC_CMD_GET_VERSION_V2_OUT_SUCFW_BUILD_DATE_HI_OFST 160 1654/* The ID of the SUC chip. This is specific to the platform but typically 1655 * indicates family, memory sizes etc. See SF-116728-SW for further details. 1656 */ 1657#define MC_CMD_GET_VERSION_V2_OUT_SUCFW_CHIP_ID_OFST 164 1658#define MC_CMD_GET_VERSION_V2_OUT_SUCFW_CHIP_ID_LEN 4 1659/* The CMC firmware version as four numbers - a.b.c.d */ 1660#define MC_CMD_GET_VERSION_V2_OUT_CMCFW_VERSION_OFST 168 1661#define MC_CMD_GET_VERSION_V2_OUT_CMCFW_VERSION_LEN 4 1662#define MC_CMD_GET_VERSION_V2_OUT_CMCFW_VERSION_NUM 4 1663/* CMC firmware build date (as 64-bit Unix timestamp) */ 1664#define MC_CMD_GET_VERSION_V2_OUT_CMCFW_BUILD_DATE_OFST 184 1665#define MC_CMD_GET_VERSION_V2_OUT_CMCFW_BUILD_DATE_LEN 8 1666#define MC_CMD_GET_VERSION_V2_OUT_CMCFW_BUILD_DATE_LO_OFST 184 1667#define MC_CMD_GET_VERSION_V2_OUT_CMCFW_BUILD_DATE_HI_OFST 188 1668/* FPGA version as three numbers. On Riverhead based systems this field uses 1669 * the same encoding as hardware version ID registers (MC_FPGA_BUILD_HWRD_REG): 1670 * FPGA_VERSION[0]: x => Image H{x} FPGA_VERSION[1]: Revision letter (0 => A, 1 1671 * => B, ...) FPGA_VERSION[2]: Sub-revision number 1672 */ 1673#define MC_CMD_GET_VERSION_V2_OUT_FPGA_VERSION_OFST 192 1674#define MC_CMD_GET_VERSION_V2_OUT_FPGA_VERSION_LEN 4 1675#define MC_CMD_GET_VERSION_V2_OUT_FPGA_VERSION_NUM 3 1676/* Extra FPGA revision information (as null-terminated US-ASCII string) */ 1677#define MC_CMD_GET_VERSION_V2_OUT_FPGA_EXTRA_OFST 204 1678#define MC_CMD_GET_VERSION_V2_OUT_FPGA_EXTRA_LEN 16 1679/* Board name / adapter model (as null-terminated US-ASCII string) */ 1680#define MC_CMD_GET_VERSION_V2_OUT_BOARD_NAME_OFST 220 1681#define MC_CMD_GET_VERSION_V2_OUT_BOARD_NAME_LEN 16 1682/* Board revision number */ 1683#define MC_CMD_GET_VERSION_V2_OUT_BOARD_REVISION_OFST 236 1684#define MC_CMD_GET_VERSION_V2_OUT_BOARD_REVISION_LEN 4 1685/* Board serial number (as null-terminated US-ASCII string) */ 1686#define MC_CMD_GET_VERSION_V2_OUT_BOARD_SERIAL_OFST 240 1687#define MC_CMD_GET_VERSION_V2_OUT_BOARD_SERIAL_LEN 64 1688 1689 1690/***********************************/ 1691/* MC_CMD_PTP 1692 * Perform PTP operation 1693 */ 1694#define MC_CMD_PTP 0xb 1695#undef MC_CMD_0xb_PRIVILEGE_CTG 1696 1697#define MC_CMD_0xb_PRIVILEGE_CTG SRIOV_CTG_GENERAL 1698 1699/* MC_CMD_PTP_IN msgrequest */ 1700#define MC_CMD_PTP_IN_LEN 1 1701/* PTP operation code */ 1702#define MC_CMD_PTP_IN_OP_OFST 0 1703#define MC_CMD_PTP_IN_OP_LEN 1 1704/* enum: Enable PTP packet timestamping operation. */ 1705#define MC_CMD_PTP_OP_ENABLE 0x1 1706/* enum: Disable PTP packet timestamping operation. */ 1707#define MC_CMD_PTP_OP_DISABLE 0x2 1708/* enum: Send a PTP packet. This operation is used on Siena and Huntington. 1709 * From Medford onwards it is not supported: on those platforms PTP transmit 1710 * timestamping is done using the fast path. 1711 */ 1712#define MC_CMD_PTP_OP_TRANSMIT 0x3 1713/* enum: Read the current NIC time. */ 1714#define MC_CMD_PTP_OP_READ_NIC_TIME 0x4 1715/* enum: Get the current PTP status. Note that the clock frequency returned (in 1716 * Hz) is rounded to the nearest MHz (e.g. 666000000 for 666666666). 1717 */ 1718#define MC_CMD_PTP_OP_STATUS 0x5 1719/* enum: Adjust the PTP NIC's time. */ 1720#define MC_CMD_PTP_OP_ADJUST 0x6 1721/* enum: Synchronize host and NIC time. */ 1722#define MC_CMD_PTP_OP_SYNCHRONIZE 0x7 1723/* enum: Basic manufacturing tests. Siena PTP adapters only. */ 1724#define MC_CMD_PTP_OP_MANFTEST_BASIC 0x8 1725/* enum: Packet based manufacturing tests. Siena PTP adapters only. */ 1726#define MC_CMD_PTP_OP_MANFTEST_PACKET 0x9 1727/* enum: Reset some of the PTP related statistics */ 1728#define MC_CMD_PTP_OP_RESET_STATS 0xa 1729/* enum: Debug operations to MC. */ 1730#define MC_CMD_PTP_OP_DEBUG 0xb 1731/* enum: Read an FPGA register. Siena PTP adapters only. */ 1732#define MC_CMD_PTP_OP_FPGAREAD 0xc 1733/* enum: Write an FPGA register. Siena PTP adapters only. */ 1734#define MC_CMD_PTP_OP_FPGAWRITE 0xd 1735/* enum: Apply an offset to the NIC clock */ 1736#define MC_CMD_PTP_OP_CLOCK_OFFSET_ADJUST 0xe 1737/* enum: Change the frequency correction applied to the NIC clock */ 1738#define MC_CMD_PTP_OP_CLOCK_FREQ_ADJUST 0xf 1739/* enum: Set the MC packet filter VLAN tags for received PTP packets. 1740 * Deprecated for Huntington onwards. 1741 */ 1742#define MC_CMD_PTP_OP_RX_SET_VLAN_FILTER 0x10 1743/* enum: Set the MC packet filter UUID for received PTP packets. Deprecated for 1744 * Huntington onwards. 1745 */ 1746#define MC_CMD_PTP_OP_RX_SET_UUID_FILTER 0x11 1747/* enum: Set the MC packet filter Domain for received PTP packets. Deprecated 1748 * for Huntington onwards. 1749 */ 1750#define MC_CMD_PTP_OP_RX_SET_DOMAIN_FILTER 0x12 1751/* enum: Set the clock source. Required for snapper tests on Huntington and 1752 * Medford. Not implemented for Siena or Medford2. 1753 */ 1754#define MC_CMD_PTP_OP_SET_CLK_SRC 0x13 1755/* enum: Reset value of Timer Reg. Not implemented. */ 1756#define MC_CMD_PTP_OP_RST_CLK 0x14 1757/* enum: Enable the forwarding of PPS events to the host */ 1758#define MC_CMD_PTP_OP_PPS_ENABLE 0x15 1759/* enum: Get the time format used by this NIC for PTP operations */ 1760#define MC_CMD_PTP_OP_GET_TIME_FORMAT 0x16 1761/* enum: Get the clock attributes. NOTE- extended version of 1762 * MC_CMD_PTP_OP_GET_TIME_FORMAT 1763 */ 1764#define MC_CMD_PTP_OP_GET_ATTRIBUTES 0x16 1765/* enum: Get corrections that should be applied to the various different 1766 * timestamps 1767 */ 1768#define MC_CMD_PTP_OP_GET_TIMESTAMP_CORRECTIONS 0x17 1769/* enum: Subscribe to receive periodic time events indicating the current NIC 1770 * time 1771 */ 1772#define MC_CMD_PTP_OP_TIME_EVENT_SUBSCRIBE 0x18 1773/* enum: Unsubscribe to stop receiving time events */ 1774#define MC_CMD_PTP_OP_TIME_EVENT_UNSUBSCRIBE 0x19 1775/* enum: PPS based manfacturing tests. Requires PPS output to be looped to PPS 1776 * input on the same NIC. Siena PTP adapters only. 1777 */ 1778#define MC_CMD_PTP_OP_MANFTEST_PPS 0x1a 1779/* enum: Set the PTP sync status. Status is used by firmware to report to event 1780 * subscribers. 1781 */ 1782#define MC_CMD_PTP_OP_SET_SYNC_STATUS 0x1b 1783/* enum: Above this for future use. */ 1784#define MC_CMD_PTP_OP_MAX 0x1c 1785 1786/* MC_CMD_PTP_IN_ENABLE msgrequest */ 1787#define MC_CMD_PTP_IN_ENABLE_LEN 16 1788#define MC_CMD_PTP_IN_CMD_OFST 0 1789#define MC_CMD_PTP_IN_CMD_LEN 4 1790#define MC_CMD_PTP_IN_PERIPH_ID_OFST 4 1791#define MC_CMD_PTP_IN_PERIPH_ID_LEN 4 1792/* Not used. Events are always sent to function relative queue 0. */ 1793#define MC_CMD_PTP_IN_ENABLE_QUEUE_OFST 8 1794#define MC_CMD_PTP_IN_ENABLE_QUEUE_LEN 4 1795/* PTP timestamping mode. Not used from Huntington onwards. */ 1796#define MC_CMD_PTP_IN_ENABLE_MODE_OFST 12 1797#define MC_CMD_PTP_IN_ENABLE_MODE_LEN 4 1798/* enum: PTP, version 1 */ 1799#define MC_CMD_PTP_MODE_V1 0x0 1800/* enum: PTP, version 1, with VLAN headers - deprecated */ 1801#define MC_CMD_PTP_MODE_V1_VLAN 0x1 1802/* enum: PTP, version 2 */ 1803#define MC_CMD_PTP_MODE_V2 0x2 1804/* enum: PTP, version 2, with VLAN headers - deprecated */ 1805#define MC_CMD_PTP_MODE_V2_VLAN 0x3 1806/* enum: PTP, version 2, with improved UUID filtering */ 1807#define MC_CMD_PTP_MODE_V2_ENHANCED 0x4 1808/* enum: FCoE (seconds and microseconds) */ 1809#define MC_CMD_PTP_MODE_FCOE 0x5 1810 1811/* MC_CMD_PTP_IN_DISABLE msgrequest */ 1812#define MC_CMD_PTP_IN_DISABLE_LEN 8 1813/* MC_CMD_PTP_IN_CMD_OFST 0 */ 1814/* MC_CMD_PTP_IN_CMD_LEN 4 */ 1815/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 1816/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 1817 1818/* MC_CMD_PTP_IN_TRANSMIT msgrequest */ 1819#define MC_CMD_PTP_IN_TRANSMIT_LENMIN 13 1820#define MC_CMD_PTP_IN_TRANSMIT_LENMAX 252 1821#define MC_CMD_PTP_IN_TRANSMIT_LENMAX_MCDI2 1020 1822#define MC_CMD_PTP_IN_TRANSMIT_LEN(num) (12+1*(num)) 1823#define MC_CMD_PTP_IN_TRANSMIT_PACKET_NUM(len) (((len)-12)/1) 1824/* MC_CMD_PTP_IN_CMD_OFST 0 */ 1825/* MC_CMD_PTP_IN_CMD_LEN 4 */ 1826/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 1827/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 1828/* Transmit packet length */ 1829#define MC_CMD_PTP_IN_TRANSMIT_LENGTH_OFST 8 1830#define MC_CMD_PTP_IN_TRANSMIT_LENGTH_LEN 4 1831/* Transmit packet data */ 1832#define MC_CMD_PTP_IN_TRANSMIT_PACKET_OFST 12 1833#define MC_CMD_PTP_IN_TRANSMIT_PACKET_LEN 1 1834#define MC_CMD_PTP_IN_TRANSMIT_PACKET_MINNUM 1 1835#define MC_CMD_PTP_IN_TRANSMIT_PACKET_MAXNUM 240 1836#define MC_CMD_PTP_IN_TRANSMIT_PACKET_MAXNUM_MCDI2 1008 1837 1838/* MC_CMD_PTP_IN_READ_NIC_TIME msgrequest */ 1839#define MC_CMD_PTP_IN_READ_NIC_TIME_LEN 8 1840/* MC_CMD_PTP_IN_CMD_OFST 0 */ 1841/* MC_CMD_PTP_IN_CMD_LEN 4 */ 1842/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 1843/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 1844 1845/* MC_CMD_PTP_IN_READ_NIC_TIME_V2 msgrequest */ 1846#define MC_CMD_PTP_IN_READ_NIC_TIME_V2_LEN 8 1847/* MC_CMD_PTP_IN_CMD_OFST 0 */ 1848/* MC_CMD_PTP_IN_CMD_LEN 4 */ 1849/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 1850/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 1851 1852/* MC_CMD_PTP_IN_STATUS msgrequest */ 1853#define MC_CMD_PTP_IN_STATUS_LEN 8 1854/* MC_CMD_PTP_IN_CMD_OFST 0 */ 1855/* MC_CMD_PTP_IN_CMD_LEN 4 */ 1856/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 1857/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 1858 1859/* MC_CMD_PTP_IN_ADJUST msgrequest */ 1860#define MC_CMD_PTP_IN_ADJUST_LEN 24 1861/* MC_CMD_PTP_IN_CMD_OFST 0 */ 1862/* MC_CMD_PTP_IN_CMD_LEN 4 */ 1863/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 1864/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 1865/* Frequency adjustment 40 bit fixed point ns */ 1866#define MC_CMD_PTP_IN_ADJUST_FREQ_OFST 8 1867#define MC_CMD_PTP_IN_ADJUST_FREQ_LEN 8 1868#define MC_CMD_PTP_IN_ADJUST_FREQ_LO_OFST 8 1869#define MC_CMD_PTP_IN_ADJUST_FREQ_HI_OFST 12 1870/* enum: Number of fractional bits in frequency adjustment */ 1871#define MC_CMD_PTP_IN_ADJUST_BITS 0x28 1872/* enum: Number of fractional bits in frequency adjustment when FP44_FREQ_ADJ 1873 * is indicated in the MC_CMD_PTP_OUT_GET_ATTRIBUTES command CAPABILITIES 1874 * field. 1875 */ 1876#define MC_CMD_PTP_IN_ADJUST_BITS_FP44 0x2c 1877/* Time adjustment in seconds */ 1878#define MC_CMD_PTP_IN_ADJUST_SECONDS_OFST 16 1879#define MC_CMD_PTP_IN_ADJUST_SECONDS_LEN 4 1880/* Time adjustment major value */ 1881#define MC_CMD_PTP_IN_ADJUST_MAJOR_OFST 16 1882#define MC_CMD_PTP_IN_ADJUST_MAJOR_LEN 4 1883/* Time adjustment in nanoseconds */ 1884#define MC_CMD_PTP_IN_ADJUST_NANOSECONDS_OFST 20 1885#define MC_CMD_PTP_IN_ADJUST_NANOSECONDS_LEN 4 1886/* Time adjustment minor value */ 1887#define MC_CMD_PTP_IN_ADJUST_MINOR_OFST 20 1888#define MC_CMD_PTP_IN_ADJUST_MINOR_LEN 4 1889 1890/* MC_CMD_PTP_IN_ADJUST_V2 msgrequest */ 1891#define MC_CMD_PTP_IN_ADJUST_V2_LEN 28 1892/* MC_CMD_PTP_IN_CMD_OFST 0 */ 1893/* MC_CMD_PTP_IN_CMD_LEN 4 */ 1894/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 1895/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 1896/* Frequency adjustment 40 bit fixed point ns */ 1897#define MC_CMD_PTP_IN_ADJUST_V2_FREQ_OFST 8 1898#define MC_CMD_PTP_IN_ADJUST_V2_FREQ_LEN 8 1899#define MC_CMD_PTP_IN_ADJUST_V2_FREQ_LO_OFST 8 1900#define MC_CMD_PTP_IN_ADJUST_V2_FREQ_HI_OFST 12 1901/* enum: Number of fractional bits in frequency adjustment */ 1902/* MC_CMD_PTP_IN_ADJUST_BITS 0x28 */ 1903/* enum: Number of fractional bits in frequency adjustment when FP44_FREQ_ADJ 1904 * is indicated in the MC_CMD_PTP_OUT_GET_ATTRIBUTES command CAPABILITIES 1905 * field. 1906 */ 1907/* MC_CMD_PTP_IN_ADJUST_BITS_FP44 0x2c */ 1908/* Time adjustment in seconds */ 1909#define MC_CMD_PTP_IN_ADJUST_V2_SECONDS_OFST 16 1910#define MC_CMD_PTP_IN_ADJUST_V2_SECONDS_LEN 4 1911/* Time adjustment major value */ 1912#define MC_CMD_PTP_IN_ADJUST_V2_MAJOR_OFST 16 1913#define MC_CMD_PTP_IN_ADJUST_V2_MAJOR_LEN 4 1914/* Time adjustment in nanoseconds */ 1915#define MC_CMD_PTP_IN_ADJUST_V2_NANOSECONDS_OFST 20 1916#define MC_CMD_PTP_IN_ADJUST_V2_NANOSECONDS_LEN 4 1917/* Time adjustment minor value */ 1918#define MC_CMD_PTP_IN_ADJUST_V2_MINOR_OFST 20 1919#define MC_CMD_PTP_IN_ADJUST_V2_MINOR_LEN 4 1920/* Upper 32bits of major time offset adjustment */ 1921#define MC_CMD_PTP_IN_ADJUST_V2_MAJOR_HI_OFST 24 1922#define MC_CMD_PTP_IN_ADJUST_V2_MAJOR_HI_LEN 4 1923 1924/* MC_CMD_PTP_IN_SYNCHRONIZE msgrequest */ 1925#define MC_CMD_PTP_IN_SYNCHRONIZE_LEN 20 1926/* MC_CMD_PTP_IN_CMD_OFST 0 */ 1927/* MC_CMD_PTP_IN_CMD_LEN 4 */ 1928/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 1929/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 1930/* Number of time readings to capture */ 1931#define MC_CMD_PTP_IN_SYNCHRONIZE_NUMTIMESETS_OFST 8 1932#define MC_CMD_PTP_IN_SYNCHRONIZE_NUMTIMESETS_LEN 4 1933/* Host address in which to write "synchronization started" indication (64 1934 * bits) 1935 */ 1936#define MC_CMD_PTP_IN_SYNCHRONIZE_START_ADDR_OFST 12 1937#define MC_CMD_PTP_IN_SYNCHRONIZE_START_ADDR_LEN 8 1938#define MC_CMD_PTP_IN_SYNCHRONIZE_START_ADDR_LO_OFST 12 1939#define MC_CMD_PTP_IN_SYNCHRONIZE_START_ADDR_HI_OFST 16 1940 1941/* MC_CMD_PTP_IN_MANFTEST_BASIC msgrequest */ 1942#define MC_CMD_PTP_IN_MANFTEST_BASIC_LEN 8 1943/* MC_CMD_PTP_IN_CMD_OFST 0 */ 1944/* MC_CMD_PTP_IN_CMD_LEN 4 */ 1945/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 1946/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 1947 1948/* MC_CMD_PTP_IN_MANFTEST_PACKET msgrequest */ 1949#define MC_CMD_PTP_IN_MANFTEST_PACKET_LEN 12 1950/* MC_CMD_PTP_IN_CMD_OFST 0 */ 1951/* MC_CMD_PTP_IN_CMD_LEN 4 */ 1952/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 1953/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 1954/* Enable or disable packet testing */ 1955#define MC_CMD_PTP_IN_MANFTEST_PACKET_TEST_ENABLE_OFST 8 1956#define MC_CMD_PTP_IN_MANFTEST_PACKET_TEST_ENABLE_LEN 4 1957 1958/* MC_CMD_PTP_IN_RESET_STATS msgrequest: Reset PTP statistics */ 1959#define MC_CMD_PTP_IN_RESET_STATS_LEN 8 1960/* MC_CMD_PTP_IN_CMD_OFST 0 */ 1961/* MC_CMD_PTP_IN_CMD_LEN 4 */ 1962/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 1963/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 1964 1965/* MC_CMD_PTP_IN_DEBUG msgrequest */ 1966#define MC_CMD_PTP_IN_DEBUG_LEN 12 1967/* MC_CMD_PTP_IN_CMD_OFST 0 */ 1968/* MC_CMD_PTP_IN_CMD_LEN 4 */ 1969/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 1970/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 1971/* Debug operations */ 1972#define MC_CMD_PTP_IN_DEBUG_DEBUG_PARAM_OFST 8 1973#define MC_CMD_PTP_IN_DEBUG_DEBUG_PARAM_LEN 4 1974 1975/* MC_CMD_PTP_IN_FPGAREAD msgrequest */ 1976#define MC_CMD_PTP_IN_FPGAREAD_LEN 16 1977/* MC_CMD_PTP_IN_CMD_OFST 0 */ 1978/* MC_CMD_PTP_IN_CMD_LEN 4 */ 1979/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 1980/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 1981#define MC_CMD_PTP_IN_FPGAREAD_ADDR_OFST 8 1982#define MC_CMD_PTP_IN_FPGAREAD_ADDR_LEN 4 1983#define MC_CMD_PTP_IN_FPGAREAD_NUMBYTES_OFST 12 1984#define MC_CMD_PTP_IN_FPGAREAD_NUMBYTES_LEN 4 1985 1986/* MC_CMD_PTP_IN_FPGAWRITE msgrequest */ 1987#define MC_CMD_PTP_IN_FPGAWRITE_LENMIN 13 1988#define MC_CMD_PTP_IN_FPGAWRITE_LENMAX 252 1989#define MC_CMD_PTP_IN_FPGAWRITE_LENMAX_MCDI2 1020 1990#define MC_CMD_PTP_IN_FPGAWRITE_LEN(num) (12+1*(num)) 1991#define MC_CMD_PTP_IN_FPGAWRITE_BUFFER_NUM(len) (((len)-12)/1) 1992/* MC_CMD_PTP_IN_CMD_OFST 0 */ 1993/* MC_CMD_PTP_IN_CMD_LEN 4 */ 1994/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 1995/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 1996#define MC_CMD_PTP_IN_FPGAWRITE_ADDR_OFST 8 1997#define MC_CMD_PTP_IN_FPGAWRITE_ADDR_LEN 4 1998#define MC_CMD_PTP_IN_FPGAWRITE_BUFFER_OFST 12 1999#define MC_CMD_PTP_IN_FPGAWRITE_BUFFER_LEN 1 2000#define MC_CMD_PTP_IN_FPGAWRITE_BUFFER_MINNUM 1
2001#define MC_CMD_PTP_IN_FPGAWRITE_BUFFER_MAXNUM 240 2002#define MC_CMD_PTP_IN_FPGAWRITE_BUFFER_MAXNUM_MCDI2 1008 2003 2004/* MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST msgrequest */ 2005#define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_LEN 16 2006/* MC_CMD_PTP_IN_CMD_OFST 0 */ 2007/* MC_CMD_PTP_IN_CMD_LEN 4 */ 2008/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 2009/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 2010/* Time adjustment in seconds */ 2011#define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_SECONDS_OFST 8 2012#define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_SECONDS_LEN 4 2013/* Time adjustment major value */ 2014#define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_MAJOR_OFST 8 2015#define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_MAJOR_LEN 4 2016/* Time adjustment in nanoseconds */ 2017#define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_NANOSECONDS_OFST 12 2018#define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_NANOSECONDS_LEN 4 2019/* Time adjustment minor value */ 2020#define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_MINOR_OFST 12 2021#define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_MINOR_LEN 4 2022 2023/* MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2 msgrequest */ 2024#define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_LEN 20 2025/* MC_CMD_PTP_IN_CMD_OFST 0 */ 2026/* MC_CMD_PTP_IN_CMD_LEN 4 */ 2027/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 2028/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 2029/* Time adjustment in seconds */ 2030#define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_SECONDS_OFST 8 2031#define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_SECONDS_LEN 4 2032/* Time adjustment major value */ 2033#define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_MAJOR_OFST 8 2034#define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_MAJOR_LEN 4 2035/* Time adjustment in nanoseconds */ 2036#define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_NANOSECONDS_OFST 12 2037#define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_NANOSECONDS_LEN 4 2038/* Time adjustment minor value */ 2039#define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_MINOR_OFST 12 2040#define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_MINOR_LEN 4 2041/* Upper 32bits of major time offset adjustment */ 2042#define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_MAJOR_HI_OFST 16 2043#define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_MAJOR_HI_LEN 4 2044 2045/* MC_CMD_PTP_IN_CLOCK_FREQ_ADJUST msgrequest */ 2046#define MC_CMD_PTP_IN_CLOCK_FREQ_ADJUST_LEN 16 2047/* MC_CMD_PTP_IN_CMD_OFST 0 */ 2048/* MC_CMD_PTP_IN_CMD_LEN 4 */ 2049/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 2050/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 2051/* Frequency adjustment 40 bit fixed point ns */ 2052#define MC_CMD_PTP_IN_CLOCK_FREQ_ADJUST_FREQ_OFST 8 2053#define MC_CMD_PTP_IN_CLOCK_FREQ_ADJUST_FREQ_LEN 8 2054#define MC_CMD_PTP_IN_CLOCK_FREQ_ADJUST_FREQ_LO_OFST 8 2055#define MC_CMD_PTP_IN_CLOCK_FREQ_ADJUST_FREQ_HI_OFST 12 2056/* Enum values, see field(s): */ 2057/* MC_CMD_PTP/MC_CMD_PTP_IN_ADJUST/FREQ */ 2058 2059/* MC_CMD_PTP_IN_RX_SET_VLAN_FILTER msgrequest */ 2060#define MC_CMD_PTP_IN_RX_SET_VLAN_FILTER_LEN 24 2061/* MC_CMD_PTP_IN_CMD_OFST 0 */ 2062/* MC_CMD_PTP_IN_CMD_LEN 4 */ 2063/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 2064/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 2065/* Number of VLAN tags, 0 if not VLAN */ 2066#define MC_CMD_PTP_IN_RX_SET_VLAN_FILTER_NUM_VLAN_TAGS_OFST 8 2067#define MC_CMD_PTP_IN_RX_SET_VLAN_FILTER_NUM_VLAN_TAGS_LEN 4 2068/* Set of VLAN tags to filter against */ 2069#define MC_CMD_PTP_IN_RX_SET_VLAN_FILTER_VLAN_TAG_OFST 12 2070#define MC_CMD_PTP_IN_RX_SET_VLAN_FILTER_VLAN_TAG_LEN 4 2071#define MC_CMD_PTP_IN_RX_SET_VLAN_FILTER_VLAN_TAG_NUM 3 2072 2073/* MC_CMD_PTP_IN_RX_SET_UUID_FILTER msgrequest */ 2074#define MC_CMD_PTP_IN_RX_SET_UUID_FILTER_LEN 20 2075/* MC_CMD_PTP_IN_CMD_OFST 0 */ 2076/* MC_CMD_PTP_IN_CMD_LEN 4 */ 2077/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 2078/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 2079/* 1 to enable UUID filtering, 0 to disable */ 2080#define MC_CMD_PTP_IN_RX_SET_UUID_FILTER_ENABLE_OFST 8 2081#define MC_CMD_PTP_IN_RX_SET_UUID_FILTER_ENABLE_LEN 4 2082/* UUID to filter against */ 2083#define MC_CMD_PTP_IN_RX_SET_UUID_FILTER_UUID_OFST 12 2084#define MC_CMD_PTP_IN_RX_SET_UUID_FILTER_UUID_LEN 8 2085#define MC_CMD_PTP_IN_RX_SET_UUID_FILTER_UUID_LO_OFST 12 2086#define MC_CMD_PTP_IN_RX_SET_UUID_FILTER_UUID_HI_OFST 16 2087 2088/* MC_CMD_PTP_IN_RX_SET_DOMAIN_FILTER msgrequest */ 2089#define MC_CMD_PTP_IN_RX_SET_DOMAIN_FILTER_LEN 16 2090/* MC_CMD_PTP_IN_CMD_OFST 0 */ 2091/* MC_CMD_PTP_IN_CMD_LEN 4 */ 2092/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 2093/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 2094/* 1 to enable Domain filtering, 0 to disable */ 2095#define MC_CMD_PTP_IN_RX_SET_DOMAIN_FILTER_ENABLE_OFST 8 2096#define MC_CMD_PTP_IN_RX_SET_DOMAIN_FILTER_ENABLE_LEN 4 2097/* Domain number to filter against */ 2098#define MC_CMD_PTP_IN_RX_SET_DOMAIN_FILTER_DOMAIN_OFST 12 2099#define MC_CMD_PTP_IN_RX_SET_DOMAIN_FILTER_DOMAIN_LEN 4 2100 2101/* MC_CMD_PTP_IN_SET_CLK_SRC msgrequest */ 2102#define MC_CMD_PTP_IN_SET_CLK_SRC_LEN 12 2103/* MC_CMD_PTP_IN_CMD_OFST 0 */ 2104/* MC_CMD_PTP_IN_CMD_LEN 4 */ 2105/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 2106/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 2107/* Set the clock source. */ 2108#define MC_CMD_PTP_IN_SET_CLK_SRC_CLK_OFST 8 2109#define MC_CMD_PTP_IN_SET_CLK_SRC_CLK_LEN 4 2110/* enum: Internal. */ 2111#define MC_CMD_PTP_CLK_SRC_INTERNAL 0x0 2112/* enum: External. */ 2113#define MC_CMD_PTP_CLK_SRC_EXTERNAL 0x1 2114 2115/* MC_CMD_PTP_IN_RST_CLK msgrequest: Reset value of Timer Reg. */ 2116#define MC_CMD_PTP_IN_RST_CLK_LEN 8 2117/* MC_CMD_PTP_IN_CMD_OFST 0 */ 2118/* MC_CMD_PTP_IN_CMD_LEN 4 */ 2119/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 2120/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 2121 2122/* MC_CMD_PTP_IN_PPS_ENABLE msgrequest */ 2123#define MC_CMD_PTP_IN_PPS_ENABLE_LEN 12 2124/* MC_CMD_PTP_IN_CMD_OFST 0 */ 2125/* MC_CMD_PTP_IN_CMD_LEN 4 */ 2126/* Enable or disable */ 2127#define MC_CMD_PTP_IN_PPS_ENABLE_OP_OFST 4 2128#define MC_CMD_PTP_IN_PPS_ENABLE_OP_LEN 4 2129/* enum: Enable */ 2130#define MC_CMD_PTP_ENABLE_PPS 0x0 2131/* enum: Disable */ 2132#define MC_CMD_PTP_DISABLE_PPS 0x1 2133/* Not used. Events are always sent to function relative queue 0. */ 2134#define MC_CMD_PTP_IN_PPS_ENABLE_QUEUE_ID_OFST 8 2135#define MC_CMD_PTP_IN_PPS_ENABLE_QUEUE_ID_LEN 4 2136 2137/* MC_CMD_PTP_IN_GET_TIME_FORMAT msgrequest */ 2138#define MC_CMD_PTP_IN_GET_TIME_FORMAT_LEN 8 2139/* MC_CMD_PTP_IN_CMD_OFST 0 */ 2140/* MC_CMD_PTP_IN_CMD_LEN 4 */ 2141/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 2142/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 2143 2144/* MC_CMD_PTP_IN_GET_ATTRIBUTES msgrequest */ 2145#define MC_CMD_PTP_IN_GET_ATTRIBUTES_LEN 8 2146/* MC_CMD_PTP_IN_CMD_OFST 0 */ 2147/* MC_CMD_PTP_IN_CMD_LEN 4 */ 2148/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 2149/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 2150 2151/* MC_CMD_PTP_IN_GET_TIMESTAMP_CORRECTIONS msgrequest */ 2152#define MC_CMD_PTP_IN_GET_TIMESTAMP_CORRECTIONS_LEN 8 2153/* MC_CMD_PTP_IN_CMD_OFST 0 */ 2154/* MC_CMD_PTP_IN_CMD_LEN 4 */ 2155/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 2156/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 2157 2158/* MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE msgrequest */ 2159#define MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_LEN 12 2160/* MC_CMD_PTP_IN_CMD_OFST 0 */ 2161/* MC_CMD_PTP_IN_CMD_LEN 4 */ 2162/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 2163/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 2164/* Original field containing queue ID. Now extended to include flags. */ 2165#define MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_QUEUE_OFST 8 2166#define MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_QUEUE_LEN 4 2167#define MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_QUEUE_ID_OFST 8 2168#define MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_QUEUE_ID_LBN 0 2169#define MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_QUEUE_ID_WIDTH 16 2170#define MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_REPORT_SYNC_STATUS_OFST 8 2171#define MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_REPORT_SYNC_STATUS_LBN 31 2172#define MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_REPORT_SYNC_STATUS_WIDTH 1 2173 2174/* MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE msgrequest */ 2175#define MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_LEN 16 2176/* MC_CMD_PTP_IN_CMD_OFST 0 */ 2177/* MC_CMD_PTP_IN_CMD_LEN 4 */ 2178/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 2179/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 2180/* Unsubscribe options */ 2181#define MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_CONTROL_OFST 8 2182#define MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_CONTROL_LEN 4 2183/* enum: Unsubscribe a single queue */ 2184#define MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_SINGLE 0x0 2185/* enum: Unsubscribe all queues */ 2186#define MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_ALL 0x1 2187/* Event queue ID */ 2188#define MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_QUEUE_OFST 12 2189#define MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_QUEUE_LEN 4 2190 2191/* MC_CMD_PTP_IN_MANFTEST_PPS msgrequest */ 2192#define MC_CMD_PTP_IN_MANFTEST_PPS_LEN 12 2193/* MC_CMD_PTP_IN_CMD_OFST 0 */ 2194/* MC_CMD_PTP_IN_CMD_LEN 4 */ 2195/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 2196/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 2197/* 1 to enable PPS test mode, 0 to disable and return result. */ 2198#define MC_CMD_PTP_IN_MANFTEST_PPS_TEST_ENABLE_OFST 8 2199#define MC_CMD_PTP_IN_MANFTEST_PPS_TEST_ENABLE_LEN 4 2200 2201/* MC_CMD_PTP_IN_SET_SYNC_STATUS msgrequest */ 2202#define MC_CMD_PTP_IN_SET_SYNC_STATUS_LEN 24 2203/* MC_CMD_PTP_IN_CMD_OFST 0 */ 2204/* MC_CMD_PTP_IN_CMD_LEN 4 */ 2205/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 2206/* MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */ 2207/* NIC - Host System Clock Synchronization status */ 2208#define MC_CMD_PTP_IN_SET_SYNC_STATUS_STATUS_OFST 8 2209#define MC_CMD_PTP_IN_SET_SYNC_STATUS_STATUS_LEN 4 2210/* enum: Host System clock and NIC clock are not in sync */ 2211#define MC_CMD_PTP_IN_SET_SYNC_STATUS_NOT_IN_SYNC 0x0 2212/* enum: Host System clock and NIC clock are synchronized */ 2213#define MC_CMD_PTP_IN_SET_SYNC_STATUS_IN_SYNC 0x1 2214/* If synchronized, number of seconds until clocks should be considered to be 2215 * no longer in sync. 2216 */ 2217#define MC_CMD_PTP_IN_SET_SYNC_STATUS_TIMEOUT_OFST 12 2218#define MC_CMD_PTP_IN_SET_SYNC_STATUS_TIMEOUT_LEN 4 2219#define MC_CMD_PTP_IN_SET_SYNC_STATUS_RESERVED0_OFST 16 2220#define MC_CMD_PTP_IN_SET_SYNC_STATUS_RESERVED0_LEN 4 2221#define MC_CMD_PTP_IN_SET_SYNC_STATUS_RESERVED1_OFST 20 2222#define MC_CMD_PTP_IN_SET_SYNC_STATUS_RESERVED1_LEN 4 2223 2224/* MC_CMD_PTP_OUT msgresponse */ 2225#define MC_CMD_PTP_OUT_LEN 0 2226 2227/* MC_CMD_PTP_OUT_TRANSMIT msgresponse */ 2228#define MC_CMD_PTP_OUT_TRANSMIT_LEN 8 2229/* Value of seconds timestamp */ 2230#define MC_CMD_PTP_OUT_TRANSMIT_SECONDS_OFST 0 2231#define MC_CMD_PTP_OUT_TRANSMIT_SECONDS_LEN 4 2232/* Timestamp major value */ 2233#define MC_CMD_PTP_OUT_TRANSMIT_MAJOR_OFST 0 2234#define MC_CMD_PTP_OUT_TRANSMIT_MAJOR_LEN 4 2235/* Value of nanoseconds timestamp */ 2236#define MC_CMD_PTP_OUT_TRANSMIT_NANOSECONDS_OFST 4 2237#define MC_CMD_PTP_OUT_TRANSMIT_NANOSECONDS_LEN 4 2238/* Timestamp minor value */ 2239#define MC_CMD_PTP_OUT_TRANSMIT_MINOR_OFST 4 2240#define MC_CMD_PTP_OUT_TRANSMIT_MINOR_LEN 4 2241 2242/* MC_CMD_PTP_OUT_TIME_EVENT_SUBSCRIBE msgresponse */ 2243#define MC_CMD_PTP_OUT_TIME_EVENT_SUBSCRIBE_LEN 0 2244 2245/* MC_CMD_PTP_OUT_TIME_EVENT_UNSUBSCRIBE msgresponse */ 2246#define MC_CMD_PTP_OUT_TIME_EVENT_UNSUBSCRIBE_LEN 0 2247 2248/* MC_CMD_PTP_OUT_READ_NIC_TIME msgresponse */ 2249#define MC_CMD_PTP_OUT_READ_NIC_TIME_LEN 8 2250/* Value of seconds timestamp */ 2251#define MC_CMD_PTP_OUT_READ_NIC_TIME_SECONDS_OFST 0 2252#define MC_CMD_PTP_OUT_READ_NIC_TIME_SECONDS_LEN 4 2253/* Timestamp major value */ 2254#define MC_CMD_PTP_OUT_READ_NIC_TIME_MAJOR_OFST 0 2255#define MC_CMD_PTP_OUT_READ_NIC_TIME_MAJOR_LEN 4 2256/* Value of nanoseconds timestamp */ 2257#define MC_CMD_PTP_OUT_READ_NIC_TIME_NANOSECONDS_OFST 4 2258#define MC_CMD_PTP_OUT_READ_NIC_TIME_NANOSECONDS_LEN 4 2259/* Timestamp minor value */ 2260#define MC_CMD_PTP_OUT_READ_NIC_TIME_MINOR_OFST 4 2261#define MC_CMD_PTP_OUT_READ_NIC_TIME_MINOR_LEN 4 2262 2263/* MC_CMD_PTP_OUT_READ_NIC_TIME_V2 msgresponse */ 2264#define MC_CMD_PTP_OUT_READ_NIC_TIME_V2_LEN 12 2265/* Value of seconds timestamp */ 2266#define MC_CMD_PTP_OUT_READ_NIC_TIME_V2_SECONDS_OFST 0 2267#define MC_CMD_PTP_OUT_READ_NIC_TIME_V2_SECONDS_LEN 4 2268/* Timestamp major value */ 2269#define MC_CMD_PTP_OUT_READ_NIC_TIME_V2_MAJOR_OFST 0 2270#define MC_CMD_PTP_OUT_READ_NIC_TIME_V2_MAJOR_LEN 4 2271/* Value of nanoseconds timestamp */ 2272#define MC_CMD_PTP_OUT_READ_NIC_TIME_V2_NANOSECONDS_OFST 4 2273#define MC_CMD_PTP_OUT_READ_NIC_TIME_V2_NANOSECONDS_LEN 4 2274/* Timestamp minor value */ 2275#define MC_CMD_PTP_OUT_READ_NIC_TIME_V2_MINOR_OFST 4 2276#define MC_CMD_PTP_OUT_READ_NIC_TIME_V2_MINOR_LEN 4 2277/* Upper 32bits of major timestamp value */ 2278#define MC_CMD_PTP_OUT_READ_NIC_TIME_V2_MAJOR_HI_OFST 8 2279#define MC_CMD_PTP_OUT_READ_NIC_TIME_V2_MAJOR_HI_LEN 4 2280 2281/* MC_CMD_PTP_OUT_STATUS msgresponse */ 2282#define MC_CMD_PTP_OUT_STATUS_LEN 64 2283/* Frequency of NIC's hardware clock */ 2284#define MC_CMD_PTP_OUT_STATUS_CLOCK_FREQ_OFST 0 2285#define MC_CMD_PTP_OUT_STATUS_CLOCK_FREQ_LEN 4 2286/* Number of packets transmitted and timestamped */ 2287#define MC_CMD_PTP_OUT_STATUS_STATS_TX_OFST 4 2288#define MC_CMD_PTP_OUT_STATUS_STATS_TX_LEN 4 2289/* Number of packets received and timestamped */ 2290#define MC_CMD_PTP_OUT_STATUS_STATS_RX_OFST 8 2291#define MC_CMD_PTP_OUT_STATUS_STATS_RX_LEN 4 2292/* Number of packets timestamped by the FPGA */ 2293#define MC_CMD_PTP_OUT_STATUS_STATS_TS_OFST 12 2294#define MC_CMD_PTP_OUT_STATUS_STATS_TS_LEN 4 2295/* Number of packets filter matched */ 2296#define MC_CMD_PTP_OUT_STATUS_STATS_FM_OFST 16 2297#define MC_CMD_PTP_OUT_STATUS_STATS_FM_LEN 4 2298/* Number of packets not filter matched */ 2299#define MC_CMD_PTP_OUT_STATUS_STATS_NFM_OFST 20 2300#define MC_CMD_PTP_OUT_STATUS_STATS_NFM_LEN 4 2301/* Number of PPS overflows (noise on input?) */ 2302#define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFLOW_OFST 24 2303#define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFLOW_LEN 4 2304/* Number of PPS bad periods */ 2305#define MC_CMD_PTP_OUT_STATUS_STATS_PPS_BAD_OFST 28 2306#define MC_CMD_PTP_OUT_STATUS_STATS_PPS_BAD_LEN 4 2307/* Minimum period of PPS pulse in nanoseconds */ 2308#define MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_MIN_OFST 32 2309#define MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_MIN_LEN 4 2310/* Maximum period of PPS pulse in nanoseconds */ 2311#define MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_MAX_OFST 36 2312#define MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_MAX_LEN 4 2313/* Last period of PPS pulse in nanoseconds */ 2314#define MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_LAST_OFST 40 2315#define MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_LAST_LEN 4 2316/* Mean period of PPS pulse in nanoseconds */ 2317#define MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_MEAN_OFST 44 2318#define MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_MEAN_LEN 4 2319/* Minimum offset of PPS pulse in nanoseconds (signed) */ 2320#define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_MIN_OFST 48 2321#define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_MIN_LEN 4 2322/* Maximum offset of PPS pulse in nanoseconds (signed) */ 2323#define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_MAX_OFST 52 2324#define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_MAX_LEN 4 2325/* Last offset of PPS pulse in nanoseconds (signed) */ 2326#define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_LAST_OFST 56 2327#define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_LAST_LEN 4 2328/* Mean offset of PPS pulse in nanoseconds (signed) */ 2329#define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_MEAN_OFST 60 2330#define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_MEAN_LEN 4 2331 2332/* MC_CMD_PTP_OUT_SYNCHRONIZE msgresponse */ 2333#define MC_CMD_PTP_OUT_SYNCHRONIZE_LENMIN 20 2334#define MC_CMD_PTP_OUT_SYNCHRONIZE_LENMAX 240 2335#define MC_CMD_PTP_OUT_SYNCHRONIZE_LENMAX_MCDI2 1020 2336#define MC_CMD_PTP_OUT_SYNCHRONIZE_LEN(num) (0+20*(num)) 2337#define MC_CMD_PTP_OUT_SYNCHRONIZE_TIMESET_NUM(len) (((len)-0)/20) 2338/* A set of host and NIC times */ 2339#define MC_CMD_PTP_OUT_SYNCHRONIZE_TIMESET_OFST 0 2340#define MC_CMD_PTP_OUT_SYNCHRONIZE_TIMESET_LEN 20 2341#define MC_CMD_PTP_OUT_SYNCHRONIZE_TIMESET_MINNUM 1 2342#define MC_CMD_PTP_OUT_SYNCHRONIZE_TIMESET_MAXNUM 12 2343#define MC_CMD_PTP_OUT_SYNCHRONIZE_TIMESET_MAXNUM_MCDI2 51 2344/* Host time immediately before NIC's hardware clock read */ 2345#define MC_CMD_PTP_OUT_SYNCHRONIZE_HOSTSTART_OFST 0 2346#define MC_CMD_PTP_OUT_SYNCHRONIZE_HOSTSTART_LEN 4 2347/* Value of seconds timestamp */ 2348#define MC_CMD_PTP_OUT_SYNCHRONIZE_SECONDS_OFST 4 2349#define MC_CMD_PTP_OUT_SYNCHRONIZE_SECONDS_LEN 4 2350/* Timestamp major value */ 2351#define MC_CMD_PTP_OUT_SYNCHRONIZE_MAJOR_OFST 4 2352#define MC_CMD_PTP_OUT_SYNCHRONIZE_MAJOR_LEN 4 2353/* Value of nanoseconds timestamp */ 2354#define MC_CMD_PTP_OUT_SYNCHRONIZE_NANOSECONDS_OFST 8 2355#define MC_CMD_PTP_OUT_SYNCHRONIZE_NANOSECONDS_LEN 4 2356/* Timestamp minor value */ 2357#define MC_CMD_PTP_OUT_SYNCHRONIZE_MINOR_OFST 8 2358#define MC_CMD_PTP_OUT_SYNCHRONIZE_MINOR_LEN 4 2359/* Host time immediately after NIC's hardware clock read */ 2360#define MC_CMD_PTP_OUT_SYNCHRONIZE_HOSTEND_OFST 12 2361#define MC_CMD_PTP_OUT_SYNCHRONIZE_HOSTEND_LEN 4 2362/* Number of nanoseconds waited after reading NIC's hardware clock */ 2363#define MC_CMD_PTP_OUT_SYNCHRONIZE_WAITNS_OFST 16 2364#define MC_CMD_PTP_OUT_SYNCHRONIZE_WAITNS_LEN 4 2365 2366/* MC_CMD_PTP_OUT_MANFTEST_BASIC msgresponse */ 2367#define MC_CMD_PTP_OUT_MANFTEST_BASIC_LEN 8 2368/* Results of testing */ 2369#define MC_CMD_PTP_OUT_MANFTEST_BASIC_TEST_RESULT_OFST 0 2370#define MC_CMD_PTP_OUT_MANFTEST_BASIC_TEST_RESULT_LEN 4 2371/* enum: Successful test */ 2372#define MC_CMD_PTP_MANF_SUCCESS 0x0 2373/* enum: FPGA load failed */ 2374#define MC_CMD_PTP_MANF_FPGA_LOAD 0x1 2375/* enum: FPGA version invalid */ 2376#define MC_CMD_PTP_MANF_FPGA_VERSION 0x2 2377/* enum: FPGA registers incorrect */ 2378#define MC_CMD_PTP_MANF_FPGA_REGISTERS 0x3 2379/* enum: Oscillator possibly not working? */ 2380#define MC_CMD_PTP_MANF_OSCILLATOR 0x4 2381/* enum: Timestamps not increasing */ 2382#define MC_CMD_PTP_MANF_TIMESTAMPS 0x5 2383/* enum: Mismatched packet count */ 2384#define MC_CMD_PTP_MANF_PACKET_COUNT 0x6 2385/* enum: Mismatched packet count (Siena filter and FPGA) */ 2386#define MC_CMD_PTP_MANF_FILTER_COUNT 0x7 2387/* enum: Not enough packets to perform timestamp check */ 2388#define MC_CMD_PTP_MANF_PACKET_ENOUGH 0x8 2389/* enum: Timestamp trigger GPIO not working */ 2390#define MC_CMD_PTP_MANF_GPIO_TRIGGER 0x9 2391/* enum: Insufficient PPS events to perform checks */ 2392#define MC_CMD_PTP_MANF_PPS_ENOUGH 0xa 2393/* enum: PPS time event period not sufficiently close to 1s. */ 2394#define MC_CMD_PTP_MANF_PPS_PERIOD 0xb 2395/* enum: PPS time event nS reading not sufficiently close to zero. */ 2396#define MC_CMD_PTP_MANF_PPS_NS 0xc 2397/* enum: PTP peripheral registers incorrect */ 2398#define MC_CMD_PTP_MANF_REGISTERS 0xd 2399/* enum: Failed to read time from PTP peripheral */ 2400#define MC_CMD_PTP_MANF_CLOCK_READ 0xe 2401/* Presence of external oscillator */ 2402#define MC_CMD_PTP_OUT_MANFTEST_BASIC_TEST_EXTOSC_OFST 4 2403#define MC_CMD_PTP_OUT_MANFTEST_BASIC_TEST_EXTOSC_LEN 4 2404 2405/* MC_CMD_PTP_OUT_MANFTEST_PACKET msgresponse */ 2406#define MC_CMD_PTP_OUT_MANFTEST_PACKET_LEN 12 2407/* Results of testing */ 2408#define MC_CMD_PTP_OUT_MANFTEST_PACKET_TEST_RESULT_OFST 0 2409#define MC_CMD_PTP_OUT_MANFTEST_PACKET_TEST_RESULT_LEN 4 2410/* Number of packets received by FPGA */ 2411#define MC_CMD_PTP_OUT_MANFTEST_PACKET_TEST_FPGACOUNT_OFST 4 2412#define MC_CMD_PTP_OUT_MANFTEST_PACKET_TEST_FPGACOUNT_LEN 4 2413/* Number of packets received by Siena filters */ 2414#define MC_CMD_PTP_OUT_MANFTEST_PACKET_TEST_FILTERCOUNT_OFST 8 2415#define MC_CMD_PTP_OUT_MANFTEST_PACKET_TEST_FILTERCOUNT_LEN 4 2416 2417/* MC_CMD_PTP_OUT_FPGAREAD msgresponse */ 2418#define MC_CMD_PTP_OUT_FPGAREAD_LENMIN 1 2419#define MC_CMD_PTP_OUT_FPGAREAD_LENMAX 252 2420#define MC_CMD_PTP_OUT_FPGAREAD_LENMAX_MCDI2 1020 2421#define MC_CMD_PTP_OUT_FPGAREAD_LEN(num) (0+1*(num)) 2422#define MC_CMD_PTP_OUT_FPGAREAD_BUFFER_NUM(len) (((len)-0)/1) 2423#define MC_CMD_PTP_OUT_FPGAREAD_BUFFER_OFST 0 2424#define MC_CMD_PTP_OUT_FPGAREAD_BUFFER_LEN 1 2425#define MC_CMD_PTP_OUT_FPGAREAD_BUFFER_MINNUM 1 2426#define MC_CMD_PTP_OUT_FPGAREAD_BUFFER_MAXNUM 252 2427#define MC_CMD_PTP_OUT_FPGAREAD_BUFFER_MAXNUM_MCDI2 1020 2428 2429/* MC_CMD_PTP_OUT_GET_TIME_FORMAT msgresponse */ 2430#define MC_CMD_PTP_OUT_GET_TIME_FORMAT_LEN 4 2431/* Time format required/used by for this NIC. Applies to all PTP MCDI 2432 * operations that pass times between the host and firmware. If this operation 2433 * is not supported (older firmware) a format of seconds and nanoseconds should 2434 * be assumed. Note this enum is deprecated. Do not add to it- use the 2435 * TIME_FORMAT field in MC_CMD_PTP_OUT_GET_ATTRIBUTES instead. 2436 */ 2437#define MC_CMD_PTP_OUT_GET_TIME_FORMAT_FORMAT_OFST 0 2438#define MC_CMD_PTP_OUT_GET_TIME_FORMAT_FORMAT_LEN 4 2439/* enum: Times are in seconds and nanoseconds */ 2440#define MC_CMD_PTP_OUT_GET_TIME_FORMAT_SECONDS_NANOSECONDS 0x0 2441/* enum: Major register has units of 16 second per tick, minor 8 ns per tick */ 2442#define MC_CMD_PTP_OUT_GET_TIME_FORMAT_16SECONDS_8NANOSECONDS 0x1 2443/* enum: Major register has units of seconds, minor 2^-27s per tick */ 2444#define MC_CMD_PTP_OUT_GET_TIME_FORMAT_SECONDS_27FRACTION 0x2 2445 2446/* MC_CMD_PTP_OUT_GET_ATTRIBUTES msgresponse */ 2447#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_LEN 24 2448/* Time format required/used by for this NIC. Applies to all PTP MCDI 2449 * operations that pass times between the host and firmware. If this operation 2450 * is not supported (older firmware) a format of seconds and nanoseconds should 2451 * be assumed. 2452 */ 2453#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_TIME_FORMAT_OFST 0 2454#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_TIME_FORMAT_LEN 4 2455/* enum: Times are in seconds and nanoseconds */ 2456#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_SECONDS_NANOSECONDS 0x0 2457/* enum: Major register has units of 16 second per tick, minor 8 ns per tick */ 2458#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_16SECONDS_8NANOSECONDS 0x1 2459/* enum: Major register has units of seconds, minor 2^-27s per tick */ 2460#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_SECONDS_27FRACTION 0x2 2461/* enum: Major register units are seconds, minor units are quarter nanoseconds 2462 */ 2463#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_SECONDS_QTR_NANOSECONDS 0x3 2464/* Minimum acceptable value for a corrected synchronization timeset. When 2465 * comparing host and NIC clock times, the MC returns a set of samples that 2466 * contain the host start and end time, the MC time when the host start was 2467 * detected and the time the MC waited between reading the time and detecting 2468 * the host end. The corrected sync window is the difference between the host 2469 * end and start times minus the time that the MC waited for host end. 2470 */ 2471#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_SYNC_WINDOW_MIN_OFST 4 2472#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_SYNC_WINDOW_MIN_LEN 4 2473/* Various PTP capabilities */ 2474#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_CAPABILITIES_OFST 8 2475#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_CAPABILITIES_LEN 4 2476#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_REPORT_SYNC_STATUS_OFST 8 2477#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_REPORT_SYNC_STATUS_LBN 0 2478#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_REPORT_SYNC_STATUS_WIDTH 1 2479#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_RX_TSTAMP_OOB_OFST 8 2480#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_RX_TSTAMP_OOB_LBN 1 2481#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_RX_TSTAMP_OOB_WIDTH 1 2482#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_64BIT_SECONDS_OFST 8 2483#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_64BIT_SECONDS_LBN 2 2484#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_64BIT_SECONDS_WIDTH 1 2485#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_FP44_FREQ_ADJ_OFST 8 2486#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_FP44_FREQ_ADJ_LBN 3 2487#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_FP44_FREQ_ADJ_WIDTH 1 2488#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_RESERVED0_OFST 12 2489#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_RESERVED0_LEN 4 2490#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_RESERVED1_OFST 16 2491#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_RESERVED1_LEN 4 2492#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_RESERVED2_OFST 20 2493#define MC_CMD_PTP_OUT_GET_ATTRIBUTES_RESERVED2_LEN 4 2494 2495/* MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS msgresponse */ 2496#define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_LEN 16 2497/* Uncorrected error on PTP transmit timestamps in NIC clock format */ 2498#define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_TRANSMIT_OFST 0 2499#define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_TRANSMIT_LEN 4 2500/* Uncorrected error on PTP receive timestamps in NIC clock format */ 2501#define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_RECEIVE_OFST 4 2502#define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_RECEIVE_LEN 4 2503/* Uncorrected error on PPS output in NIC clock format */ 2504#define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_PPS_OUT_OFST 8 2505#define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_PPS_OUT_LEN 4 2506/* Uncorrected error on PPS input in NIC clock format */ 2507#define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_PPS_IN_OFST 12 2508#define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_PPS_IN_LEN 4 2509 2510/* MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2 msgresponse */ 2511#define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_LEN 24 2512/* Uncorrected error on PTP transmit timestamps in NIC clock format */ 2513#define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_PTP_TX_OFST 0 2514#define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_PTP_TX_LEN 4 2515/* Uncorrected error on PTP receive timestamps in NIC clock format */ 2516#define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_PTP_RX_OFST 4 2517#define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_PTP_RX_LEN 4 2518/* Uncorrected error on PPS output in NIC clock format */ 2519#define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_PPS_OUT_OFST 8 2520#define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_PPS_OUT_LEN 4 2521/* Uncorrected error on PPS input in NIC clock format */ 2522#define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_PPS_IN_OFST 12 2523#define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_PPS_IN_LEN 4 2524/* Uncorrected error on non-PTP transmit timestamps in NIC clock format */ 2525#define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_GENERAL_TX_OFST 16 2526#define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_GENERAL_TX_LEN 4 2527/* Uncorrected error on non-PTP receive timestamps in NIC clock format */ 2528#define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_GENERAL_RX_OFST 20 2529#define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_GENERAL_RX_LEN 4 2530 2531/* MC_CMD_PTP_OUT_MANFTEST_PPS msgresponse */ 2532#define MC_CMD_PTP_OUT_MANFTEST_PPS_LEN 4 2533/* Results of testing */ 2534#define MC_CMD_PTP_OUT_MANFTEST_PPS_TEST_RESULT_OFST 0 2535#define MC_CMD_PTP_OUT_MANFTEST_PPS_TEST_RESULT_LEN 4 2536/* Enum values, see field(s): */ 2537/* MC_CMD_PTP_OUT_MANFTEST_BASIC/TEST_RESULT */ 2538 2539/* MC_CMD_PTP_OUT_SET_SYNC_STATUS msgresponse */ 2540#define MC_CMD_PTP_OUT_SET_SYNC_STATUS_LEN 0 2541 2542 2543/***********************************/ 2544/* MC_CMD_CSR_READ32 2545 * Read 32bit words from the indirect memory map. 2546 */ 2547#define MC_CMD_CSR_READ32 0xc 2548#undef MC_CMD_0xc_PRIVILEGE_CTG 2549 2550#define MC_CMD_0xc_PRIVILEGE_CTG SRIOV_CTG_INSECURE 2551 2552/* MC_CMD_CSR_READ32_IN msgrequest */ 2553#define MC_CMD_CSR_READ32_IN_LEN 12 2554/* Address */ 2555#define MC_CMD_CSR_READ32_IN_ADDR_OFST 0 2556#define MC_CMD_CSR_READ32_IN_ADDR_LEN 4 2557#define MC_CMD_CSR_READ32_IN_STEP_OFST 4 2558#define MC_CMD_CSR_READ32_IN_STEP_LEN 4 2559#define MC_CMD_CSR_READ32_IN_NUMWORDS_OFST 8 2560#define MC_CMD_CSR_READ32_IN_NUMWORDS_LEN 4 2561 2562/* MC_CMD_CSR_READ32_OUT msgresponse */ 2563#define MC_CMD_CSR_READ32_OUT_LENMIN 4 2564#define MC_CMD_CSR_READ32_OUT_LENMAX 252 2565#define MC_CMD_CSR_READ32_OUT_LENMAX_MCDI2 1020 2566#define MC_CMD_CSR_READ32_OUT_LEN(num) (0+4*(num)) 2567#define MC_CMD_CSR_READ32_OUT_BUFFER_NUM(len) (((len)-0)/4) 2568/* The last dword is the status, not a value read */ 2569#define MC_CMD_CSR_READ32_OUT_BUFFER_OFST 0 2570#define MC_CMD_CSR_READ32_OUT_BUFFER_LEN 4 2571#define MC_CMD_CSR_READ32_OUT_BUFFER_MINNUM 1 2572#define MC_CMD_CSR_READ32_OUT_BUFFER_MAXNUM 63 2573#define MC_CMD_CSR_READ32_OUT_BUFFER_MAXNUM_MCDI2 255 2574 2575 2576/***********************************/ 2577/* MC_CMD_CSR_WRITE32 2578 * Write 32bit dwords to the indirect memory map. 2579 */ 2580#define MC_CMD_CSR_WRITE32 0xd 2581#undef MC_CMD_0xd_PRIVILEGE_CTG 2582 2583#define MC_CMD_0xd_PRIVILEGE_CTG SRIOV_CTG_INSECURE 2584 2585/* MC_CMD_CSR_WRITE32_IN msgrequest */ 2586#define MC_CMD_CSR_WRITE32_IN_LENMIN 12 2587#define MC_CMD_CSR_WRITE32_IN_LENMAX 252 2588#define MC_CMD_CSR_WRITE32_IN_LENMAX_MCDI2 1020 2589#define MC_CMD_CSR_WRITE32_IN_LEN(num) (8+4*(num)) 2590#define MC_CMD_CSR_WRITE32_IN_BUFFER_NUM(len) (((len)-8)/4) 2591/* Address */ 2592#define MC_CMD_CSR_WRITE32_IN_ADDR_OFST 0 2593#define MC_CMD_CSR_WRITE32_IN_ADDR_LEN 4 2594#define MC_CMD_CSR_WRITE32_IN_STEP_OFST 4 2595#define MC_CMD_CSR_WRITE32_IN_STEP_LEN 4 2596#define MC_CMD_CSR_WRITE32_IN_BUFFER_OFST 8 2597#define MC_CMD_CSR_WRITE32_IN_BUFFER_LEN 4 2598#define MC_CMD_CSR_WRITE32_IN_BUFFER_MINNUM 1 2599#define MC_CMD_CSR_WRITE32_IN_BUFFER_MAXNUM 61 2600#define MC_CMD_CSR_WRITE32_IN_BUFFER_MAXNUM_MCDI2 253 2601 2602/* MC_CMD_CSR_WRITE32_OUT msgresponse */ 2603#define MC_CMD_CSR_WRITE32_OUT_LEN 4 2604#define MC_CMD_CSR_WRITE32_OUT_STATUS_OFST 0 2605#define MC_CMD_CSR_WRITE32_OUT_STATUS_LEN 4 2606 2607 2608/***********************************/ 2609/* MC_CMD_HP 2610 * These commands are used for HP related features. They are grouped under one 2611 * MCDI command to avoid creating too many MCDI commands. 2612 */ 2613#define MC_CMD_HP 0x54 2614#undef MC_CMD_0x54_PRIVILEGE_CTG 2615 2616#define MC_CMD_0x54_PRIVILEGE_CTG SRIOV_CTG_ADMIN 2617 2618/* MC_CMD_HP_IN msgrequest */ 2619#define MC_CMD_HP_IN_LEN 16 2620/* HP OCSD sub-command. When address is not NULL, request activation of OCSD at 2621 * the specified address with the specified interval.When address is NULL, 2622 * INTERVAL is interpreted as a command: 0: stop OCSD / 1: Report OCSD current 2623 * state / 2: (debug) Show temperature reported by one of the supported 2624 * sensors. 2625 */ 2626#define MC_CMD_HP_IN_SUBCMD_OFST 0 2627#define MC_CMD_HP_IN_SUBCMD_LEN 4 2628/* enum: OCSD (Option Card Sensor Data) sub-command. */ 2629#define MC_CMD_HP_IN_OCSD_SUBCMD 0x0 2630/* enum: Last known valid HP sub-command. */ 2631#define MC_CMD_HP_IN_LAST_SUBCMD 0x0 2632/* The address to the array of sensor fields. (Or NULL to use a sub-command.) 2633 */ 2634#define MC_CMD_HP_IN_OCSD_ADDR_OFST 4 2635#define MC_CMD_HP_IN_OCSD_ADDR_LEN 8 2636#define MC_CMD_HP_IN_OCSD_ADDR_LO_OFST 4 2637#define MC_CMD_HP_IN_OCSD_ADDR_HI_OFST 8 2638/* The requested update interval, in seconds. (Or the sub-command if ADDR is 2639 * NULL.) 2640 */ 2641#define MC_CMD_HP_IN_OCSD_INTERVAL_OFST 12 2642#define MC_CMD_HP_IN_OCSD_INTERVAL_LEN 4 2643 2644/* MC_CMD_HP_OUT msgresponse */ 2645#define MC_CMD_HP_OUT_LEN 4 2646#define MC_CMD_HP_OUT_OCSD_STATUS_OFST 0 2647#define MC_CMD_HP_OUT_OCSD_STATUS_LEN 4 2648/* enum: OCSD stopped for this card. */ 2649#define MC_CMD_HP_OUT_OCSD_STOPPED 0x1 2650/* enum: OCSD was successfully started with the address provided. */ 2651#define MC_CMD_HP_OUT_OCSD_STARTED 0x2 2652/* enum: OCSD was already started for this card. */ 2653#define MC_CMD_HP_OUT_OCSD_ALREADY_STARTED 0x3 2654 2655 2656/***********************************/ 2657/* MC_CMD_STACKINFO 2658 * Get stack information. 2659 */ 2660#define MC_CMD_STACKINFO 0xf 2661#undef MC_CMD_0xf_PRIVILEGE_CTG 2662 2663#define MC_CMD_0xf_PRIVILEGE_CTG SRIOV_CTG_ADMIN 2664 2665/* MC_CMD_STACKINFO_IN msgrequest */ 2666#define MC_CMD_STACKINFO_IN_LEN 0 2667 2668/* MC_CMD_STACKINFO_OUT msgresponse */ 2669#define MC_CMD_STACKINFO_OUT_LENMIN 12 2670#define MC_CMD_STACKINFO_OUT_LENMAX 252 2671#define MC_CMD_STACKINFO_OUT_LENMAX_MCDI2 1020 2672#define MC_CMD_STACKINFO_OUT_LEN(num) (0+12*(num)) 2673#define MC_CMD_STACKINFO_OUT_THREAD_INFO_NUM(len) (((len)-0)/12) 2674/* (thread ptr, stack size, free space) for each thread in system */ 2675#define MC_CMD_STACKINFO_OUT_THREAD_INFO_OFST 0 2676#define MC_CMD_STACKINFO_OUT_THREAD_INFO_LEN 12 2677#define MC_CMD_STACKINFO_OUT_THREAD_INFO_MINNUM 1 2678#define MC_CMD_STACKINFO_OUT_THREAD_INFO_MAXNUM 21 2679#define MC_CMD_STACKINFO_OUT_THREAD_INFO_MAXNUM_MCDI2 85 2680 2681 2682/***********************************/ 2683/* MC_CMD_MDIO_READ 2684 * MDIO register read. 2685 */ 2686#define MC_CMD_MDIO_READ 0x10 2687#undef MC_CMD_0x10_PRIVILEGE_CTG 2688 2689#define MC_CMD_0x10_PRIVILEGE_CTG SRIOV_CTG_GENERAL 2690 2691/* MC_CMD_MDIO_READ_IN msgrequest */ 2692#define MC_CMD_MDIO_READ_IN_LEN 16 2693/* Bus number; there are two MDIO buses: one for the internal PHY, and one for 2694 * external devices. 2695 */ 2696#define MC_CMD_MDIO_READ_IN_BUS_OFST 0 2697#define MC_CMD_MDIO_READ_IN_BUS_LEN 4 2698/* enum: Internal. */ 2699#define MC_CMD_MDIO_BUS_INTERNAL 0x0 2700/* enum: External. */ 2701#define MC_CMD_MDIO_BUS_EXTERNAL 0x1 2702/* Port address */ 2703#define MC_CMD_MDIO_READ_IN_PRTAD_OFST 4 2704#define MC_CMD_MDIO_READ_IN_PRTAD_LEN 4 2705/* Device Address or clause 22. */ 2706#define MC_CMD_MDIO_READ_IN_DEVAD_OFST 8 2707#define MC_CMD_MDIO_READ_IN_DEVAD_LEN 4 2708/* enum: By default all the MCDI MDIO operations perform clause45 mode. If you 2709 * want to use clause22 then set DEVAD = MC_CMD_MDIO_CLAUSE22. 2710 */ 2711#define MC_CMD_MDIO_CLAUSE22 0x20 2712/* Address */ 2713#define MC_CMD_MDIO_READ_IN_ADDR_OFST 12 2714#define MC_CMD_MDIO_READ_IN_ADDR_LEN 4 2715 2716/* MC_CMD_MDIO_READ_OUT msgresponse */ 2717#define MC_CMD_MDIO_READ_OUT_LEN 8 2718/* Value */ 2719#define MC_CMD_MDIO_READ_OUT_VALUE_OFST 0 2720#define MC_CMD_MDIO_READ_OUT_VALUE_LEN 4 2721/* Status the MDIO commands return the raw status bits from the MDIO block. A 2722 * "good" transaction should have the DONE bit set and all other bits clear. 2723 */ 2724#define MC_CMD_MDIO_READ_OUT_STATUS_OFST 4 2725#define MC_CMD_MDIO_READ_OUT_STATUS_LEN 4 2726/* enum: Good. */ 2727#define MC_CMD_MDIO_STATUS_GOOD 0x8 2728 2729 2730/***********************************/ 2731/* MC_CMD_MDIO_WRITE 2732 * MDIO register write. 2733 */ 2734#define MC_CMD_MDIO_WRITE 0x11 2735#undef MC_CMD_0x11_PRIVILEGE_CTG 2736 2737#define MC_CMD_0x11_PRIVILEGE_CTG SRIOV_CTG_ADMIN 2738 2739/* MC_CMD_MDIO_WRITE_IN msgrequest */ 2740#define MC_CMD_MDIO_WRITE_IN_LEN 20 2741/* Bus number; there are two MDIO buses: one for the internal PHY, and one for 2742 * external devices. 2743 */ 2744#define MC_CMD_MDIO_WRITE_IN_BUS_OFST 0 2745#define MC_CMD_MDIO_WRITE_IN_BUS_LEN 4 2746/* enum: Internal. */ 2747/* MC_CMD_MDIO_BUS_INTERNAL 0x0 */ 2748/* enum: External. */ 2749/* MC_CMD_MDIO_BUS_EXTERNAL 0x1 */ 2750/* Port address */ 2751#define MC_CMD_MDIO_WRITE_IN_PRTAD_OFST 4 2752#define MC_CMD_MDIO_WRITE_IN_PRTAD_LEN 4 2753/* Device Address or clause 22. */ 2754#define MC_CMD_MDIO_WRITE_IN_DEVAD_OFST 8 2755#define MC_CMD_MDIO_WRITE_IN_DEVAD_LEN 4 2756/* enum: By default all the MCDI MDIO operations perform clause45 mode. If you 2757 * want to use clause22 then set DEVAD = MC_CMD_MDIO_CLAUSE22. 2758 */ 2759/* MC_CMD_MDIO_CLAUSE22 0x20 */ 2760/* Address */ 2761#define MC_CMD_MDIO_WRITE_IN_ADDR_OFST 12 2762#define MC_CMD_MDIO_WRITE_IN_ADDR_LEN 4 2763/* Value */ 2764#define MC_CMD_MDIO_WRITE_IN_VALUE_OFST 16 2765#define MC_CMD_MDIO_WRITE_IN_VALUE_LEN 4 2766 2767/* MC_CMD_MDIO_WRITE_OUT msgresponse */ 2768#define MC_CMD_MDIO_WRITE_OUT_LEN 4 2769/* Status; the MDIO commands return the raw status bits from the MDIO block. A 2770 * "good" transaction should have the DONE bit set and all other bits clear. 2771 */ 2772#define MC_CMD_MDIO_WRITE_OUT_STATUS_OFST 0 2773#define MC_CMD_MDIO_WRITE_OUT_STATUS_LEN 4 2774/* enum: Good. */ 2775/* MC_CMD_MDIO_STATUS_GOOD 0x8 */ 2776 2777 2778/***********************************/ 2779/* MC_CMD_DBI_WRITE 2780 * Write DBI register(s). 2781 */ 2782#define MC_CMD_DBI_WRITE 0x12 2783#undef MC_CMD_0x12_PRIVILEGE_CTG 2784 2785#define MC_CMD_0x12_PRIVILEGE_CTG SRIOV_CTG_INSECURE 2786 2787/* MC_CMD_DBI_WRITE_IN msgrequest */ 2788#define MC_CMD_DBI_WRITE_IN_LENMIN 12 2789#define MC_CMD_DBI_WRITE_IN_LENMAX 252 2790#define MC_CMD_DBI_WRITE_IN_LENMAX_MCDI2 1020 2791#define MC_CMD_DBI_WRITE_IN_LEN(num) (0+12*(num)) 2792#define MC_CMD_DBI_WRITE_IN_DBIWROP_NUM(len) (((len)-0)/12) 2793/* Each write op consists of an address (offset 0), byte enable/VF/CS2 (offset 2794 * 32) and value (offset 64). See MC_CMD_DBIWROP_TYPEDEF. 2795 */ 2796#define MC_CMD_DBI_WRITE_IN_DBIWROP_OFST 0 2797#define MC_CMD_DBI_WRITE_IN_DBIWROP_LEN 12 2798#define MC_CMD_DBI_WRITE_IN_DBIWROP_MINNUM 1 2799#define MC_CMD_DBI_WRITE_IN_DBIWROP_MAXNUM 21 2800#define MC_CMD_DBI_WRITE_IN_DBIWROP_MAXNUM_MCDI2 85 2801 2802/* MC_CMD_DBI_WRITE_OUT msgresponse */ 2803#define MC_CMD_DBI_WRITE_OUT_LEN 0 2804 2805/* MC_CMD_DBIWROP_TYPEDEF structuredef */ 2806#define MC_CMD_DBIWROP_TYPEDEF_LEN 12 2807#define MC_CMD_DBIWROP_TYPEDEF_ADDRESS_OFST 0 2808#define MC_CMD_DBIWROP_TYPEDEF_ADDRESS_LEN 4 2809#define MC_CMD_DBIWROP_TYPEDEF_ADDRESS_LBN 0 2810#define MC_CMD_DBIWROP_TYPEDEF_ADDRESS_WIDTH 32 2811#define MC_CMD_DBIWROP_TYPEDEF_PARMS_OFST 4 2812#define MC_CMD_DBIWROP_TYPEDEF_PARMS_LEN 4 2813#define MC_CMD_DBIWROP_TYPEDEF_VF_NUM_OFST 4 2814#define MC_CMD_DBIWROP_TYPEDEF_VF_NUM_LBN 16 2815#define MC_CMD_DBIWROP_TYPEDEF_VF_NUM_WIDTH 16 2816#define MC_CMD_DBIWROP_TYPEDEF_VF_ACTIVE_OFST 4 2817#define MC_CMD_DBIWROP_TYPEDEF_VF_ACTIVE_LBN 15 2818#define MC_CMD_DBIWROP_TYPEDEF_VF_ACTIVE_WIDTH 1 2819#define MC_CMD_DBIWROP_TYPEDEF_CS2_OFST 4 2820#define MC_CMD_DBIWROP_TYPEDEF_CS2_LBN 14 2821#define MC_CMD_DBIWROP_TYPEDEF_CS2_WIDTH 1 2822#define MC_CMD_DBIWROP_TYPEDEF_PARMS_LBN 32 2823#define MC_CMD_DBIWROP_TYPEDEF_PARMS_WIDTH 32 2824#define MC_CMD_DBIWROP_TYPEDEF_VALUE_OFST 8 2825#define MC_CMD_DBIWROP_TYPEDEF_VALUE_LEN 4 2826#define MC_CMD_DBIWROP_TYPEDEF_VALUE_LBN 64 2827#define MC_CMD_DBIWROP_TYPEDEF_VALUE_WIDTH 32 2828 2829 2830/***********************************/ 2831/* MC_CMD_PORT_READ32 2832 * Read a 32-bit register from the indirect port register map. The port to 2833 * access is implied by the Shared memory channel used. 2834 */ 2835#define MC_CMD_PORT_READ32 0x14 2836 2837/* MC_CMD_PORT_READ32_IN msgrequest */ 2838#define MC_CMD_PORT_READ32_IN_LEN 4 2839/* Address */ 2840#define MC_CMD_PORT_READ32_IN_ADDR_OFST 0 2841#define MC_CMD_PORT_READ32_IN_ADDR_LEN 4 2842 2843/* MC_CMD_PORT_READ32_OUT msgresponse */ 2844#define MC_CMD_PORT_READ32_OUT_LEN 8 2845/* Value */ 2846#define MC_CMD_PORT_READ32_OUT_VALUE_OFST 0 2847#define MC_CMD_PORT_READ32_OUT_VALUE_LEN 4 2848/* Status */ 2849#define MC_CMD_PORT_READ32_OUT_STATUS_OFST 4 2850#define MC_CMD_PORT_READ32_OUT_STATUS_LEN 4 2851 2852 2853/***********************************/ 2854/* MC_CMD_PORT_WRITE32 2855 * Write a 32-bit register to the indirect port register map. The port to 2856 * access is implied by the Shared memory channel used. 2857 */ 2858#define MC_CMD_PORT_WRITE32 0x15 2859 2860/* MC_CMD_PORT_WRITE32_IN msgrequest */ 2861#define MC_CMD_PORT_WRITE32_IN_LEN 8 2862/* Address */ 2863#define MC_CMD_PORT_WRITE32_IN_ADDR_OFST 0 2864#define MC_CMD_PORT_WRITE32_IN_ADDR_LEN 4 2865/* Value */ 2866#define MC_CMD_PORT_WRITE32_IN_VALUE_OFST 4 2867#define MC_CMD_PORT_WRITE32_IN_VALUE_LEN 4 2868 2869/* MC_CMD_PORT_WRITE32_OUT msgresponse */ 2870#define MC_CMD_PORT_WRITE32_OUT_LEN 4 2871/* Status */ 2872#define MC_CMD_PORT_WRITE32_OUT_STATUS_OFST 0 2873#define MC_CMD_PORT_WRITE32_OUT_STATUS_LEN 4 2874 2875 2876/***********************************/ 2877/* MC_CMD_PORT_READ128 2878 * Read a 128-bit register from the indirect port register map. The port to 2879 * access is implied by the Shared memory channel used. 2880 */ 2881#define MC_CMD_PORT_READ128 0x16 2882 2883/* MC_CMD_PORT_READ128_IN msgrequest */ 2884#define MC_CMD_PORT_READ128_IN_LEN 4 2885/* Address */ 2886#define MC_CMD_PORT_READ128_IN_ADDR_OFST 0 2887#define MC_CMD_PORT_READ128_IN_ADDR_LEN 4 2888 2889/* MC_CMD_PORT_READ128_OUT msgresponse */ 2890#define MC_CMD_PORT_READ128_OUT_LEN 20 2891/* Value */ 2892#define MC_CMD_PORT_READ128_OUT_VALUE_OFST 0 2893#define MC_CMD_PORT_READ128_OUT_VALUE_LEN 16 2894/* Status */ 2895#define MC_CMD_PORT_READ128_OUT_STATUS_OFST 16 2896#define MC_CMD_PORT_READ128_OUT_STATUS_LEN 4 2897 2898 2899/***********************************/ 2900/* MC_CMD_PORT_WRITE128 2901 * Write a 128-bit register to the indirect port register map. The port to 2902 * access is implied by the Shared memory channel used. 2903 */ 2904#define MC_CMD_PORT_WRITE128 0x17 2905 2906/* MC_CMD_PORT_WRITE128_IN msgrequest */ 2907#define MC_CMD_PORT_WRITE128_IN_LEN 20 2908/* Address */ 2909#define MC_CMD_PORT_WRITE128_IN_ADDR_OFST 0 2910#define MC_CMD_PORT_WRITE128_IN_ADDR_LEN 4 2911/* Value */ 2912#define MC_CMD_PORT_WRITE128_IN_VALUE_OFST 4 2913#define MC_CMD_PORT_WRITE128_IN_VALUE_LEN 16 2914 2915/* MC_CMD_PORT_WRITE128_OUT msgresponse */ 2916#define MC_CMD_PORT_WRITE128_OUT_LEN 4 2917/* Status */ 2918#define MC_CMD_PORT_WRITE128_OUT_STATUS_OFST 0 2919#define MC_CMD_PORT_WRITE128_OUT_STATUS_LEN 4 2920 2921/* MC_CMD_CAPABILITIES structuredef */ 2922#define MC_CMD_CAPABILITIES_LEN 4 2923/* Small buf table. */ 2924#define MC_CMD_CAPABILITIES_SMALL_BUF_TBL_LBN 0 2925#define MC_CMD_CAPABILITIES_SMALL_BUF_TBL_WIDTH 1 2926/* Turbo mode (for Maranello). */ 2927#define MC_CMD_CAPABILITIES_TURBO_LBN 1 2928#define MC_CMD_CAPABILITIES_TURBO_WIDTH 1 2929/* Turbo mode active (for Maranello). */ 2930#define MC_CMD_CAPABILITIES_TURBO_ACTIVE_LBN 2 2931#define MC_CMD_CAPABILITIES_TURBO_ACTIVE_WIDTH 1 2932/* PTP offload. */ 2933#define MC_CMD_CAPABILITIES_PTP_LBN 3 2934#define MC_CMD_CAPABILITIES_PTP_WIDTH 1 2935/* AOE mode. */ 2936#define MC_CMD_CAPABILITIES_AOE_LBN 4 2937#define MC_CMD_CAPABILITIES_AOE_WIDTH 1 2938/* AOE mode active. */ 2939#define MC_CMD_CAPABILITIES_AOE_ACTIVE_LBN 5 2940#define MC_CMD_CAPABILITIES_AOE_ACTIVE_WIDTH 1 2941/* AOE mode active. */ 2942#define MC_CMD_CAPABILITIES_FC_ACTIVE_LBN 6 2943#define MC_CMD_CAPABILITIES_FC_ACTIVE_WIDTH 1 2944#define MC_CMD_CAPABILITIES_RESERVED_LBN 7 2945#define MC_CMD_CAPABILITIES_RESERVED_WIDTH 25 2946 2947 2948/***********************************/ 2949/* MC_CMD_GET_BOARD_CFG 2950 * Returns the MC firmware configuration structure. 2951 */ 2952#define MC_CMD_GET_BOARD_CFG 0x18 2953#undef MC_CMD_0x18_PRIVILEGE_CTG 2954 2955#define MC_CMD_0x18_PRIVILEGE_CTG SRIOV_CTG_GENERAL 2956 2957/* MC_CMD_GET_BOARD_CFG_IN msgrequest */ 2958#define MC_CMD_GET_BOARD_CFG_IN_LEN 0 2959 2960/* MC_CMD_GET_BOARD_CFG_OUT msgresponse */ 2961#define MC_CMD_GET_BOARD_CFG_OUT_LENMIN 96 2962#define MC_CMD_GET_BOARD_CFG_OUT_LENMAX 136 2963#define MC_CMD_GET_BOARD_CFG_OUT_LENMAX_MCDI2 136 2964#define MC_CMD_GET_BOARD_CFG_OUT_LEN(num) (72+2*(num)) 2965#define MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_NUM(len) (((len)-72)/2) 2966#define MC_CMD_GET_BOARD_CFG_OUT_BOARD_TYPE_OFST 0 2967#define MC_CMD_GET_BOARD_CFG_OUT_BOARD_TYPE_LEN 4 2968#define MC_CMD_GET_BOARD_CFG_OUT_BOARD_NAME_OFST 4 2969#define MC_CMD_GET_BOARD_CFG_OUT_BOARD_NAME_LEN 32 2970/* Capabilities for Siena Port0 (see struct MC_CMD_CAPABILITIES). Unused on 2971 * EF10 and later (use MC_CMD_GET_CAPABILITIES). 2972 */ 2973#define MC_CMD_GET_BOARD_CFG_OUT_CAPABILITIES_PORT0_OFST 36 2974#define MC_CMD_GET_BOARD_CFG_OUT_CAPABILITIES_PORT0_LEN 4 2975/* Capabilities for Siena Port1 (see struct MC_CMD_CAPABILITIES). Unused on 2976 * EF10 and later (use MC_CMD_GET_CAPABILITIES). 2977 */ 2978#define MC_CMD_GET_BOARD_CFG_OUT_CAPABILITIES_PORT1_OFST 40 2979#define MC_CMD_GET_BOARD_CFG_OUT_CAPABILITIES_PORT1_LEN 4 2980/* Base MAC address for Siena Port0. Unused on EF10 and later (use 2981 * MC_CMD_GET_MAC_ADDRESSES). 2982 */ 2983#define MC_CMD_GET_BOARD_CFG_OUT_MAC_ADDR_BASE_PORT0_OFST 44 2984#define MC_CMD_GET_BOARD_CFG_OUT_MAC_ADDR_BASE_PORT0_LEN 6 2985/* Base MAC address for Siena Port1. Unused on EF10 and later (use 2986 * MC_CMD_GET_MAC_ADDRESSES). 2987 */ 2988#define MC_CMD_GET_BOARD_CFG_OUT_MAC_ADDR_BASE_PORT1_OFST 50 2989#define MC_CMD_GET_BOARD_CFG_OUT_MAC_ADDR_BASE_PORT1_LEN 6 2990/* Size of MAC address pool for Siena Port0. Unused on EF10 and later (use 2991 * MC_CMD_GET_MAC_ADDRESSES). 2992 */ 2993#define MC_CMD_GET_BOARD_CFG_OUT_MAC_COUNT_PORT0_OFST 56 2994#define MC_CMD_GET_BOARD_CFG_OUT_MAC_COUNT_PORT0_LEN 4 2995/* Size of MAC address pool for Siena Port1. Unused on EF10 and later (use 2996 * MC_CMD_GET_MAC_ADDRESSES). 2997 */ 2998#define MC_CMD_GET_BOARD_CFG_OUT_MAC_COUNT_PORT1_OFST 60 2999#define MC_CMD_GET_BOARD_CFG_OUT_MAC_COUNT_PORT1_LEN 4 3000/* Increment between addresses in MAC address pool for Siena Port0. Unused on
3001 * EF10 and later (use MC_CMD_GET_MAC_ADDRESSES). 3002 */ 3003#define MC_CMD_GET_BOARD_CFG_OUT_MAC_STRIDE_PORT0_OFST 64 3004#define MC_CMD_GET_BOARD_CFG_OUT_MAC_STRIDE_PORT0_LEN 4 3005/* Increment between addresses in MAC address pool for Siena Port1. Unused on 3006 * EF10 and later (use MC_CMD_GET_MAC_ADDRESSES). 3007 */ 3008#define MC_CMD_GET_BOARD_CFG_OUT_MAC_STRIDE_PORT1_OFST 68 3009#define MC_CMD_GET_BOARD_CFG_OUT_MAC_STRIDE_PORT1_LEN 4 3010/* Siena only. This field contains a 16-bit value for each of the types of 3011 * NVRAM area. The values are defined in the firmware/mc/platform/.c file for a 3012 * specific board type, but otherwise have no meaning to the MC; they are used 3013 * by the driver to manage selection of appropriate firmware updates. Unused on 3014 * EF10 and later (use MC_CMD_NVRAM_METADATA). 3015 */ 3016#define MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_OFST 72 3017#define MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_LEN 2 3018#define MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_MINNUM 12 3019#define MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_MAXNUM 32 3020#define MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_MAXNUM_MCDI2 32 3021 3022 3023/***********************************/ 3024/* MC_CMD_DBI_READX 3025 * Read DBI register(s) -- extended functionality 3026 */ 3027#define MC_CMD_DBI_READX 0x19 3028#undef MC_CMD_0x19_PRIVILEGE_CTG 3029 3030#define MC_CMD_0x19_PRIVILEGE_CTG SRIOV_CTG_INSECURE 3031 3032/* MC_CMD_DBI_READX_IN msgrequest */ 3033#define MC_CMD_DBI_READX_IN_LENMIN 8 3034#define MC_CMD_DBI_READX_IN_LENMAX 248 3035#define MC_CMD_DBI_READX_IN_LENMAX_MCDI2 1016 3036#define MC_CMD_DBI_READX_IN_LEN(num) (0+8*(num)) 3037#define MC_CMD_DBI_READX_IN_DBIRDOP_NUM(len) (((len)-0)/8) 3038/* Each Read op consists of an address (offset 0), VF/CS2) */ 3039#define MC_CMD_DBI_READX_IN_DBIRDOP_OFST 0 3040#define MC_CMD_DBI_READX_IN_DBIRDOP_LEN 8 3041#define MC_CMD_DBI_READX_IN_DBIRDOP_LO_OFST 0 3042#define MC_CMD_DBI_READX_IN_DBIRDOP_HI_OFST 4 3043#define MC_CMD_DBI_READX_IN_DBIRDOP_MINNUM 1 3044#define MC_CMD_DBI_READX_IN_DBIRDOP_MAXNUM 31 3045#define MC_CMD_DBI_READX_IN_DBIRDOP_MAXNUM_MCDI2 127 3046 3047/* MC_CMD_DBI_READX_OUT msgresponse */ 3048#define MC_CMD_DBI_READX_OUT_LENMIN 4 3049#define MC_CMD_DBI_READX_OUT_LENMAX 252 3050#define MC_CMD_DBI_READX_OUT_LENMAX_MCDI2 1020 3051#define MC_CMD_DBI_READX_OUT_LEN(num) (0+4*(num)) 3052#define MC_CMD_DBI_READX_OUT_VALUE_NUM(len) (((len)-0)/4) 3053/* Value */ 3054#define MC_CMD_DBI_READX_OUT_VALUE_OFST 0 3055#define MC_CMD_DBI_READX_OUT_VALUE_LEN 4 3056#define MC_CMD_DBI_READX_OUT_VALUE_MINNUM 1 3057#define MC_CMD_DBI_READX_OUT_VALUE_MAXNUM 63 3058#define MC_CMD_DBI_READX_OUT_VALUE_MAXNUM_MCDI2 255 3059 3060/* MC_CMD_DBIRDOP_TYPEDEF structuredef */ 3061#define MC_CMD_DBIRDOP_TYPEDEF_LEN 8 3062#define MC_CMD_DBIRDOP_TYPEDEF_ADDRESS_OFST 0 3063#define MC_CMD_DBIRDOP_TYPEDEF_ADDRESS_LEN 4 3064#define MC_CMD_DBIRDOP_TYPEDEF_ADDRESS_LBN 0 3065#define MC_CMD_DBIRDOP_TYPEDEF_ADDRESS_WIDTH 32 3066#define MC_CMD_DBIRDOP_TYPEDEF_PARMS_OFST 4 3067#define MC_CMD_DBIRDOP_TYPEDEF_PARMS_LEN 4 3068#define MC_CMD_DBIRDOP_TYPEDEF_VF_NUM_OFST 4 3069#define MC_CMD_DBIRDOP_TYPEDEF_VF_NUM_LBN 16 3070#define MC_CMD_DBIRDOP_TYPEDEF_VF_NUM_WIDTH 16 3071#define MC_CMD_DBIRDOP_TYPEDEF_VF_ACTIVE_OFST 4 3072#define MC_CMD_DBIRDOP_TYPEDEF_VF_ACTIVE_LBN 15 3073#define MC_CMD_DBIRDOP_TYPEDEF_VF_ACTIVE_WIDTH 1 3074#define MC_CMD_DBIRDOP_TYPEDEF_CS2_OFST 4 3075#define MC_CMD_DBIRDOP_TYPEDEF_CS2_LBN 14 3076#define MC_CMD_DBIRDOP_TYPEDEF_CS2_WIDTH 1 3077#define MC_CMD_DBIRDOP_TYPEDEF_PARMS_LBN 32 3078#define MC_CMD_DBIRDOP_TYPEDEF_PARMS_WIDTH 32 3079 3080 3081/***********************************/ 3082/* MC_CMD_SET_RAND_SEED 3083 * Set the 16byte seed for the MC pseudo-random generator. 3084 */ 3085#define MC_CMD_SET_RAND_SEED 0x1a 3086#undef MC_CMD_0x1a_PRIVILEGE_CTG 3087 3088#define MC_CMD_0x1a_PRIVILEGE_CTG SRIOV_CTG_INSECURE 3089 3090/* MC_CMD_SET_RAND_SEED_IN msgrequest */ 3091#define MC_CMD_SET_RAND_SEED_IN_LEN 16 3092/* Seed value. */ 3093#define MC_CMD_SET_RAND_SEED_IN_SEED_OFST 0 3094#define MC_CMD_SET_RAND_SEED_IN_SEED_LEN 16 3095 3096/* MC_CMD_SET_RAND_SEED_OUT msgresponse */ 3097#define MC_CMD_SET_RAND_SEED_OUT_LEN 0 3098 3099 3100/***********************************/ 3101/* MC_CMD_LTSSM_HIST 3102 * Retrieve the history of the LTSSM, if the build supports it. 3103 */ 3104#define MC_CMD_LTSSM_HIST 0x1b 3105 3106/* MC_CMD_LTSSM_HIST_IN msgrequest */ 3107#define MC_CMD_LTSSM_HIST_IN_LEN 0 3108 3109/* MC_CMD_LTSSM_HIST_OUT msgresponse */ 3110#define MC_CMD_LTSSM_HIST_OUT_LENMIN 0 3111#define MC_CMD_LTSSM_HIST_OUT_LENMAX 252 3112#define MC_CMD_LTSSM_HIST_OUT_LENMAX_MCDI2 1020 3113#define MC_CMD_LTSSM_HIST_OUT_LEN(num) (0+4*(num)) 3114#define MC_CMD_LTSSM_HIST_OUT_DATA_NUM(len) (((len)-0)/4) 3115/* variable number of LTSSM values, as bytes. The history is read-to-clear. */ 3116#define MC_CMD_LTSSM_HIST_OUT_DATA_OFST 0 3117#define MC_CMD_LTSSM_HIST_OUT_DATA_LEN 4 3118#define MC_CMD_LTSSM_HIST_OUT_DATA_MINNUM 0 3119#define MC_CMD_LTSSM_HIST_OUT_DATA_MAXNUM 63 3120#define MC_CMD_LTSSM_HIST_OUT_DATA_MAXNUM_MCDI2 255 3121 3122 3123/***********************************/ 3124/* MC_CMD_DRV_ATTACH 3125 * Inform MCPU that this port is managed on the host (i.e. driver active). For 3126 * Huntington, also request the preferred datapath firmware to use if possible 3127 * (it may not be possible for this request to be fulfilled; the driver must 3128 * issue a subsequent MC_CMD_GET_CAPABILITIES command to determine which 3129 * features are actually available). The FIRMWARE_ID field is ignored by older 3130 * platforms. 3131 */ 3132#define MC_CMD_DRV_ATTACH 0x1c 3133#undef MC_CMD_0x1c_PRIVILEGE_CTG 3134 3135#define MC_CMD_0x1c_PRIVILEGE_CTG SRIOV_CTG_GENERAL 3136 3137/* MC_CMD_DRV_ATTACH_IN msgrequest */ 3138#define MC_CMD_DRV_ATTACH_IN_LEN 12 3139/* new state to set if UPDATE=1 */ 3140#define MC_CMD_DRV_ATTACH_IN_NEW_STATE_OFST 0 3141#define MC_CMD_DRV_ATTACH_IN_NEW_STATE_LEN 4 3142#define MC_CMD_DRV_ATTACH_OFST 0 3143#define MC_CMD_DRV_ATTACH_LBN 0 3144#define MC_CMD_DRV_ATTACH_WIDTH 1 3145#define MC_CMD_DRV_ATTACH_IN_ATTACH_OFST 0 3146#define MC_CMD_DRV_ATTACH_IN_ATTACH_LBN 0 3147#define MC_CMD_DRV_ATTACH_IN_ATTACH_WIDTH 1 3148#define MC_CMD_DRV_PREBOOT_OFST 0 3149#define MC_CMD_DRV_PREBOOT_LBN 1 3150#define MC_CMD_DRV_PREBOOT_WIDTH 1 3151#define MC_CMD_DRV_ATTACH_IN_PREBOOT_OFST 0 3152#define MC_CMD_DRV_ATTACH_IN_PREBOOT_LBN 1 3153#define MC_CMD_DRV_ATTACH_IN_PREBOOT_WIDTH 1 3154#define MC_CMD_DRV_ATTACH_IN_SUBVARIANT_AWARE_OFST 0 3155#define MC_CMD_DRV_ATTACH_IN_SUBVARIANT_AWARE_LBN 2 3156#define MC_CMD_DRV_ATTACH_IN_SUBVARIANT_AWARE_WIDTH 1 3157#define MC_CMD_DRV_ATTACH_IN_WANT_VI_SPREADING_OFST 0 3158#define MC_CMD_DRV_ATTACH_IN_WANT_VI_SPREADING_LBN 3 3159#define MC_CMD_DRV_ATTACH_IN_WANT_VI_SPREADING_WIDTH 1 3160#define MC_CMD_DRV_ATTACH_IN_WANT_V2_LINKCHANGES_OFST 0 3161#define MC_CMD_DRV_ATTACH_IN_WANT_V2_LINKCHANGES_LBN 4 3162#define MC_CMD_DRV_ATTACH_IN_WANT_V2_LINKCHANGES_WIDTH 1 3163#define MC_CMD_DRV_ATTACH_IN_WANT_RX_VI_SPREADING_INHIBIT_OFST 0 3164#define MC_CMD_DRV_ATTACH_IN_WANT_RX_VI_SPREADING_INHIBIT_LBN 5 3165#define MC_CMD_DRV_ATTACH_IN_WANT_RX_VI_SPREADING_INHIBIT_WIDTH 1 3166#define MC_CMD_DRV_ATTACH_IN_WANT_TX_ONLY_SPREADING_OFST 0 3167#define MC_CMD_DRV_ATTACH_IN_WANT_TX_ONLY_SPREADING_LBN 5 3168#define MC_CMD_DRV_ATTACH_IN_WANT_TX_ONLY_SPREADING_WIDTH 1 3169/* 1 to set new state, or 0 to just report the existing state */ 3170#define MC_CMD_DRV_ATTACH_IN_UPDATE_OFST 4 3171#define MC_CMD_DRV_ATTACH_IN_UPDATE_LEN 4 3172/* preferred datapath firmware (for Huntington; ignored for Siena) */ 3173#define MC_CMD_DRV_ATTACH_IN_FIRMWARE_ID_OFST 8 3174#define MC_CMD_DRV_ATTACH_IN_FIRMWARE_ID_LEN 4 3175/* enum: Prefer to use full featured firmware */ 3176#define MC_CMD_FW_FULL_FEATURED 0x0 3177/* enum: Prefer to use firmware with fewer features but lower latency */ 3178#define MC_CMD_FW_LOW_LATENCY 0x1 3179/* enum: Prefer to use firmware for SolarCapture packed stream mode */ 3180#define MC_CMD_FW_PACKED_STREAM 0x2 3181/* enum: Prefer to use firmware with fewer features and simpler TX event 3182 * batching but higher TX packet rate 3183 */ 3184#define MC_CMD_FW_HIGH_TX_RATE 0x3 3185/* enum: Reserved value */ 3186#define MC_CMD_FW_PACKED_STREAM_HASH_MODE_1 0x4 3187/* enum: Prefer to use firmware with additional "rules engine" filtering 3188 * support 3189 */ 3190#define MC_CMD_FW_RULES_ENGINE 0x5 3191/* enum: Prefer to use firmware with additional DPDK support */ 3192#define MC_CMD_FW_DPDK 0x6 3193/* enum: Prefer to use "l3xudp" custom datapath firmware (see SF-119495-PD and 3194 * bug69716) 3195 */ 3196#define MC_CMD_FW_L3XUDP 0x7 3197/* enum: Requests that the MC keep whatever datapath firmware is currently 3198 * running. It's used for test purposes, where we want to be able to shmboot 3199 * special test firmware variants. This option is only recognised in eftest 3200 * (i.e. non-production) builds. 3201 */ 3202#define MC_CMD_FW_KEEP_CURRENT_EFTEST_ONLY 0xfffffffe 3203/* enum: Only this option is allowed for non-admin functions */ 3204#define MC_CMD_FW_DONT_CARE 0xffffffff 3205 3206/* MC_CMD_DRV_ATTACH_IN_V2 msgrequest: Updated DRV_ATTACH to include driver 3207 * version 3208 */ 3209#define MC_CMD_DRV_ATTACH_IN_V2_LEN 32 3210/* new state to set if UPDATE=1 */ 3211#define MC_CMD_DRV_ATTACH_IN_V2_NEW_STATE_OFST 0 3212#define MC_CMD_DRV_ATTACH_IN_V2_NEW_STATE_LEN 4 3213/* MC_CMD_DRV_ATTACH_OFST 0 */ 3214/* MC_CMD_DRV_ATTACH_LBN 0 */ 3215/* MC_CMD_DRV_ATTACH_WIDTH 1 */ 3216#define MC_CMD_DRV_ATTACH_IN_V2_ATTACH_OFST 0 3217#define MC_CMD_DRV_ATTACH_IN_V2_ATTACH_LBN 0 3218#define MC_CMD_DRV_ATTACH_IN_V2_ATTACH_WIDTH 1 3219/* MC_CMD_DRV_PREBOOT_OFST 0 */ 3220/* MC_CMD_DRV_PREBOOT_LBN 1 */ 3221/* MC_CMD_DRV_PREBOOT_WIDTH 1 */ 3222#define MC_CMD_DRV_ATTACH_IN_V2_PREBOOT_OFST 0 3223#define MC_CMD_DRV_ATTACH_IN_V2_PREBOOT_LBN 1 3224#define MC_CMD_DRV_ATTACH_IN_V2_PREBOOT_WIDTH 1 3225#define MC_CMD_DRV_ATTACH_IN_V2_SUBVARIANT_AWARE_OFST 0 3226#define MC_CMD_DRV_ATTACH_IN_V2_SUBVARIANT_AWARE_LBN 2 3227#define MC_CMD_DRV_ATTACH_IN_V2_SUBVARIANT_AWARE_WIDTH 1 3228#define MC_CMD_DRV_ATTACH_IN_V2_WANT_VI_SPREADING_OFST 0 3229#define MC_CMD_DRV_ATTACH_IN_V2_WANT_VI_SPREADING_LBN 3 3230#define MC_CMD_DRV_ATTACH_IN_V2_WANT_VI_SPREADING_WIDTH 1 3231#define MC_CMD_DRV_ATTACH_IN_V2_WANT_V2_LINKCHANGES_OFST 0 3232#define MC_CMD_DRV_ATTACH_IN_V2_WANT_V2_LINKCHANGES_LBN 4 3233#define MC_CMD_DRV_ATTACH_IN_V2_WANT_V2_LINKCHANGES_WIDTH 1 3234#define MC_CMD_DRV_ATTACH_IN_V2_WANT_RX_VI_SPREADING_INHIBIT_OFST 0 3235#define MC_CMD_DRV_ATTACH_IN_V2_WANT_RX_VI_SPREADING_INHIBIT_LBN 5 3236#define MC_CMD_DRV_ATTACH_IN_V2_WANT_RX_VI_SPREADING_INHIBIT_WIDTH 1 3237#define MC_CMD_DRV_ATTACH_IN_V2_WANT_TX_ONLY_SPREADING_OFST 0 3238#define MC_CMD_DRV_ATTACH_IN_V2_WANT_TX_ONLY_SPREADING_LBN 5 3239#define MC_CMD_DRV_ATTACH_IN_V2_WANT_TX_ONLY_SPREADING_WIDTH 1 3240/* 1 to set new state, or 0 to just report the existing state */ 3241#define MC_CMD_DRV_ATTACH_IN_V2_UPDATE_OFST 4 3242#define MC_CMD_DRV_ATTACH_IN_V2_UPDATE_LEN 4 3243/* preferred datapath firmware (for Huntington; ignored for Siena) */ 3244#define MC_CMD_DRV_ATTACH_IN_V2_FIRMWARE_ID_OFST 8 3245#define MC_CMD_DRV_ATTACH_IN_V2_FIRMWARE_ID_LEN 4 3246/* enum: Prefer to use full featured firmware */ 3247/* MC_CMD_FW_FULL_FEATURED 0x0 */ 3248/* enum: Prefer to use firmware with fewer features but lower latency */ 3249/* MC_CMD_FW_LOW_LATENCY 0x1 */ 3250/* enum: Prefer to use firmware for SolarCapture packed stream mode */ 3251/* MC_CMD_FW_PACKED_STREAM 0x2 */ 3252/* enum: Prefer to use firmware with fewer features and simpler TX event 3253 * batching but higher TX packet rate 3254 */ 3255/* MC_CMD_FW_HIGH_TX_RATE 0x3 */ 3256/* enum: Reserved value */ 3257/* MC_CMD_FW_PACKED_STREAM_HASH_MODE_1 0x4 */ 3258/* enum: Prefer to use firmware with additional "rules engine" filtering 3259 * support 3260 */ 3261/* MC_CMD_FW_RULES_ENGINE 0x5 */ 3262/* enum: Prefer to use firmware with additional DPDK support */ 3263/* MC_CMD_FW_DPDK 0x6 */ 3264/* enum: Prefer to use "l3xudp" custom datapath firmware (see SF-119495-PD and 3265 * bug69716) 3266 */ 3267/* MC_CMD_FW_L3XUDP 0x7 */ 3268/* enum: Requests that the MC keep whatever datapath firmware is currently 3269 * running. It's used for test purposes, where we want to be able to shmboot 3270 * special test firmware variants. This option is only recognised in eftest 3271 * (i.e. non-production) builds. 3272 */ 3273/* MC_CMD_FW_KEEP_CURRENT_EFTEST_ONLY 0xfffffffe */ 3274/* enum: Only this option is allowed for non-admin functions */ 3275/* MC_CMD_FW_DONT_CARE 0xffffffff */ 3276/* Version of the driver to be reported by management protocols (e.g. NC-SI) 3277 * handled by the NIC. This is a zero-terminated ASCII string. 3278 */ 3279#define MC_CMD_DRV_ATTACH_IN_V2_DRIVER_VERSION_OFST 12 3280#define MC_CMD_DRV_ATTACH_IN_V2_DRIVER_VERSION_LEN 20 3281 3282/* MC_CMD_DRV_ATTACH_OUT msgresponse */ 3283#define MC_CMD_DRV_ATTACH_OUT_LEN 4 3284/* previous or existing state, see the bitmask at NEW_STATE */ 3285#define MC_CMD_DRV_ATTACH_OUT_OLD_STATE_OFST 0 3286#define MC_CMD_DRV_ATTACH_OUT_OLD_STATE_LEN 4 3287 3288/* MC_CMD_DRV_ATTACH_EXT_OUT msgresponse */ 3289#define MC_CMD_DRV_ATTACH_EXT_OUT_LEN 8 3290/* previous or existing state, see the bitmask at NEW_STATE */ 3291#define MC_CMD_DRV_ATTACH_EXT_OUT_OLD_STATE_OFST 0 3292#define MC_CMD_DRV_ATTACH_EXT_OUT_OLD_STATE_LEN 4 3293/* Flags associated with this function */ 3294#define MC_CMD_DRV_ATTACH_EXT_OUT_FUNC_FLAGS_OFST 4 3295#define MC_CMD_DRV_ATTACH_EXT_OUT_FUNC_FLAGS_LEN 4 3296/* enum: Labels the lowest-numbered function visible to the OS */ 3297#define MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_PRIMARY 0x0 3298/* enum: The function can control the link state of the physical port it is 3299 * bound to. 3300 */ 3301#define MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_LINKCTRL 0x1 3302/* enum: The function can perform privileged operations */ 3303#define MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_TRUSTED 0x2 3304/* enum: The function does not have an active port associated with it. The port 3305 * refers to the Sorrento external FPGA port. 3306 */ 3307#define MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_NO_ACTIVE_PORT 0x3 3308/* enum: If set, indicates that VI spreading is currently enabled. Will always 3309 * indicate the current state, regardless of the value in the WANT_VI_SPREADING 3310 * input. 3311 */ 3312#define MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_VI_SPREADING_ENABLED 0x4 3313/* enum: Used during development only. Should no longer be used. */ 3314#define MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_RX_VI_SPREADING_INHIBITED 0x5 3315/* enum: If set, indicates that TX only spreading is enabled. Even-numbered 3316 * TXQs will use one engine, and odd-numbered TXQs will use the other. This 3317 * also has the effect that only even-numbered RXQs will receive traffic. 3318 */ 3319#define MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_TX_ONLY_VI_SPREADING_ENABLED 0x5 3320 3321 3322/***********************************/ 3323/* MC_CMD_SHMUART 3324 * Route UART output to circular buffer in shared memory instead. 3325 */ 3326#define MC_CMD_SHMUART 0x1f 3327 3328/* MC_CMD_SHMUART_IN msgrequest */ 3329#define MC_CMD_SHMUART_IN_LEN 4 3330/* ??? */ 3331#define MC_CMD_SHMUART_IN_FLAG_OFST 0 3332#define MC_CMD_SHMUART_IN_FLAG_LEN 4 3333 3334/* MC_CMD_SHMUART_OUT msgresponse */ 3335#define MC_CMD_SHMUART_OUT_LEN 0 3336 3337 3338/***********************************/ 3339/* MC_CMD_PORT_RESET 3340 * Generic per-port reset. There is no equivalent for per-board reset. Locks 3341 * required: None; Return code: 0, ETIME. NOTE: This command is deprecated - 3342 * use MC_CMD_ENTITY_RESET instead. 3343 */ 3344#define MC_CMD_PORT_RESET 0x20 3345#undef MC_CMD_0x20_PRIVILEGE_CTG 3346 3347#define MC_CMD_0x20_PRIVILEGE_CTG SRIOV_CTG_GENERAL 3348 3349/* MC_CMD_PORT_RESET_IN msgrequest */ 3350#define MC_CMD_PORT_RESET_IN_LEN 0 3351 3352/* MC_CMD_PORT_RESET_OUT msgresponse */ 3353#define MC_CMD_PORT_RESET_OUT_LEN 0 3354 3355 3356/***********************************/ 3357/* MC_CMD_ENTITY_RESET 3358 * Generic per-resource reset. There is no equivalent for per-board reset. 3359 * Locks required: None; Return code: 0, ETIME. NOTE: This command is an 3360 * extended version of the deprecated MC_CMD_PORT_RESET with added fields. 3361 */ 3362#define MC_CMD_ENTITY_RESET 0x20 3363/* MC_CMD_0x20_PRIVILEGE_CTG SRIOV_CTG_GENERAL */ 3364 3365/* MC_CMD_ENTITY_RESET_IN msgrequest */ 3366#define MC_CMD_ENTITY_RESET_IN_LEN 4 3367/* Optional flags field. Omitting this will perform a "legacy" reset action 3368 * (TBD). 3369 */ 3370#define MC_CMD_ENTITY_RESET_IN_FLAG_OFST 0 3371#define MC_CMD_ENTITY_RESET_IN_FLAG_LEN 4 3372#define MC_CMD_ENTITY_RESET_IN_FUNCTION_RESOURCE_RESET_OFST 0 3373#define MC_CMD_ENTITY_RESET_IN_FUNCTION_RESOURCE_RESET_LBN 0 3374#define MC_CMD_ENTITY_RESET_IN_FUNCTION_RESOURCE_RESET_WIDTH 1 3375 3376/* MC_CMD_ENTITY_RESET_OUT msgresponse */ 3377#define MC_CMD_ENTITY_RESET_OUT_LEN 0 3378 3379 3380/***********************************/ 3381/* MC_CMD_PCIE_CREDITS 3382 * Read instantaneous and minimum flow control thresholds. 3383 */ 3384#define MC_CMD_PCIE_CREDITS 0x21 3385 3386/* MC_CMD_PCIE_CREDITS_IN msgrequest */ 3387#define MC_CMD_PCIE_CREDITS_IN_LEN 8 3388/* poll period. 0 is disabled */ 3389#define MC_CMD_PCIE_CREDITS_IN_POLL_PERIOD_OFST 0 3390#define MC_CMD_PCIE_CREDITS_IN_POLL_PERIOD_LEN 4 3391/* wipe statistics */ 3392#define MC_CMD_PCIE_CREDITS_IN_WIPE_OFST 4 3393#define MC_CMD_PCIE_CREDITS_IN_WIPE_LEN 4 3394 3395/* MC_CMD_PCIE_CREDITS_OUT msgresponse */ 3396#define MC_CMD_PCIE_CREDITS_OUT_LEN 16 3397#define MC_CMD_PCIE_CREDITS_OUT_CURRENT_P_HDR_OFST 0 3398#define MC_CMD_PCIE_CREDITS_OUT_CURRENT_P_HDR_LEN 2 3399#define MC_CMD_PCIE_CREDITS_OUT_CURRENT_P_DATA_OFST 2 3400#define MC_CMD_PCIE_CREDITS_OUT_CURRENT_P_DATA_LEN 2 3401#define MC_CMD_PCIE_CREDITS_OUT_CURRENT_NP_HDR_OFST 4 3402#define MC_CMD_PCIE_CREDITS_OUT_CURRENT_NP_HDR_LEN 2 3403#define MC_CMD_PCIE_CREDITS_OUT_CURRENT_NP_DATA_OFST 6 3404#define MC_CMD_PCIE_CREDITS_OUT_CURRENT_NP_DATA_LEN 2 3405#define MC_CMD_PCIE_CREDITS_OUT_MINIMUM_P_HDR_OFST 8 3406#define MC_CMD_PCIE_CREDITS_OUT_MINIMUM_P_HDR_LEN 2 3407#define MC_CMD_PCIE_CREDITS_OUT_MINIMUM_P_DATA_OFST 10 3408#define MC_CMD_PCIE_CREDITS_OUT_MINIMUM_P_DATA_LEN 2 3409#define MC_CMD_PCIE_CREDITS_OUT_MINIMUM_NP_HDR_OFST 12 3410#define MC_CMD_PCIE_CREDITS_OUT_MINIMUM_NP_HDR_LEN 2 3411#define MC_CMD_PCIE_CREDITS_OUT_MINIMUM_NP_DATA_OFST 14 3412#define MC_CMD_PCIE_CREDITS_OUT_MINIMUM_NP_DATA_LEN 2 3413 3414 3415/***********************************/ 3416/* MC_CMD_RXD_MONITOR 3417 * Get histogram of RX queue fill level. 3418 */ 3419#define MC_CMD_RXD_MONITOR 0x22 3420 3421/* MC_CMD_RXD_MONITOR_IN msgrequest */ 3422#define MC_CMD_RXD_MONITOR_IN_LEN 12 3423#define MC_CMD_RXD_MONITOR_IN_QID_OFST 0 3424#define MC_CMD_RXD_MONITOR_IN_QID_LEN 4 3425#define MC_CMD_RXD_MONITOR_IN_POLL_PERIOD_OFST 4 3426#define MC_CMD_RXD_MONITOR_IN_POLL_PERIOD_LEN 4 3427#define MC_CMD_RXD_MONITOR_IN_WIPE_OFST 8 3428#define MC_CMD_RXD_MONITOR_IN_WIPE_LEN 4 3429 3430/* MC_CMD_RXD_MONITOR_OUT msgresponse */ 3431#define MC_CMD_RXD_MONITOR_OUT_LEN 80 3432#define MC_CMD_RXD_MONITOR_OUT_QID_OFST 0 3433#define MC_CMD_RXD_MONITOR_OUT_QID_LEN 4 3434#define MC_CMD_RXD_MONITOR_OUT_RING_FILL_OFST 4 3435#define MC_CMD_RXD_MONITOR_OUT_RING_FILL_LEN 4 3436#define MC_CMD_RXD_MONITOR_OUT_CACHE_FILL_OFST 8 3437#define MC_CMD_RXD_MONITOR_OUT_CACHE_FILL_LEN 4 3438#define MC_CMD_RXD_MONITOR_OUT_RING_LT_1_OFST 12 3439#define MC_CMD_RXD_MONITOR_OUT_RING_LT_1_LEN 4 3440#define MC_CMD_RXD_MONITOR_OUT_RING_LT_2_OFST 16 3441#define MC_CMD_RXD_MONITOR_OUT_RING_LT_2_LEN 4 3442#define MC_CMD_RXD_MONITOR_OUT_RING_LT_4_OFST 20 3443#define MC_CMD_RXD_MONITOR_OUT_RING_LT_4_LEN 4 3444#define MC_CMD_RXD_MONITOR_OUT_RING_LT_8_OFST 24 3445#define MC_CMD_RXD_MONITOR_OUT_RING_LT_8_LEN 4 3446#define MC_CMD_RXD_MONITOR_OUT_RING_LT_16_OFST 28 3447#define MC_CMD_RXD_MONITOR_OUT_RING_LT_16_LEN 4 3448#define MC_CMD_RXD_MONITOR_OUT_RING_LT_32_OFST 32 3449#define MC_CMD_RXD_MONITOR_OUT_RING_LT_32_LEN 4 3450#define MC_CMD_RXD_MONITOR_OUT_RING_LT_64_OFST 36 3451#define MC_CMD_RXD_MONITOR_OUT_RING_LT_64_LEN 4 3452#define MC_CMD_RXD_MONITOR_OUT_RING_LT_128_OFST 40 3453#define MC_CMD_RXD_MONITOR_OUT_RING_LT_128_LEN 4 3454#define MC_CMD_RXD_MONITOR_OUT_RING_LT_256_OFST 44 3455#define MC_CMD_RXD_MONITOR_OUT_RING_LT_256_LEN 4 3456#define MC_CMD_RXD_MONITOR_OUT_RING_GE_256_OFST 48 3457#define MC_CMD_RXD_MONITOR_OUT_RING_GE_256_LEN 4 3458#define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_1_OFST 52 3459#define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_1_LEN 4 3460#define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_2_OFST 56 3461#define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_2_LEN 4 3462#define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_4_OFST 60 3463#define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_4_LEN 4 3464#define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_8_OFST 64 3465#define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_8_LEN 4 3466#define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_16_OFST 68 3467#define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_16_LEN 4 3468#define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_32_OFST 72 3469#define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_32_LEN 4 3470#define MC_CMD_RXD_MONITOR_OUT_CACHE_GE_32_OFST 76 3471#define MC_CMD_RXD_MONITOR_OUT_CACHE_GE_32_LEN 4 3472 3473 3474/***********************************/ 3475/* MC_CMD_PUTS 3476 * Copy the given ASCII string out onto UART and/or out of the network port. 3477 */ 3478#define MC_CMD_PUTS 0x23 3479#undef MC_CMD_0x23_PRIVILEGE_CTG 3480 3481#define MC_CMD_0x23_PRIVILEGE_CTG SRIOV_CTG_INSECURE 3482 3483/* MC_CMD_PUTS_IN msgrequest */ 3484#define MC_CMD_PUTS_IN_LENMIN 13 3485#define MC_CMD_PUTS_IN_LENMAX 252 3486#define MC_CMD_PUTS_IN_LENMAX_MCDI2 1020 3487#define MC_CMD_PUTS_IN_LEN(num) (12+1*(num)) 3488#define MC_CMD_PUTS_IN_STRING_NUM(len) (((len)-12)/1) 3489#define MC_CMD_PUTS_IN_DEST_OFST 0 3490#define MC_CMD_PUTS_IN_DEST_LEN 4 3491#define MC_CMD_PUTS_IN_UART_OFST 0 3492#define MC_CMD_PUTS_IN_UART_LBN 0 3493#define MC_CMD_PUTS_IN_UART_WIDTH 1 3494#define MC_CMD_PUTS_IN_PORT_OFST 0 3495#define MC_CMD_PUTS_IN_PORT_LBN 1 3496#define MC_CMD_PUTS_IN_PORT_WIDTH 1 3497#define MC_CMD_PUTS_IN_DHOST_OFST 4 3498#define MC_CMD_PUTS_IN_DHOST_LEN 6 3499#define MC_CMD_PUTS_IN_STRING_OFST 12 3500#define MC_CMD_PUTS_IN_STRING_LEN 1 3501#define MC_CMD_PUTS_IN_STRING_MINNUM 1 3502#define MC_CMD_PUTS_IN_STRING_MAXNUM 240 3503#define MC_CMD_PUTS_IN_STRING_MAXNUM_MCDI2 1008 3504 3505/* MC_CMD_PUTS_OUT msgresponse */ 3506#define MC_CMD_PUTS_OUT_LEN 0 3507 3508 3509/***********************************/ 3510/* MC_CMD_GET_PHY_CFG 3511 * Report PHY configuration. This guarantees to succeed even if the PHY is in a 3512 * 'zombie' state. Locks required: None 3513 */ 3514#define MC_CMD_GET_PHY_CFG 0x24 3515#undef MC_CMD_0x24_PRIVILEGE_CTG 3516 3517#define MC_CMD_0x24_PRIVILEGE_CTG SRIOV_CTG_GENERAL 3518 3519/* MC_CMD_GET_PHY_CFG_IN msgrequest */ 3520#define MC_CMD_GET_PHY_CFG_IN_LEN 0 3521 3522/* MC_CMD_GET_PHY_CFG_OUT msgresponse */ 3523#define MC_CMD_GET_PHY_CFG_OUT_LEN 72 3524/* flags */ 3525#define MC_CMD_GET_PHY_CFG_OUT_FLAGS_OFST 0 3526#define MC_CMD_GET_PHY_CFG_OUT_FLAGS_LEN 4 3527#define MC_CMD_GET_PHY_CFG_OUT_PRESENT_OFST 0 3528#define MC_CMD_GET_PHY_CFG_OUT_PRESENT_LBN 0 3529#define MC_CMD_GET_PHY_CFG_OUT_PRESENT_WIDTH 1 3530#define MC_CMD_GET_PHY_CFG_OUT_BIST_CABLE_SHORT_OFST 0 3531#define MC_CMD_GET_PHY_CFG_OUT_BIST_CABLE_SHORT_LBN 1 3532#define MC_CMD_GET_PHY_CFG_OUT_BIST_CABLE_SHORT_WIDTH 1 3533#define MC_CMD_GET_PHY_CFG_OUT_BIST_CABLE_LONG_OFST 0 3534#define MC_CMD_GET_PHY_CFG_OUT_BIST_CABLE_LONG_LBN 2 3535#define MC_CMD_GET_PHY_CFG_OUT_BIST_CABLE_LONG_WIDTH 1 3536#define MC_CMD_GET_PHY_CFG_OUT_LOWPOWER_OFST 0 3537#define MC_CMD_GET_PHY_CFG_OUT_LOWPOWER_LBN 3 3538#define MC_CMD_GET_PHY_CFG_OUT_LOWPOWER_WIDTH 1 3539#define MC_CMD_GET_PHY_CFG_OUT_POWEROFF_OFST 0 3540#define MC_CMD_GET_PHY_CFG_OUT_POWEROFF_LBN 4 3541#define MC_CMD_GET_PHY_CFG_OUT_POWEROFF_WIDTH 1 3542#define MC_CMD_GET_PHY_CFG_OUT_TXDIS_OFST 0 3543#define MC_CMD_GET_PHY_CFG_OUT_TXDIS_LBN 5 3544#define MC_CMD_GET_PHY_CFG_OUT_TXDIS_WIDTH 1 3545#define MC_CMD_GET_PHY_CFG_OUT_BIST_OFST 0 3546#define MC_CMD_GET_PHY_CFG_OUT_BIST_LBN 6 3547#define MC_CMD_GET_PHY_CFG_OUT_BIST_WIDTH 1 3548/* ?? */ 3549#define MC_CMD_GET_PHY_CFG_OUT_TYPE_OFST 4 3550#define MC_CMD_GET_PHY_CFG_OUT_TYPE_LEN 4 3551/* Bitmask of supported capabilities */ 3552#define MC_CMD_GET_PHY_CFG_OUT_SUPPORTED_CAP_OFST 8 3553#define MC_CMD_GET_PHY_CFG_OUT_SUPPORTED_CAP_LEN 4 3554#define MC_CMD_PHY_CAP_10HDX_OFST 8 3555#define MC_CMD_PHY_CAP_10HDX_LBN 1 3556#define MC_CMD_PHY_CAP_10HDX_WIDTH 1 3557#define MC_CMD_PHY_CAP_10FDX_OFST 8 3558#define MC_CMD_PHY_CAP_10FDX_LBN 2 3559#define MC_CMD_PHY_CAP_10FDX_WIDTH 1 3560#define MC_CMD_PHY_CAP_100HDX_OFST 8 3561#define MC_CMD_PHY_CAP_100HDX_LBN 3 3562#define MC_CMD_PHY_CAP_100HDX_WIDTH 1 3563#define MC_CMD_PHY_CAP_100FDX_OFST 8 3564#define MC_CMD_PHY_CAP_100FDX_LBN 4 3565#define MC_CMD_PHY_CAP_100FDX_WIDTH 1 3566#define MC_CMD_PHY_CAP_1000HDX_OFST 8 3567#define MC_CMD_PHY_CAP_1000HDX_LBN 5 3568#define MC_CMD_PHY_CAP_1000HDX_WIDTH 1 3569#define MC_CMD_PHY_CAP_1000FDX_OFST 8 3570#define MC_CMD_PHY_CAP_1000FDX_LBN 6 3571#define MC_CMD_PHY_CAP_1000FDX_WIDTH 1 3572#define MC_CMD_PHY_CAP_10000FDX_OFST 8 3573#define MC_CMD_PHY_CAP_10000FDX_LBN 7 3574#define MC_CMD_PHY_CAP_10000FDX_WIDTH 1 3575#define MC_CMD_PHY_CAP_PAUSE_OFST 8 3576#define MC_CMD_PHY_CAP_PAUSE_LBN 8 3577#define MC_CMD_PHY_CAP_PAUSE_WIDTH 1 3578#define MC_CMD_PHY_CAP_ASYM_OFST 8 3579#define MC_CMD_PHY_CAP_ASYM_LBN 9 3580#define MC_CMD_PHY_CAP_ASYM_WIDTH 1 3581#define MC_CMD_PHY_CAP_AN_OFST 8 3582#define MC_CMD_PHY_CAP_AN_LBN 10 3583#define MC_CMD_PHY_CAP_AN_WIDTH 1 3584#define MC_CMD_PHY_CAP_40000FDX_OFST 8 3585#define MC_CMD_PHY_CAP_40000FDX_LBN 11 3586#define MC_CMD_PHY_CAP_40000FDX_WIDTH 1 3587#define MC_CMD_PHY_CAP_DDM_OFST 8 3588#define MC_CMD_PHY_CAP_DDM_LBN 12 3589#define MC_CMD_PHY_CAP_DDM_WIDTH 1 3590#define MC_CMD_PHY_CAP_100000FDX_OFST 8 3591#define MC_CMD_PHY_CAP_100000FDX_LBN 13 3592#define MC_CMD_PHY_CAP_100000FDX_WIDTH 1 3593#define MC_CMD_PHY_CAP_25000FDX_OFST 8 3594#define MC_CMD_PHY_CAP_25000FDX_LBN 14 3595#define MC_CMD_PHY_CAP_25000FDX_WIDTH 1 3596#define MC_CMD_PHY_CAP_50000FDX_OFST 8 3597#define MC_CMD_PHY_CAP_50000FDX_LBN 15 3598#define MC_CMD_PHY_CAP_50000FDX_WIDTH 1 3599#define MC_CMD_PHY_CAP_BASER_FEC_OFST 8 3600#define MC_CMD_PHY_CAP_BASER_FEC_LBN 16 3601#define MC_CMD_PHY_CAP_BASER_FEC_WIDTH 1 3602#define MC_CMD_PHY_CAP_BASER_FEC_REQUESTED_OFST 8 3603#define MC_CMD_PHY_CAP_BASER_FEC_REQUESTED_LBN 17 3604#define MC_CMD_PHY_CAP_BASER_FEC_REQUESTED_WIDTH 1 3605#define MC_CMD_PHY_CAP_RS_FEC_OFST 8 3606#define MC_CMD_PHY_CAP_RS_FEC_LBN 18 3607#define MC_CMD_PHY_CAP_RS_FEC_WIDTH 1 3608#define MC_CMD_PHY_CAP_RS_FEC_REQUESTED_OFST 8 3609#define MC_CMD_PHY_CAP_RS_FEC_REQUESTED_LBN 19 3610#define MC_CMD_PHY_CAP_RS_FEC_REQUESTED_WIDTH 1 3611#define MC_CMD_PHY_CAP_25G_BASER_FEC_OFST 8 3612#define MC_CMD_PHY_CAP_25G_BASER_FEC_LBN 20 3613#define MC_CMD_PHY_CAP_25G_BASER_FEC_WIDTH 1 3614#define MC_CMD_PHY_CAP_25G_BASER_FEC_REQUESTED_OFST 8 3615#define MC_CMD_PHY_CAP_25G_BASER_FEC_REQUESTED_LBN 21 3616#define MC_CMD_PHY_CAP_25G_BASER_FEC_REQUESTED_WIDTH 1 3617/* ?? */ 3618#define MC_CMD_GET_PHY_CFG_OUT_CHANNEL_OFST 12 3619#define MC_CMD_GET_PHY_CFG_OUT_CHANNEL_LEN 4 3620/* ?? */ 3621#define MC_CMD_GET_PHY_CFG_OUT_PRT_OFST 16 3622#define MC_CMD_GET_PHY_CFG_OUT_PRT_LEN 4 3623/* ?? */ 3624#define MC_CMD_GET_PHY_CFG_OUT_STATS_MASK_OFST 20 3625#define MC_CMD_GET_PHY_CFG_OUT_STATS_MASK_LEN 4 3626/* ?? */ 3627#define MC_CMD_GET_PHY_CFG_OUT_NAME_OFST 24 3628#define MC_CMD_GET_PHY_CFG_OUT_NAME_LEN 20 3629/* ?? */ 3630#define MC_CMD_GET_PHY_CFG_OUT_MEDIA_TYPE_OFST 44 3631#define MC_CMD_GET_PHY_CFG_OUT_MEDIA_TYPE_LEN 4 3632/* enum: Xaui. */ 3633#define MC_CMD_MEDIA_XAUI 0x1 3634/* enum: CX4. */ 3635#define MC_CMD_MEDIA_CX4 0x2 3636/* enum: KX4. */ 3637#define MC_CMD_MEDIA_KX4 0x3 3638/* enum: XFP Far. */ 3639#define MC_CMD_MEDIA_XFP 0x4 3640/* enum: SFP+. */ 3641#define MC_CMD_MEDIA_SFP_PLUS 0x5 3642/* enum: 10GBaseT. */ 3643#define MC_CMD_MEDIA_BASE_T 0x6 3644/* enum: QSFP+. */ 3645#define MC_CMD_MEDIA_QSFP_PLUS 0x7 3646#define MC_CMD_GET_PHY_CFG_OUT_MMD_MASK_OFST 48 3647#define MC_CMD_GET_PHY_CFG_OUT_MMD_MASK_LEN 4 3648/* enum: Native clause 22 */ 3649#define MC_CMD_MMD_CLAUSE22 0x0 3650#define MC_CMD_MMD_CLAUSE45_PMAPMD 0x1 /* enum */ 3651#define MC_CMD_MMD_CLAUSE45_WIS 0x2 /* enum */ 3652#define MC_CMD_MMD_CLAUSE45_PCS 0x3 /* enum */ 3653#define MC_CMD_MMD_CLAUSE45_PHYXS 0x4 /* enum */ 3654#define MC_CMD_MMD_CLAUSE45_DTEXS 0x5 /* enum */ 3655#define MC_CMD_MMD_CLAUSE45_TC 0x6 /* enum */ 3656#define MC_CMD_MMD_CLAUSE45_AN 0x7 /* enum */ 3657/* enum: Clause22 proxied over clause45 by PHY. */ 3658#define MC_CMD_MMD_CLAUSE45_C22EXT 0x1d 3659#define MC_CMD_MMD_CLAUSE45_VEND1 0x1e /* enum */ 3660#define MC_CMD_MMD_CLAUSE45_VEND2 0x1f /* enum */ 3661#define MC_CMD_GET_PHY_CFG_OUT_REVISION_OFST 52 3662#define MC_CMD_GET_PHY_CFG_OUT_REVISION_LEN 20 3663 3664 3665/***********************************/ 3666/* MC_CMD_START_BIST 3667 * Start a BIST test on the PHY. Locks required: PHY_LOCK if doing a PHY BIST 3668 * Return code: 0, EINVAL, EACCES (if PHY_LOCK is not held) 3669 */ 3670#define MC_CMD_START_BIST 0x25 3671#undef MC_CMD_0x25_PRIVILEGE_CTG 3672 3673#define MC_CMD_0x25_PRIVILEGE_CTG SRIOV_CTG_ADMIN 3674 3675/* MC_CMD_START_BIST_IN msgrequest */ 3676#define MC_CMD_START_BIST_IN_LEN 4 3677/* Type of test. */ 3678#define MC_CMD_START_BIST_IN_TYPE_OFST 0 3679#define MC_CMD_START_BIST_IN_TYPE_LEN 4 3680/* enum: Run the PHY's short cable BIST. */ 3681#define MC_CMD_PHY_BIST_CABLE_SHORT 0x1 3682/* enum: Run the PHY's long cable BIST. */ 3683#define MC_CMD_PHY_BIST_CABLE_LONG 0x2 3684/* enum: Run BIST on the currently selected BPX Serdes (XAUI or XFI) . */ 3685#define MC_CMD_BPX_SERDES_BIST 0x3 3686/* enum: Run the MC loopback tests. */ 3687#define MC_CMD_MC_LOOPBACK_BIST 0x4 3688/* enum: Run the PHY's standard BIST. */ 3689#define MC_CMD_PHY_BIST 0x5 3690/* enum: Run MC RAM test. */ 3691#define MC_CMD_MC_MEM_BIST 0x6 3692/* enum: Run Port RAM test. */ 3693#define MC_CMD_PORT_MEM_BIST 0x7 3694/* enum: Run register test. */ 3695#define MC_CMD_REG_BIST 0x8 3696 3697/* MC_CMD_START_BIST_OUT msgresponse */ 3698#define MC_CMD_START_BIST_OUT_LEN 0 3699 3700 3701/***********************************/ 3702/* MC_CMD_POLL_BIST 3703 * Poll for BIST completion. Returns a single status code, and optionally some 3704 * PHY specific bist output. The driver should only consume the BIST output 3705 * after validating OUTLEN and MC_CMD_GET_PHY_CFG.TYPE. If a driver can't 3706 * successfully parse the BIST output, it should still respect the pass/Fail in 3707 * OUT.RESULT. Locks required: PHY_LOCK if doing a PHY BIST. Return code: 0, 3708 * EACCES (if PHY_LOCK is not held). 3709 */ 3710#define MC_CMD_POLL_BIST 0x26 3711#undef MC_CMD_0x26_PRIVILEGE_CTG 3712 3713#define MC_CMD_0x26_PRIVILEGE_CTG SRIOV_CTG_ADMIN 3714 3715/* MC_CMD_POLL_BIST_IN msgrequest */ 3716#define MC_CMD_POLL_BIST_IN_LEN 0 3717 3718/* MC_CMD_POLL_BIST_OUT msgresponse */ 3719#define MC_CMD_POLL_BIST_OUT_LEN 8 3720/* result */ 3721#define MC_CMD_POLL_BIST_OUT_RESULT_OFST 0 3722#define MC_CMD_POLL_BIST_OUT_RESULT_LEN 4 3723/* enum: Running. */ 3724#define MC_CMD_POLL_BIST_RUNNING 0x1 3725/* enum: Passed. */ 3726#define MC_CMD_POLL_BIST_PASSED 0x2 3727/* enum: Failed. */ 3728#define MC_CMD_POLL_BIST_FAILED 0x3 3729/* enum: Timed-out. */ 3730#define MC_CMD_POLL_BIST_TIMEOUT 0x4 3731#define MC_CMD_POLL_BIST_OUT_PRIVATE_OFST 4 3732#define MC_CMD_POLL_BIST_OUT_PRIVATE_LEN 4 3733 3734/* MC_CMD_POLL_BIST_OUT_SFT9001 msgresponse */ 3735#define MC_CMD_POLL_BIST_OUT_SFT9001_LEN 36 3736/* result */ 3737/* MC_CMD_POLL_BIST_OUT_RESULT_OFST 0 */ 3738/* MC_CMD_POLL_BIST_OUT_RESULT_LEN 4 */ 3739/* Enum values, see field(s): */ 3740/* MC_CMD_POLL_BIST_OUT/MC_CMD_POLL_BIST_OUT_RESULT */ 3741#define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_A_OFST 4 3742#define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_A_LEN 4 3743#define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_B_OFST 8 3744#define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_B_LEN 4 3745#define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_C_OFST 12 3746#define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_C_LEN 4 3747#define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_D_OFST 16 3748#define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_D_LEN 4 3749/* Status of each channel A */ 3750#define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_A_OFST 20 3751#define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_A_LEN 4 3752/* enum: Ok. */ 3753#define MC_CMD_POLL_BIST_SFT9001_PAIR_OK 0x1 3754/* enum: Open. */ 3755#define MC_CMD_POLL_BIST_SFT9001_PAIR_OPEN 0x2 3756/* enum: Intra-pair short. */ 3757#define MC_CMD_POLL_BIST_SFT9001_INTRA_PAIR_SHORT 0x3 3758/* enum: Inter-pair short. */ 3759#define MC_CMD_POLL_BIST_SFT9001_INTER_PAIR_SHORT 0x4 3760/* enum: Busy. */ 3761#define MC_CMD_POLL_BIST_SFT9001_PAIR_BUSY 0x9 3762/* Status of each channel B */ 3763#define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_B_OFST 24 3764#define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_B_LEN 4 3765/* Enum values, see field(s): */ 3766/* CABLE_STATUS_A */ 3767/* Status of each channel C */ 3768#define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_C_OFST 28 3769#define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_C_LEN 4 3770/* Enum values, see field(s): */ 3771/* CABLE_STATUS_A */ 3772/* Status of each channel D */ 3773#define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_D_OFST 32 3774#define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_D_LEN 4 3775/* Enum values, see field(s): */ 3776/* CABLE_STATUS_A */ 3777 3778/* MC_CMD_POLL_BIST_OUT_MRSFP msgresponse */ 3779#define MC_CMD_POLL_BIST_OUT_MRSFP_LEN 8 3780/* result */ 3781/* MC_CMD_POLL_BIST_OUT_RESULT_OFST 0 */ 3782/* MC_CMD_POLL_BIST_OUT_RESULT_LEN 4 */ 3783/* Enum values, see field(s): */ 3784/* MC_CMD_POLL_BIST_OUT/MC_CMD_POLL_BIST_OUT_RESULT */ 3785#define MC_CMD_POLL_BIST_OUT_MRSFP_TEST_OFST 4 3786#define MC_CMD_POLL_BIST_OUT_MRSFP_TEST_LEN 4 3787/* enum: Complete. */ 3788#define MC_CMD_POLL_BIST_MRSFP_TEST_COMPLETE 0x0 3789/* enum: Bus switch off I2C write. */ 3790#define MC_CMD_POLL_BIST_MRSFP_TEST_BUS_SWITCH_OFF_I2C_WRITE 0x1 3791/* enum: Bus switch off I2C no access IO exp. */ 3792#define MC_CMD_POLL_BIST_MRSFP_TEST_BUS_SWITCH_OFF_I2C_NO_ACCESS_IO_EXP 0x2 3793/* enum: Bus switch off I2C no access module. */ 3794#define MC_CMD_POLL_BIST_MRSFP_TEST_BUS_SWITCH_OFF_I2C_NO_ACCESS_MODULE 0x3 3795/* enum: IO exp I2C configure. */ 3796#define MC_CMD_POLL_BIST_MRSFP_TEST_IO_EXP_I2C_CONFIGURE 0x4 3797/* enum: Bus switch I2C no cross talk. */ 3798#define MC_CMD_POLL_BIST_MRSFP_TEST_BUS_SWITCH_I2C_NO_CROSSTALK 0x5 3799/* enum: Module presence. */ 3800#define MC_CMD_POLL_BIST_MRSFP_TEST_MODULE_PRESENCE 0x6 3801/* enum: Module ID I2C access. */ 3802#define MC_CMD_POLL_BIST_MRSFP_TEST_MODULE_ID_I2C_ACCESS 0x7 3803/* enum: Module ID sane value. */ 3804#define MC_CMD_POLL_BIST_MRSFP_TEST_MODULE_ID_SANE_VALUE 0x8 3805 3806/* MC_CMD_POLL_BIST_OUT_MEM msgresponse */ 3807#define MC_CMD_POLL_BIST_OUT_MEM_LEN 36 3808/* result */ 3809/* MC_CMD_POLL_BIST_OUT_RESULT_OFST 0 */ 3810/* MC_CMD_POLL_BIST_OUT_RESULT_LEN 4 */ 3811/* Enum values, see field(s): */ 3812/* MC_CMD_POLL_BIST_OUT/MC_CMD_POLL_BIST_OUT_RESULT */ 3813#define MC_CMD_POLL_BIST_OUT_MEM_TEST_OFST 4 3814#define MC_CMD_POLL_BIST_OUT_MEM_TEST_LEN 4 3815/* enum: Test has completed. */ 3816#define MC_CMD_POLL_BIST_MEM_COMPLETE 0x0 3817/* enum: RAM test - walk ones. */ 3818#define MC_CMD_POLL_BIST_MEM_MEM_WALK_ONES 0x1 3819/* enum: RAM test - walk zeros. */ 3820#define MC_CMD_POLL_BIST_MEM_MEM_WALK_ZEROS 0x2 3821/* enum: RAM test - walking inversions zeros/ones. */ 3822#define MC_CMD_POLL_BIST_MEM_MEM_INV_ZERO_ONE 0x3 3823/* enum: RAM test - walking inversions checkerboard. */ 3824#define MC_CMD_POLL_BIST_MEM_MEM_INV_CHKBOARD 0x4 3825/* enum: Register test - set / clear individual bits. */ 3826#define MC_CMD_POLL_BIST_MEM_REG 0x5 3827/* enum: ECC error detected. */ 3828#define MC_CMD_POLL_BIST_MEM_ECC 0x6 3829/* Failure address, only valid if result is POLL_BIST_FAILED */ 3830#define MC_CMD_POLL_BIST_OUT_MEM_ADDR_OFST 8 3831#define MC_CMD_POLL_BIST_OUT_MEM_ADDR_LEN 4 3832/* Bus or address space to which the failure address corresponds */ 3833#define MC_CMD_POLL_BIST_OUT_MEM_BUS_OFST 12 3834#define MC_CMD_POLL_BIST_OUT_MEM_BUS_LEN 4 3835/* enum: MC MIPS bus. */ 3836#define MC_CMD_POLL_BIST_MEM_BUS_MC 0x0 3837/* enum: CSR IREG bus. */ 3838#define MC_CMD_POLL_BIST_MEM_BUS_CSR 0x1 3839/* enum: RX0 DPCPU bus. */ 3840#define MC_CMD_POLL_BIST_MEM_BUS_DPCPU_RX 0x2 3841/* enum: TX0 DPCPU bus. */ 3842#define MC_CMD_POLL_BIST_MEM_BUS_DPCPU_TX0 0x3 3843/* enum: TX1 DPCPU bus. */ 3844#define MC_CMD_POLL_BIST_MEM_BUS_DPCPU_TX1 0x4 3845/* enum: RX0 DICPU bus. */ 3846#define MC_CMD_POLL_BIST_MEM_BUS_DICPU_RX 0x5 3847/* enum: TX DICPU bus. */ 3848#define MC_CMD_POLL_BIST_MEM_BUS_DICPU_TX 0x6 3849/* enum: RX1 DPCPU bus. */ 3850#define MC_CMD_POLL_BIST_MEM_BUS_DPCPU_RX1 0x7 3851/* enum: RX1 DICPU bus. */ 3852#define MC_CMD_POLL_BIST_MEM_BUS_DICPU_RX1 0x8 3853/* Pattern written to RAM / register */ 3854#define MC_CMD_POLL_BIST_OUT_MEM_EXPECT_OFST 16 3855#define MC_CMD_POLL_BIST_OUT_MEM_EXPECT_LEN 4 3856/* Actual value read from RAM / register */ 3857#define MC_CMD_POLL_BIST_OUT_MEM_ACTUAL_OFST 20 3858#define MC_CMD_POLL_BIST_OUT_MEM_ACTUAL_LEN 4 3859/* ECC error mask */ 3860#define MC_CMD_POLL_BIST_OUT_MEM_ECC_OFST 24 3861#define MC_CMD_POLL_BIST_OUT_MEM_ECC_LEN 4 3862/* ECC parity error mask */ 3863#define MC_CMD_POLL_BIST_OUT_MEM_ECC_PARITY_OFST 28 3864#define MC_CMD_POLL_BIST_OUT_MEM_ECC_PARITY_LEN 4 3865/* ECC fatal error mask */ 3866#define MC_CMD_POLL_BIST_OUT_MEM_ECC_FATAL_OFST 32 3867#define MC_CMD_POLL_BIST_OUT_MEM_ECC_FATAL_LEN 4 3868 3869 3870/***********************************/ 3871/* MC_CMD_FLUSH_RX_QUEUES 3872 * Flush receive queue(s). If SRIOV is enabled (via MC_CMD_SRIOV), then RXQ 3873 * flushes should be initiated via this MCDI operation, rather than via 3874 * directly writing FLUSH_CMD. 3875 * 3876 * The flush is completed (either done/fail) asynchronously (after this command 3877 * returns). The driver must still wait for flush done/failure events as usual. 3878 */ 3879#define MC_CMD_FLUSH_RX_QUEUES 0x27 3880 3881/* MC_CMD_FLUSH_RX_QUEUES_IN msgrequest */ 3882#define MC_CMD_FLUSH_RX_QUEUES_IN_LENMIN 4 3883#define MC_CMD_FLUSH_RX_QUEUES_IN_LENMAX 252 3884#define MC_CMD_FLUSH_RX_QUEUES_IN_LENMAX_MCDI2 1020 3885#define MC_CMD_FLUSH_RX_QUEUES_IN_LEN(num) (0+4*(num)) 3886#define MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_NUM(len) (((len)-0)/4) 3887#define MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_OFST 0 3888#define MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_LEN 4 3889#define MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_MINNUM 1 3890#define MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_MAXNUM 63 3891#define MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_MAXNUM_MCDI2 255 3892 3893/* MC_CMD_FLUSH_RX_QUEUES_OUT msgresponse */ 3894#define MC_CMD_FLUSH_RX_QUEUES_OUT_LEN 0 3895 3896 3897/***********************************/ 3898/* MC_CMD_GET_LOOPBACK_MODES 3899 * Returns a bitmask of loopback modes available at each speed. 3900 */ 3901#define MC_CMD_GET_LOOPBACK_MODES 0x28 3902#undef MC_CMD_0x28_PRIVILEGE_CTG 3903 3904#define MC_CMD_0x28_PRIVILEGE_CTG SRIOV_CTG_GENERAL 3905 3906/* MC_CMD_GET_LOOPBACK_MODES_IN msgrequest */ 3907#define MC_CMD_GET_LOOPBACK_MODES_IN_LEN 0 3908 3909/* MC_CMD_GET_LOOPBACK_MODES_OUT msgresponse */ 3910#define MC_CMD_GET_LOOPBACK_MODES_OUT_LEN 40 3911/* Supported loopbacks. */ 3912#define MC_CMD_GET_LOOPBACK_MODES_OUT_100M_OFST 0 3913#define MC_CMD_GET_LOOPBACK_MODES_OUT_100M_LEN 8 3914#define MC_CMD_GET_LOOPBACK_MODES_OUT_100M_LO_OFST 0 3915#define MC_CMD_GET_LOOPBACK_MODES_OUT_100M_HI_OFST 4 3916/* enum: None. */ 3917#define MC_CMD_LOOPBACK_NONE 0x0 3918/* enum: Data. */ 3919#define MC_CMD_LOOPBACK_DATA 0x1 3920/* enum: GMAC. */ 3921#define MC_CMD_LOOPBACK_GMAC 0x2 3922/* enum: XGMII. */ 3923#define MC_CMD_LOOPBACK_XGMII 0x3 3924/* enum: XGXS. */ 3925#define MC_CMD_LOOPBACK_XGXS 0x4 3926/* enum: XAUI. */ 3927#define MC_CMD_LOOPBACK_XAUI 0x5 3928/* enum: GMII. */ 3929#define MC_CMD_LOOPBACK_GMII 0x6 3930/* enum: SGMII. */ 3931#define MC_CMD_LOOPBACK_SGMII 0x7 3932/* enum: XGBR. */ 3933#define MC_CMD_LOOPBACK_XGBR 0x8 3934/* enum: XFI. */ 3935#define MC_CMD_LOOPBACK_XFI 0x9 3936/* enum: XAUI Far. */ 3937#define MC_CMD_LOOPBACK_XAUI_FAR 0xa 3938/* enum: GMII Far. */ 3939#define MC_CMD_LOOPBACK_GMII_FAR 0xb 3940/* enum: SGMII Far. */ 3941#define MC_CMD_LOOPBACK_SGMII_FAR 0xc 3942/* enum: XFI Far. */ 3943#define MC_CMD_LOOPBACK_XFI_FAR 0xd 3944/* enum: GPhy. */ 3945#define MC_CMD_LOOPBACK_GPHY 0xe 3946/* enum: PhyXS. */ 3947#define MC_CMD_LOOPBACK_PHYXS 0xf 3948/* enum: PCS. */ 3949#define MC_CMD_LOOPBACK_PCS 0x10 3950/* enum: PMA-PMD. */ 3951#define MC_CMD_LOOPBACK_PMAPMD 0x11 3952/* enum: Cross-Port. */ 3953#define MC_CMD_LOOPBACK_XPORT 0x12 3954/* enum: XGMII-Wireside. */ 3955#define MC_CMD_LOOPBACK_XGMII_WS 0x13 3956/* enum: XAUI Wireside. */ 3957#define MC_CMD_LOOPBACK_XAUI_WS 0x14 3958/* enum: XAUI Wireside Far. */ 3959#define MC_CMD_LOOPBACK_XAUI_WS_FAR 0x15 3960/* enum: XAUI Wireside near. */ 3961#define MC_CMD_LOOPBACK_XAUI_WS_NEAR 0x16 3962/* enum: GMII Wireside. */ 3963#define MC_CMD_LOOPBACK_GMII_WS 0x17 3964/* enum: XFI Wireside. */ 3965#define MC_CMD_LOOPBACK_XFI_WS 0x18 3966/* enum: XFI Wireside Far. */ 3967#define MC_CMD_LOOPBACK_XFI_WS_FAR 0x19 3968/* enum: PhyXS Wireside. */ 3969#define MC_CMD_LOOPBACK_PHYXS_WS 0x1a 3970/* enum: PMA lanes MAC-Serdes. */ 3971#define MC_CMD_LOOPBACK_PMA_INT 0x1b 3972/* enum: KR Serdes Parallel (Encoder). */ 3973#define MC_CMD_LOOPBACK_SD_NEAR 0x1c 3974/* enum: KR Serdes Serial. */ 3975#define MC_CMD_LOOPBACK_SD_FAR 0x1d 3976/* enum: PMA lanes MAC-Serdes Wireside. */ 3977#define MC_CMD_LOOPBACK_PMA_INT_WS 0x1e 3978/* enum: KR Serdes Parallel Wireside (Full PCS). */ 3979#define MC_CMD_LOOPBACK_SD_FEP2_WS 0x1f 3980/* enum: KR Serdes Parallel Wireside (Sym Aligner to TX). */ 3981#define MC_CMD_LOOPBACK_SD_FEP1_5_WS 0x20 3982/* enum: KR Serdes Parallel Wireside (Deserializer to Serializer). */ 3983#define MC_CMD_LOOPBACK_SD_FEP_WS 0x21 3984/* enum: KR Serdes Serial Wireside. */ 3985#define MC_CMD_LOOPBACK_SD_FES_WS 0x22 3986/* enum: Near side of AOE Siena side port */ 3987#define MC_CMD_LOOPBACK_AOE_INT_NEAR 0x23 3988/* enum: Medford Wireside datapath loopback */ 3989#define MC_CMD_LOOPBACK_DATA_WS 0x24 3990/* enum: Force link up without setting up any physical loopback (snapper use 3991 * only) 3992 */ 3993#define MC_CMD_LOOPBACK_FORCE_EXT_LINK 0x25 3994/* Supported loopbacks. */ 3995#define MC_CMD_GET_LOOPBACK_MODES_OUT_1G_OFST 8 3996#define MC_CMD_GET_LOOPBACK_MODES_OUT_1G_LEN 8 3997#define MC_CMD_GET_LOOPBACK_MODES_OUT_1G_LO_OFST 8 3998#define MC_CMD_GET_LOOPBACK_MODES_OUT_1G_HI_OFST 12 3999/* Enum values, see field(s): */ 4000/* 100M */
4001/* Supported loopbacks. */ 4002#define MC_CMD_GET_LOOPBACK_MODES_OUT_10G_OFST 16 4003#define MC_CMD_GET_LOOPBACK_MODES_OUT_10G_LEN 8 4004#define MC_CMD_GET_LOOPBACK_MODES_OUT_10G_LO_OFST 16 4005#define MC_CMD_GET_LOOPBACK_MODES_OUT_10G_HI_OFST 20 4006/* Enum values, see field(s): */ 4007/* 100M */ 4008/* Supported loopbacks. */ 4009#define MC_CMD_GET_LOOPBACK_MODES_OUT_SUGGESTED_OFST 24 4010#define MC_CMD_GET_LOOPBACK_MODES_OUT_SUGGESTED_LEN 8 4011#define MC_CMD_GET_LOOPBACK_MODES_OUT_SUGGESTED_LO_OFST 24 4012#define MC_CMD_GET_LOOPBACK_MODES_OUT_SUGGESTED_HI_OFST 28 4013/* Enum values, see field(s): */ 4014/* 100M */ 4015/* Supported loopbacks. */ 4016#define MC_CMD_GET_LOOPBACK_MODES_OUT_40G_OFST 32 4017#define MC_CMD_GET_LOOPBACK_MODES_OUT_40G_LEN 8 4018#define MC_CMD_GET_LOOPBACK_MODES_OUT_40G_LO_OFST 32 4019#define MC_CMD_GET_LOOPBACK_MODES_OUT_40G_HI_OFST 36 4020/* Enum values, see field(s): */ 4021/* 100M */ 4022 4023/* MC_CMD_GET_LOOPBACK_MODES_OUT_V2 msgresponse: Supported loopback modes for 4024 * newer NICs with 25G/50G/100G support 4025 */ 4026#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_LEN 64 4027/* Supported loopbacks. */ 4028#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_100M_OFST 0 4029#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_100M_LEN 8 4030#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_100M_LO_OFST 0 4031#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_100M_HI_OFST 4 4032/* enum: None. */ 4033/* MC_CMD_LOOPBACK_NONE 0x0 */ 4034/* enum: Data. */ 4035/* MC_CMD_LOOPBACK_DATA 0x1 */ 4036/* enum: GMAC. */ 4037/* MC_CMD_LOOPBACK_GMAC 0x2 */ 4038/* enum: XGMII. */ 4039/* MC_CMD_LOOPBACK_XGMII 0x3 */ 4040/* enum: XGXS. */ 4041/* MC_CMD_LOOPBACK_XGXS 0x4 */ 4042/* enum: XAUI. */ 4043/* MC_CMD_LOOPBACK_XAUI 0x5 */ 4044/* enum: GMII. */ 4045/* MC_CMD_LOOPBACK_GMII 0x6 */ 4046/* enum: SGMII. */ 4047/* MC_CMD_LOOPBACK_SGMII 0x7 */ 4048/* enum: XGBR. */ 4049/* MC_CMD_LOOPBACK_XGBR 0x8 */ 4050/* enum: XFI. */ 4051/* MC_CMD_LOOPBACK_XFI 0x9 */ 4052/* enum: XAUI Far. */ 4053/* MC_CMD_LOOPBACK_XAUI_FAR 0xa */ 4054/* enum: GMII Far. */ 4055/* MC_CMD_LOOPBACK_GMII_FAR 0xb */ 4056/* enum: SGMII Far. */ 4057/* MC_CMD_LOOPBACK_SGMII_FAR 0xc */ 4058/* enum: XFI Far. */ 4059/* MC_CMD_LOOPBACK_XFI_FAR 0xd */ 4060/* enum: GPhy. */ 4061/* MC_CMD_LOOPBACK_GPHY 0xe */ 4062/* enum: PhyXS. */ 4063/* MC_CMD_LOOPBACK_PHYXS 0xf */ 4064/* enum: PCS. */ 4065/* MC_CMD_LOOPBACK_PCS 0x10 */ 4066/* enum: PMA-PMD. */ 4067/* MC_CMD_LOOPBACK_PMAPMD 0x11 */ 4068/* enum: Cross-Port. */ 4069/* MC_CMD_LOOPBACK_XPORT 0x12 */ 4070/* enum: XGMII-Wireside. */ 4071/* MC_CMD_LOOPBACK_XGMII_WS 0x13 */ 4072/* enum: XAUI Wireside. */ 4073/* MC_CMD_LOOPBACK_XAUI_WS 0x14 */ 4074/* enum: XAUI Wireside Far. */ 4075/* MC_CMD_LOOPBACK_XAUI_WS_FAR 0x15 */ 4076/* enum: XAUI Wireside near. */ 4077/* MC_CMD_LOOPBACK_XAUI_WS_NEAR 0x16 */ 4078/* enum: GMII Wireside. */ 4079/* MC_CMD_LOOPBACK_GMII_WS 0x17 */ 4080/* enum: XFI Wireside. */ 4081/* MC_CMD_LOOPBACK_XFI_WS 0x18 */ 4082/* enum: XFI Wireside Far. */ 4083/* MC_CMD_LOOPBACK_XFI_WS_FAR 0x19 */ 4084/* enum: PhyXS Wireside. */ 4085/* MC_CMD_LOOPBACK_PHYXS_WS 0x1a */ 4086/* enum: PMA lanes MAC-Serdes. */ 4087/* MC_CMD_LOOPBACK_PMA_INT 0x1b */ 4088/* enum: KR Serdes Parallel (Encoder). */ 4089/* MC_CMD_LOOPBACK_SD_NEAR 0x1c */ 4090/* enum: KR Serdes Serial. */ 4091/* MC_CMD_LOOPBACK_SD_FAR 0x1d */ 4092/* enum: PMA lanes MAC-Serdes Wireside. */ 4093/* MC_CMD_LOOPBACK_PMA_INT_WS 0x1e */ 4094/* enum: KR Serdes Parallel Wireside (Full PCS). */ 4095/* MC_CMD_LOOPBACK_SD_FEP2_WS 0x1f */ 4096/* enum: KR Serdes Parallel Wireside (Sym Aligner to TX). */ 4097/* MC_CMD_LOOPBACK_SD_FEP1_5_WS 0x20 */ 4098/* enum: KR Serdes Parallel Wireside (Deserializer to Serializer). */ 4099/* MC_CMD_LOOPBACK_SD_FEP_WS 0x21 */ 4100/* enum: KR Serdes Serial Wireside. */ 4101/* MC_CMD_LOOPBACK_SD_FES_WS 0x22 */ 4102/* enum: Near side of AOE Siena side port */ 4103/* MC_CMD_LOOPBACK_AOE_INT_NEAR 0x23 */ 4104/* enum: Medford Wireside datapath loopback */ 4105/* MC_CMD_LOOPBACK_DATA_WS 0x24 */ 4106/* enum: Force link up without setting up any physical loopback (snapper use 4107 * only) 4108 */ 4109/* MC_CMD_LOOPBACK_FORCE_EXT_LINK 0x25 */ 4110/* Supported loopbacks. */ 4111#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_1G_OFST 8 4112#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_1G_LEN 8 4113#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_1G_LO_OFST 8 4114#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_1G_HI_OFST 12 4115/* Enum values, see field(s): */ 4116/* 100M */ 4117/* Supported loopbacks. */ 4118#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_10G_OFST 16 4119#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_10G_LEN 8 4120#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_10G_LO_OFST 16 4121#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_10G_HI_OFST 20 4122/* Enum values, see field(s): */ 4123/* 100M */ 4124/* Supported loopbacks. */ 4125#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_SUGGESTED_OFST 24 4126#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_SUGGESTED_LEN 8 4127#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_SUGGESTED_LO_OFST 24 4128#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_SUGGESTED_HI_OFST 28 4129/* Enum values, see field(s): */ 4130/* 100M */ 4131/* Supported loopbacks. */ 4132#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_40G_OFST 32 4133#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_40G_LEN 8 4134#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_40G_LO_OFST 32 4135#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_40G_HI_OFST 36 4136/* Enum values, see field(s): */ 4137/* 100M */ 4138/* Supported 25G loopbacks. */ 4139#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_25G_OFST 40 4140#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_25G_LEN 8 4141#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_25G_LO_OFST 40 4142#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_25G_HI_OFST 44 4143/* Enum values, see field(s): */ 4144/* 100M */ 4145/* Supported 50 loopbacks. */ 4146#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_50G_OFST 48 4147#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_50G_LEN 8 4148#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_50G_LO_OFST 48 4149#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_50G_HI_OFST 52 4150/* Enum values, see field(s): */ 4151/* 100M */ 4152/* Supported 100G loopbacks. */ 4153#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_100G_OFST 56 4154#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_100G_LEN 8 4155#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_100G_LO_OFST 56 4156#define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_100G_HI_OFST 60 4157/* Enum values, see field(s): */ 4158/* 100M */ 4159 4160/* AN_TYPE structuredef: Auto-negotiation types defined in IEEE802.3 */ 4161#define AN_TYPE_LEN 4 4162#define AN_TYPE_TYPE_OFST 0 4163#define AN_TYPE_TYPE_LEN 4 4164/* enum: None, AN disabled or not supported */ 4165#define MC_CMD_AN_NONE 0x0 4166/* enum: Clause 28 - BASE-T */ 4167#define MC_CMD_AN_CLAUSE28 0x1 4168/* enum: Clause 37 - BASE-X */ 4169#define MC_CMD_AN_CLAUSE37 0x2 4170/* enum: Clause 73 - BASE-R startup protocol for backplane and copper cable 4171 * assemblies. Includes Clause 72/Clause 92 link-training. 4172 */ 4173#define MC_CMD_AN_CLAUSE73 0x3 4174#define AN_TYPE_TYPE_LBN 0 4175#define AN_TYPE_TYPE_WIDTH 32 4176 4177/* FEC_TYPE structuredef: Forward error correction types defined in IEEE802.3 4178 */ 4179#define FEC_TYPE_LEN 4 4180#define FEC_TYPE_TYPE_OFST 0 4181#define FEC_TYPE_TYPE_LEN 4 4182/* enum: No FEC */ 4183#define MC_CMD_FEC_NONE 0x0 4184/* enum: Clause 74 BASE-R FEC (a.k.a Firecode) */ 4185#define MC_CMD_FEC_BASER 0x1 4186/* enum: Clause 91/Clause 108 Reed-Solomon FEC */ 4187#define MC_CMD_FEC_RS 0x2 4188#define FEC_TYPE_TYPE_LBN 0 4189#define FEC_TYPE_TYPE_WIDTH 32 4190 4191 4192/***********************************/ 4193/* MC_CMD_GET_LINK 4194 * Read the unified MAC/PHY link state. Locks required: None Return code: 0, 4195 * ETIME. 4196 */ 4197#define MC_CMD_GET_LINK 0x29 4198#undef MC_CMD_0x29_PRIVILEGE_CTG 4199 4200#define MC_CMD_0x29_PRIVILEGE_CTG SRIOV_CTG_GENERAL 4201 4202/* MC_CMD_GET_LINK_IN msgrequest */ 4203#define MC_CMD_GET_LINK_IN_LEN 0 4204 4205/* MC_CMD_GET_LINK_OUT msgresponse */ 4206#define MC_CMD_GET_LINK_OUT_LEN 28 4207/* Near-side advertised capabilities. Refer to 4208 * MC_CMD_GET_PHY_CFG_OUT/SUPPORTED_CAP for bit definitions. 4209 */ 4210#define MC_CMD_GET_LINK_OUT_CAP_OFST 0 4211#define MC_CMD_GET_LINK_OUT_CAP_LEN 4 4212/* Link-partner advertised capabilities. Refer to 4213 * MC_CMD_GET_PHY_CFG_OUT/SUPPORTED_CAP for bit definitions. 4214 */ 4215#define MC_CMD_GET_LINK_OUT_LP_CAP_OFST 4 4216#define MC_CMD_GET_LINK_OUT_LP_CAP_LEN 4 4217/* Autonegotiated speed in mbit/s. The link may still be down even if this 4218 * reads non-zero. 4219 */ 4220#define MC_CMD_GET_LINK_OUT_LINK_SPEED_OFST 8 4221#define MC_CMD_GET_LINK_OUT_LINK_SPEED_LEN 4 4222/* Current loopback setting. */ 4223#define MC_CMD_GET_LINK_OUT_LOOPBACK_MODE_OFST 12 4224#define MC_CMD_GET_LINK_OUT_LOOPBACK_MODE_LEN 4 4225/* Enum values, see field(s): */ 4226/* MC_CMD_GET_LOOPBACK_MODES/MC_CMD_GET_LOOPBACK_MODES_OUT/100M */ 4227#define MC_CMD_GET_LINK_OUT_FLAGS_OFST 16 4228#define MC_CMD_GET_LINK_OUT_FLAGS_LEN 4 4229#define MC_CMD_GET_LINK_OUT_LINK_UP_OFST 16 4230#define MC_CMD_GET_LINK_OUT_LINK_UP_LBN 0 4231#define MC_CMD_GET_LINK_OUT_LINK_UP_WIDTH 1 4232#define MC_CMD_GET_LINK_OUT_FULL_DUPLEX_OFST 16 4233#define MC_CMD_GET_LINK_OUT_FULL_DUPLEX_LBN 1 4234#define MC_CMD_GET_LINK_OUT_FULL_DUPLEX_WIDTH 1 4235#define MC_CMD_GET_LINK_OUT_BPX_LINK_OFST 16 4236#define MC_CMD_GET_LINK_OUT_BPX_LINK_LBN 2 4237#define MC_CMD_GET_LINK_OUT_BPX_LINK_WIDTH 1 4238#define MC_CMD_GET_LINK_OUT_PHY_LINK_OFST 16 4239#define MC_CMD_GET_LINK_OUT_PHY_LINK_LBN 3 4240#define MC_CMD_GET_LINK_OUT_PHY_LINK_WIDTH 1 4241#define MC_CMD_GET_LINK_OUT_LINK_FAULT_RX_OFST 16 4242#define MC_CMD_GET_LINK_OUT_LINK_FAULT_RX_LBN 6 4243#define MC_CMD_GET_LINK_OUT_LINK_FAULT_RX_WIDTH 1 4244#define MC_CMD_GET_LINK_OUT_LINK_FAULT_TX_OFST 16 4245#define MC_CMD_GET_LINK_OUT_LINK_FAULT_TX_LBN 7 4246#define MC_CMD_GET_LINK_OUT_LINK_FAULT_TX_WIDTH 1 4247#define MC_CMD_GET_LINK_OUT_MODULE_UP_VALID_OFST 16 4248#define MC_CMD_GET_LINK_OUT_MODULE_UP_VALID_LBN 8 4249#define MC_CMD_GET_LINK_OUT_MODULE_UP_VALID_WIDTH 1 4250#define MC_CMD_GET_LINK_OUT_MODULE_UP_OFST 16 4251#define MC_CMD_GET_LINK_OUT_MODULE_UP_LBN 9 4252#define MC_CMD_GET_LINK_OUT_MODULE_UP_WIDTH 1 4253/* This returns the negotiated flow control value. */ 4254#define MC_CMD_GET_LINK_OUT_FCNTL_OFST 20 4255#define MC_CMD_GET_LINK_OUT_FCNTL_LEN 4 4256/* Enum values, see field(s): */ 4257/* MC_CMD_SET_MAC/MC_CMD_SET_MAC_IN/FCNTL */ 4258#define MC_CMD_GET_LINK_OUT_MAC_FAULT_OFST 24 4259#define MC_CMD_GET_LINK_OUT_MAC_FAULT_LEN 4 4260#define MC_CMD_MAC_FAULT_XGMII_LOCAL_OFST 24 4261#define MC_CMD_MAC_FAULT_XGMII_LOCAL_LBN 0 4262#define MC_CMD_MAC_FAULT_XGMII_LOCAL_WIDTH 1 4263#define MC_CMD_MAC_FAULT_XGMII_REMOTE_OFST 24 4264#define MC_CMD_MAC_FAULT_XGMII_REMOTE_LBN 1 4265#define MC_CMD_MAC_FAULT_XGMII_REMOTE_WIDTH 1 4266#define MC_CMD_MAC_FAULT_SGMII_REMOTE_OFST 24 4267#define MC_CMD_MAC_FAULT_SGMII_REMOTE_LBN 2 4268#define MC_CMD_MAC_FAULT_SGMII_REMOTE_WIDTH 1 4269#define MC_CMD_MAC_FAULT_PENDING_RECONFIG_OFST 24 4270#define MC_CMD_MAC_FAULT_PENDING_RECONFIG_LBN 3 4271#define MC_CMD_MAC_FAULT_PENDING_RECONFIG_WIDTH 1 4272 4273/* MC_CMD_GET_LINK_OUT_V2 msgresponse: Extended link state information */ 4274#define MC_CMD_GET_LINK_OUT_V2_LEN 44 4275/* Near-side advertised capabilities. Refer to 4276 * MC_CMD_GET_PHY_CFG_OUT/SUPPORTED_CAP for bit definitions. 4277 */ 4278#define MC_CMD_GET_LINK_OUT_V2_CAP_OFST 0 4279#define MC_CMD_GET_LINK_OUT_V2_CAP_LEN 4 4280/* Link-partner advertised capabilities. Refer to 4281 * MC_CMD_GET_PHY_CFG_OUT/SUPPORTED_CAP for bit definitions. 4282 */ 4283#define MC_CMD_GET_LINK_OUT_V2_LP_CAP_OFST 4 4284#define MC_CMD_GET_LINK_OUT_V2_LP_CAP_LEN 4 4285/* Autonegotiated speed in