18c2ecf20Sopenharmony_ci/* bnx2x_hsi.h: Qlogic Everest network driver. 28c2ecf20Sopenharmony_ci * 38c2ecf20Sopenharmony_ci * Copyright (c) 2007-2013 Broadcom Corporation 48c2ecf20Sopenharmony_ci * Copyright (c) 2014 QLogic Corporation 58c2ecf20Sopenharmony_ci * All rights reserved 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or modify 88c2ecf20Sopenharmony_ci * it under the terms of the GNU General Public License as published by 98c2ecf20Sopenharmony_ci * the Free Software Foundation. 108c2ecf20Sopenharmony_ci */ 118c2ecf20Sopenharmony_ci#ifndef BNX2X_HSI_H 128c2ecf20Sopenharmony_ci#define BNX2X_HSI_H 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#include "bnx2x_fw_defs.h" 158c2ecf20Sopenharmony_ci#include "bnx2x_mfw_req.h" 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#define FW_ENCODE_32BIT_PATTERN 0x1e1e1e1e 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_cistruct license_key { 208c2ecf20Sopenharmony_ci u32 reserved[6]; 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci u32 max_iscsi_conn; 238c2ecf20Sopenharmony_ci#define BNX2X_MAX_ISCSI_TRGT_CONN_MASK 0xFFFF 248c2ecf20Sopenharmony_ci#define BNX2X_MAX_ISCSI_TRGT_CONN_SHIFT 0 258c2ecf20Sopenharmony_ci#define BNX2X_MAX_ISCSI_INIT_CONN_MASK 0xFFFF0000 268c2ecf20Sopenharmony_ci#define BNX2X_MAX_ISCSI_INIT_CONN_SHIFT 16 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci u32 reserved_a; 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci u32 max_fcoe_conn; 318c2ecf20Sopenharmony_ci#define BNX2X_MAX_FCOE_TRGT_CONN_MASK 0xFFFF 328c2ecf20Sopenharmony_ci#define BNX2X_MAX_FCOE_TRGT_CONN_SHIFT 0 338c2ecf20Sopenharmony_ci#define BNX2X_MAX_FCOE_INIT_CONN_MASK 0xFFFF0000 348c2ecf20Sopenharmony_ci#define BNX2X_MAX_FCOE_INIT_CONN_SHIFT 16 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci u32 reserved_b[4]; 378c2ecf20Sopenharmony_ci}; 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci/**************************************************************************** 408c2ecf20Sopenharmony_ci * Shared HW configuration * 418c2ecf20Sopenharmony_ci ****************************************************************************/ 428c2ecf20Sopenharmony_ci#define PIN_CFG_NA 0x00000000 438c2ecf20Sopenharmony_ci#define PIN_CFG_GPIO0_P0 0x00000001 448c2ecf20Sopenharmony_ci#define PIN_CFG_GPIO1_P0 0x00000002 458c2ecf20Sopenharmony_ci#define PIN_CFG_GPIO2_P0 0x00000003 468c2ecf20Sopenharmony_ci#define PIN_CFG_GPIO3_P0 0x00000004 478c2ecf20Sopenharmony_ci#define PIN_CFG_GPIO0_P1 0x00000005 488c2ecf20Sopenharmony_ci#define PIN_CFG_GPIO1_P1 0x00000006 498c2ecf20Sopenharmony_ci#define PIN_CFG_GPIO2_P1 0x00000007 508c2ecf20Sopenharmony_ci#define PIN_CFG_GPIO3_P1 0x00000008 518c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO0 0x00000009 528c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO1 0x0000000a 538c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO2 0x0000000b 548c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO3 0x0000000c 558c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO4 0x0000000d 568c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO5 0x0000000e 578c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO6 0x0000000f 588c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO7 0x00000010 598c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO8 0x00000011 608c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO9 0x00000012 618c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO10 0x00000013 628c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO11 0x00000014 638c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO12 0x00000015 648c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO13 0x00000016 658c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO14 0x00000017 668c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO15 0x00000018 678c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO16 0x00000019 688c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO17 0x0000001a 698c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO18 0x0000001b 708c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO19 0x0000001c 718c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO20 0x0000001d 728c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO21 0x0000001e 738c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO22 0x0000001f 748c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO23 0x00000020 758c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO24 0x00000021 768c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO25 0x00000022 778c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO26 0x00000023 788c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO27 0x00000024 798c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO28 0x00000025 808c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO29 0x00000026 818c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO30 0x00000027 828c2ecf20Sopenharmony_ci#define PIN_CFG_EPIO31 0x00000028 838c2ecf20Sopenharmony_ci 848c2ecf20Sopenharmony_ci/* EPIO definition */ 858c2ecf20Sopenharmony_ci#define EPIO_CFG_NA 0x00000000 868c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO0 0x00000001 878c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO1 0x00000002 888c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO2 0x00000003 898c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO3 0x00000004 908c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO4 0x00000005 918c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO5 0x00000006 928c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO6 0x00000007 938c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO7 0x00000008 948c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO8 0x00000009 958c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO9 0x0000000a 968c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO10 0x0000000b 978c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO11 0x0000000c 988c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO12 0x0000000d 998c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO13 0x0000000e 1008c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO14 0x0000000f 1018c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO15 0x00000010 1028c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO16 0x00000011 1038c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO17 0x00000012 1048c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO18 0x00000013 1058c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO19 0x00000014 1068c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO20 0x00000015 1078c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO21 0x00000016 1088c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO22 0x00000017 1098c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO23 0x00000018 1108c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO24 0x00000019 1118c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO25 0x0000001a 1128c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO26 0x0000001b 1138c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO27 0x0000001c 1148c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO28 0x0000001d 1158c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO29 0x0000001e 1168c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO30 0x0000001f 1178c2ecf20Sopenharmony_ci#define EPIO_CFG_EPIO31 0x00000020 1188c2ecf20Sopenharmony_ci 1198c2ecf20Sopenharmony_cistruct mac_addr { 1208c2ecf20Sopenharmony_ci u32 upper; 1218c2ecf20Sopenharmony_ci u32 lower; 1228c2ecf20Sopenharmony_ci}; 1238c2ecf20Sopenharmony_ci 1248c2ecf20Sopenharmony_cistruct shared_hw_cfg { /* NVRAM Offset */ 1258c2ecf20Sopenharmony_ci /* Up to 16 bytes of NULL-terminated string */ 1268c2ecf20Sopenharmony_ci u8 part_num[16]; /* 0x104 */ 1278c2ecf20Sopenharmony_ci 1288c2ecf20Sopenharmony_ci u32 config; /* 0x114 */ 1298c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MDIO_VOLTAGE_MASK 0x00000001 1308c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MDIO_VOLTAGE_SHIFT 0 1318c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MDIO_VOLTAGE_1_2V 0x00000000 1328c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MDIO_VOLTAGE_2_5V 0x00000001 1338c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MCP_RST_ON_CORE_RST_EN 0x00000002 1348c2ecf20Sopenharmony_ci 1358c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_PORT_SWAP 0x00000004 1368c2ecf20Sopenharmony_ci 1378c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_BEACON_WOL_EN 0x00000008 1388c2ecf20Sopenharmony_ci 1398c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_PCIE_GEN3_DISABLED 0x00000000 1408c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_PCIE_GEN3_ENABLED 0x00000010 1418c2ecf20Sopenharmony_ci 1428c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MFW_SELECT_MASK 0x00000700 1438c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MFW_SELECT_SHIFT 8 1448c2ecf20Sopenharmony_ci /* Whatever MFW found in NVM 1458c2ecf20Sopenharmony_ci (if multiple found, priority order is: NC-SI, UMP, IPMI) */ 1468c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MFW_SELECT_DEFAULT 0x00000000 1478c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MFW_SELECT_NC_SI 0x00000100 1488c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MFW_SELECT_UMP 0x00000200 1498c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MFW_SELECT_IPMI 0x00000300 1508c2ecf20Sopenharmony_ci /* Use SPIO4 as an arbiter between: 0-NC_SI, 1-IPMI 1518c2ecf20Sopenharmony_ci (can only be used when an add-in board, not BMC, pulls-down SPIO4) */ 1528c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MFW_SELECT_SPIO4_NC_SI_IPMI 0x00000400 1538c2ecf20Sopenharmony_ci /* Use SPIO4 as an arbiter between: 0-UMP, 1-IPMI 1548c2ecf20Sopenharmony_ci (can only be used when an add-in board, not BMC, pulls-down SPIO4) */ 1558c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MFW_SELECT_SPIO4_UMP_IPMI 0x00000500 1568c2ecf20Sopenharmony_ci /* Use SPIO4 as an arbiter between: 0-NC-SI, 1-UMP 1578c2ecf20Sopenharmony_ci (can only be used when an add-in board, not BMC, pulls-down SPIO4) */ 1588c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MFW_SELECT_SPIO4_NC_SI_UMP 0x00000600 1598c2ecf20Sopenharmony_ci 1608c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LED_MODE_MASK 0x000f0000 1618c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LED_MODE_SHIFT 16 1628c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LED_MAC1 0x00000000 1638c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LED_PHY1 0x00010000 1648c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LED_PHY2 0x00020000 1658c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LED_PHY3 0x00030000 1668c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LED_MAC2 0x00040000 1678c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LED_PHY4 0x00050000 1688c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LED_PHY5 0x00060000 1698c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LED_PHY6 0x00070000 1708c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LED_MAC3 0x00080000 1718c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LED_PHY7 0x00090000 1728c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LED_PHY9 0x000a0000 1738c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LED_PHY11 0x000b0000 1748c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LED_MAC4 0x000c0000 1758c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LED_PHY8 0x000d0000 1768c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LED_EXTPHY1 0x000e0000 1778c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LED_EXTPHY2 0x000f0000 1788c2ecf20Sopenharmony_ci 1798c2ecf20Sopenharmony_ci 1808c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_AN_ENABLE_MASK 0x3f000000 1818c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_AN_ENABLE_SHIFT 24 1828c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_AN_ENABLE_CL37 0x01000000 1838c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_AN_ENABLE_CL73 0x02000000 1848c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_AN_ENABLE_BAM 0x04000000 1858c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_AN_ENABLE_PARALLEL_DETECTION 0x08000000 1868c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_AN_EN_SGMII_FIBER_AUTO_DETECT 0x10000000 1878c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_AN_ENABLE_REMOTE_PHY 0x20000000 1888c2ecf20Sopenharmony_ci 1898c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_SRIOV_MASK 0x40000000 1908c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_SRIOV_DISABLED 0x00000000 1918c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_SRIOV_ENABLED 0x40000000 1928c2ecf20Sopenharmony_ci 1938c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_ATC_MASK 0x80000000 1948c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_ATC_DISABLED 0x00000000 1958c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_ATC_ENABLED 0x80000000 1968c2ecf20Sopenharmony_ci 1978c2ecf20Sopenharmony_ci u32 config2; /* 0x118 */ 1988c2ecf20Sopenharmony_ci /* one time auto detect grace period (in sec) */ 1998c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_GRACE_PERIOD_MASK 0x000000ff 2008c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_GRACE_PERIOD_SHIFT 0 2018c2ecf20Sopenharmony_ci 2028c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_PCIE_GEN2_ENABLED 0x00000100 2038c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_PCIE_GEN2_DISABLED 0x00000000 2048c2ecf20Sopenharmony_ci 2058c2ecf20Sopenharmony_ci /* The default value for the core clock is 250MHz and it is 2068c2ecf20Sopenharmony_ci achieved by setting the clock change to 4 */ 2078c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_CLOCK_CHANGE_MASK 0x00000e00 2088c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_CLOCK_CHANGE_SHIFT 9 2098c2ecf20Sopenharmony_ci 2108c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_SMBUS_TIMING_MASK 0x00001000 2118c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_SMBUS_TIMING_100KHZ 0x00000000 2128c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_SMBUS_TIMING_400KHZ 0x00001000 2138c2ecf20Sopenharmony_ci 2148c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_HIDE_PORT1 0x00002000 2158c2ecf20Sopenharmony_ci 2168c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_WOL_CAPABLE_MASK 0x00004000 2178c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_WOL_CAPABLE_DISABLED 0x00000000 2188c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_WOL_CAPABLE_ENABLED 0x00004000 2198c2ecf20Sopenharmony_ci 2208c2ecf20Sopenharmony_ci /* Output low when PERST is asserted */ 2218c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_SPIO4_FOLLOW_PERST_MASK 0x00008000 2228c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_SPIO4_FOLLOW_PERST_DISABLED 0x00000000 2238c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_SPIO4_FOLLOW_PERST_ENABLED 0x00008000 2248c2ecf20Sopenharmony_ci 2258c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_PCIE_GEN2_PREEMPHASIS_MASK 0x00070000 2268c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_PCIE_GEN2_PREEMPHASIS_SHIFT 16 2278c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_PCIE_GEN2_PREEMPHASIS_HW 0x00000000 2288c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_PCIE_GEN2_PREEMPHASIS_0DB 0x00010000 2298c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_PCIE_GEN2_PREEMPHASIS_3_5DB 0x00020000 2308c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_PCIE_GEN2_PREEMPHASIS_6_0DB 0x00030000 2318c2ecf20Sopenharmony_ci 2328c2ecf20Sopenharmony_ci /* The fan failure mechanism is usually related to the PHY type 2338c2ecf20Sopenharmony_ci since the power consumption of the board is determined by the PHY. 2348c2ecf20Sopenharmony_ci Currently, fan is required for most designs with SFX7101, BCM8727 2358c2ecf20Sopenharmony_ci and BCM8481. If a fan is not required for a board which uses one 2368c2ecf20Sopenharmony_ci of those PHYs, this field should be set to "Disabled". If a fan is 2378c2ecf20Sopenharmony_ci required for a different PHY type, this option should be set to 2388c2ecf20Sopenharmony_ci "Enabled". The fan failure indication is expected on SPIO5 */ 2398c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_FAN_FAILURE_MASK 0x00180000 2408c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_FAN_FAILURE_SHIFT 19 2418c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_FAN_FAILURE_PHY_TYPE 0x00000000 2428c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_FAN_FAILURE_DISABLED 0x00080000 2438c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_FAN_FAILURE_ENABLED 0x00100000 2448c2ecf20Sopenharmony_ci 2458c2ecf20Sopenharmony_ci /* ASPM Power Management support */ 2468c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_ASPM_SUPPORT_MASK 0x00600000 2478c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_ASPM_SUPPORT_SHIFT 21 2488c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_ASPM_SUPPORT_L0S_L1_ENABLED 0x00000000 2498c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_ASPM_SUPPORT_L0S_DISABLED 0x00200000 2508c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_ASPM_SUPPORT_L1_DISABLED 0x00400000 2518c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_ASPM_SUPPORT_L0S_L1_DISABLED 0x00600000 2528c2ecf20Sopenharmony_ci 2538c2ecf20Sopenharmony_ci /* The value of PM_TL_IGNORE_REQS (bit0) in PCI register 2548c2ecf20Sopenharmony_ci tl_control_0 (register 0x2800) */ 2558c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_PREVENT_L1_ENTRY_MASK 0x00800000 2568c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_PREVENT_L1_ENTRY_DISABLED 0x00000000 2578c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_PREVENT_L1_ENTRY_ENABLED 0x00800000 2588c2ecf20Sopenharmony_ci 2598c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_PORT_MODE_MASK 0x01000000 2608c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_PORT_MODE_2 0x00000000 2618c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_PORT_MODE_4 0x01000000 2628c2ecf20Sopenharmony_ci 2638c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_PATH_SWAP_MASK 0x02000000 2648c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_PATH_SWAP_DISABLED 0x00000000 2658c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_PATH_SWAP_ENABLED 0x02000000 2668c2ecf20Sopenharmony_ci 2678c2ecf20Sopenharmony_ci /* Set the MDC/MDIO access for the first external phy */ 2688c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MDC_MDIO_ACCESS1_MASK 0x1C000000 2698c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MDC_MDIO_ACCESS1_SHIFT 26 2708c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MDC_MDIO_ACCESS1_PHY_TYPE 0x00000000 2718c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MDC_MDIO_ACCESS1_EMAC0 0x04000000 2728c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MDC_MDIO_ACCESS1_EMAC1 0x08000000 2738c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MDC_MDIO_ACCESS1_BOTH 0x0c000000 2748c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MDC_MDIO_ACCESS1_SWAPPED 0x10000000 2758c2ecf20Sopenharmony_ci 2768c2ecf20Sopenharmony_ci /* Set the MDC/MDIO access for the second external phy */ 2778c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MDC_MDIO_ACCESS2_MASK 0xE0000000 2788c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MDC_MDIO_ACCESS2_SHIFT 29 2798c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MDC_MDIO_ACCESS2_PHY_TYPE 0x00000000 2808c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MDC_MDIO_ACCESS2_EMAC0 0x20000000 2818c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MDC_MDIO_ACCESS2_EMAC1 0x40000000 2828c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MDC_MDIO_ACCESS2_BOTH 0x60000000 2838c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_MDC_MDIO_ACCESS2_SWAPPED 0x80000000 2848c2ecf20Sopenharmony_ci 2858c2ecf20Sopenharmony_ci u32 config_3; /* 0x11C */ 2868c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_EXTENDED_MF_MODE_MASK 0x00000F00 2878c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_EXTENDED_MF_MODE_SHIFT 8 2888c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_EXTENDED_MF_MODE_NPAR1_DOT_5 0x00000000 2898c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_EXTENDED_MF_MODE_NPAR2_DOT_0 0x00000100 2908c2ecf20Sopenharmony_ci 2918c2ecf20Sopenharmony_ci u32 ump_nc_si_config; /* 0x120 */ 2928c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_UMP_NC_SI_MII_MODE_MASK 0x00000003 2938c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_UMP_NC_SI_MII_MODE_SHIFT 0 2948c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_UMP_NC_SI_MII_MODE_MAC 0x00000000 2958c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_UMP_NC_SI_MII_MODE_PHY 0x00000001 2968c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_UMP_NC_SI_MII_MODE_MII 0x00000000 2978c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_UMP_NC_SI_MII_MODE_RMII 0x00000002 2988c2ecf20Sopenharmony_ci 2998c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_UMP_NC_SI_NUM_DEVS_MASK 0x00000f00 3008c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_UMP_NC_SI_NUM_DEVS_SHIFT 8 3018c2ecf20Sopenharmony_ci 3028c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_UMP_NC_SI_EXT_PHY_TYPE_MASK 0x00ff0000 3038c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_UMP_NC_SI_EXT_PHY_TYPE_SHIFT 16 3048c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_UMP_NC_SI_EXT_PHY_TYPE_NONE 0x00000000 3058c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_UMP_NC_SI_EXT_PHY_TYPE_BCM5221 0x00010000 3068c2ecf20Sopenharmony_ci 3078c2ecf20Sopenharmony_ci u32 board; /* 0x124 */ 3088c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_E3_I2C_MUX0_MASK 0x0000003F 3098c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_E3_I2C_MUX0_SHIFT 0 3108c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_E3_I2C_MUX1_MASK 0x00000FC0 3118c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_E3_I2C_MUX1_SHIFT 6 3128c2ecf20Sopenharmony_ci /* Use the PIN_CFG_XXX defines on top */ 3138c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_BOARD_REV_MASK 0x00ff0000 3148c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_BOARD_REV_SHIFT 16 3158c2ecf20Sopenharmony_ci 3168c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_BOARD_MAJOR_VER_MASK 0x0f000000 3178c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_BOARD_MAJOR_VER_SHIFT 24 3188c2ecf20Sopenharmony_ci 3198c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_BOARD_MINOR_VER_MASK 0xf0000000 3208c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_BOARD_MINOR_VER_SHIFT 28 3218c2ecf20Sopenharmony_ci 3228c2ecf20Sopenharmony_ci u32 wc_lane_config; /* 0x128 */ 3238c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LANE_SWAP_CFG_MASK 0x0000FFFF 3248c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LANE_SWAP_CFG_SHIFT 0 3258c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LANE_SWAP_CFG_32103210 0x00001b1b 3268c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LANE_SWAP_CFG_32100123 0x00001be4 3278c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LANE_SWAP_CFG_01233210 0x0000e41b 3288c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LANE_SWAP_CFG_01230123 0x0000e4e4 3298c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LANE_SWAP_CFG_TX_MASK 0x000000FF 3308c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LANE_SWAP_CFG_TX_SHIFT 0 3318c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LANE_SWAP_CFG_RX_MASK 0x0000FF00 3328c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_LANE_SWAP_CFG_RX_SHIFT 8 3338c2ecf20Sopenharmony_ci 3348c2ecf20Sopenharmony_ci /* TX lane Polarity swap */ 3358c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_TX_LANE0_POL_FLIP_ENABLED 0x00010000 3368c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_TX_LANE1_POL_FLIP_ENABLED 0x00020000 3378c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_TX_LANE2_POL_FLIP_ENABLED 0x00040000 3388c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_TX_LANE3_POL_FLIP_ENABLED 0x00080000 3398c2ecf20Sopenharmony_ci /* TX lane Polarity swap */ 3408c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_RX_LANE0_POL_FLIP_ENABLED 0x00100000 3418c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_RX_LANE1_POL_FLIP_ENABLED 0x00200000 3428c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_RX_LANE2_POL_FLIP_ENABLED 0x00400000 3438c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_RX_LANE3_POL_FLIP_ENABLED 0x00800000 3448c2ecf20Sopenharmony_ci 3458c2ecf20Sopenharmony_ci /* Selects the port layout of the board */ 3468c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_E3_PORT_LAYOUT_MASK 0x0F000000 3478c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_E3_PORT_LAYOUT_SHIFT 24 3488c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_E3_PORT_LAYOUT_2P_01 0x00000000 3498c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_E3_PORT_LAYOUT_2P_10 0x01000000 3508c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_E3_PORT_LAYOUT_4P_0123 0x02000000 3518c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_E3_PORT_LAYOUT_4P_1032 0x03000000 3528c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_E3_PORT_LAYOUT_4P_2301 0x04000000 3538c2ecf20Sopenharmony_ci #define SHARED_HW_CFG_E3_PORT_LAYOUT_4P_3210 0x05000000 3548c2ecf20Sopenharmony_ci}; 3558c2ecf20Sopenharmony_ci 3568c2ecf20Sopenharmony_ci 3578c2ecf20Sopenharmony_ci/**************************************************************************** 3588c2ecf20Sopenharmony_ci * Port HW configuration * 3598c2ecf20Sopenharmony_ci ****************************************************************************/ 3608c2ecf20Sopenharmony_cistruct port_hw_cfg { /* port 0: 0x12c port 1: 0x2bc */ 3618c2ecf20Sopenharmony_ci 3628c2ecf20Sopenharmony_ci u32 pci_id; 3638c2ecf20Sopenharmony_ci #define PORT_HW_CFG_PCI_VENDOR_ID_MASK 0xffff0000 3648c2ecf20Sopenharmony_ci #define PORT_HW_CFG_PCI_DEVICE_ID_MASK 0x0000ffff 3658c2ecf20Sopenharmony_ci 3668c2ecf20Sopenharmony_ci u32 pci_sub_id; 3678c2ecf20Sopenharmony_ci #define PORT_HW_CFG_PCI_SUBSYS_DEVICE_ID_MASK 0xffff0000 3688c2ecf20Sopenharmony_ci #define PORT_HW_CFG_PCI_SUBSYS_VENDOR_ID_MASK 0x0000ffff 3698c2ecf20Sopenharmony_ci 3708c2ecf20Sopenharmony_ci u32 power_dissipated; 3718c2ecf20Sopenharmony_ci #define PORT_HW_CFG_POWER_DIS_D0_MASK 0x000000ff 3728c2ecf20Sopenharmony_ci #define PORT_HW_CFG_POWER_DIS_D0_SHIFT 0 3738c2ecf20Sopenharmony_ci #define PORT_HW_CFG_POWER_DIS_D1_MASK 0x0000ff00 3748c2ecf20Sopenharmony_ci #define PORT_HW_CFG_POWER_DIS_D1_SHIFT 8 3758c2ecf20Sopenharmony_ci #define PORT_HW_CFG_POWER_DIS_D2_MASK 0x00ff0000 3768c2ecf20Sopenharmony_ci #define PORT_HW_CFG_POWER_DIS_D2_SHIFT 16 3778c2ecf20Sopenharmony_ci #define PORT_HW_CFG_POWER_DIS_D3_MASK 0xff000000 3788c2ecf20Sopenharmony_ci #define PORT_HW_CFG_POWER_DIS_D3_SHIFT 24 3798c2ecf20Sopenharmony_ci 3808c2ecf20Sopenharmony_ci u32 power_consumed; 3818c2ecf20Sopenharmony_ci #define PORT_HW_CFG_POWER_CONS_D0_MASK 0x000000ff 3828c2ecf20Sopenharmony_ci #define PORT_HW_CFG_POWER_CONS_D0_SHIFT 0 3838c2ecf20Sopenharmony_ci #define PORT_HW_CFG_POWER_CONS_D1_MASK 0x0000ff00 3848c2ecf20Sopenharmony_ci #define PORT_HW_CFG_POWER_CONS_D1_SHIFT 8 3858c2ecf20Sopenharmony_ci #define PORT_HW_CFG_POWER_CONS_D2_MASK 0x00ff0000 3868c2ecf20Sopenharmony_ci #define PORT_HW_CFG_POWER_CONS_D2_SHIFT 16 3878c2ecf20Sopenharmony_ci #define PORT_HW_CFG_POWER_CONS_D3_MASK 0xff000000 3888c2ecf20Sopenharmony_ci #define PORT_HW_CFG_POWER_CONS_D3_SHIFT 24 3898c2ecf20Sopenharmony_ci 3908c2ecf20Sopenharmony_ci u32 mac_upper; 3918c2ecf20Sopenharmony_ci #define PORT_HW_CFG_UPPERMAC_MASK 0x0000ffff 3928c2ecf20Sopenharmony_ci #define PORT_HW_CFG_UPPERMAC_SHIFT 0 3938c2ecf20Sopenharmony_ci u32 mac_lower; 3948c2ecf20Sopenharmony_ci 3958c2ecf20Sopenharmony_ci u32 iscsi_mac_upper; /* Upper 16 bits are always zeroes */ 3968c2ecf20Sopenharmony_ci u32 iscsi_mac_lower; 3978c2ecf20Sopenharmony_ci 3988c2ecf20Sopenharmony_ci u32 rdma_mac_upper; /* Upper 16 bits are always zeroes */ 3998c2ecf20Sopenharmony_ci u32 rdma_mac_lower; 4008c2ecf20Sopenharmony_ci 4018c2ecf20Sopenharmony_ci u32 serdes_config; 4028c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SERDES_TX_DRV_PRE_EMPHASIS_MASK 0x0000ffff 4038c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SERDES_TX_DRV_PRE_EMPHASIS_SHIFT 0 4048c2ecf20Sopenharmony_ci 4058c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SERDES_RX_DRV_EQUALIZER_MASK 0xffff0000 4068c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SERDES_RX_DRV_EQUALIZER_SHIFT 16 4078c2ecf20Sopenharmony_ci 4088c2ecf20Sopenharmony_ci 4098c2ecf20Sopenharmony_ci /* Default values: 2P-64, 4P-32 */ 4108c2ecf20Sopenharmony_ci u32 pf_config; /* 0x158 */ 4118c2ecf20Sopenharmony_ci #define PORT_HW_CFG_PF_NUM_VF_MASK 0x0000007F 4128c2ecf20Sopenharmony_ci #define PORT_HW_CFG_PF_NUM_VF_SHIFT 0 4138c2ecf20Sopenharmony_ci 4148c2ecf20Sopenharmony_ci /* Default values: 17 */ 4158c2ecf20Sopenharmony_ci #define PORT_HW_CFG_PF_NUM_MSIX_VECTORS_MASK 0x00007F00 4168c2ecf20Sopenharmony_ci #define PORT_HW_CFG_PF_NUM_MSIX_VECTORS_SHIFT 8 4178c2ecf20Sopenharmony_ci 4188c2ecf20Sopenharmony_ci #define PORT_HW_CFG_ENABLE_FLR_MASK 0x00010000 4198c2ecf20Sopenharmony_ci #define PORT_HW_CFG_FLR_ENABLED 0x00010000 4208c2ecf20Sopenharmony_ci 4218c2ecf20Sopenharmony_ci u32 vf_config; /* 0x15C */ 4228c2ecf20Sopenharmony_ci #define PORT_HW_CFG_VF_NUM_MSIX_VECTORS_MASK 0x0000007F 4238c2ecf20Sopenharmony_ci #define PORT_HW_CFG_VF_NUM_MSIX_VECTORS_SHIFT 0 4248c2ecf20Sopenharmony_ci 4258c2ecf20Sopenharmony_ci #define PORT_HW_CFG_VF_PCI_DEVICE_ID_MASK 0xFFFF0000 4268c2ecf20Sopenharmony_ci #define PORT_HW_CFG_VF_PCI_DEVICE_ID_SHIFT 16 4278c2ecf20Sopenharmony_ci 4288c2ecf20Sopenharmony_ci u32 mf_pci_id; /* 0x160 */ 4298c2ecf20Sopenharmony_ci #define PORT_HW_CFG_MF_PCI_DEVICE_ID_MASK 0x0000FFFF 4308c2ecf20Sopenharmony_ci #define PORT_HW_CFG_MF_PCI_DEVICE_ID_SHIFT 0 4318c2ecf20Sopenharmony_ci 4328c2ecf20Sopenharmony_ci /* Controls the TX laser of the SFP+ module */ 4338c2ecf20Sopenharmony_ci u32 sfp_ctrl; /* 0x164 */ 4348c2ecf20Sopenharmony_ci #define PORT_HW_CFG_TX_LASER_MASK 0x000000FF 4358c2ecf20Sopenharmony_ci #define PORT_HW_CFG_TX_LASER_SHIFT 0 4368c2ecf20Sopenharmony_ci #define PORT_HW_CFG_TX_LASER_MDIO 0x00000000 4378c2ecf20Sopenharmony_ci #define PORT_HW_CFG_TX_LASER_GPIO0 0x00000001 4388c2ecf20Sopenharmony_ci #define PORT_HW_CFG_TX_LASER_GPIO1 0x00000002 4398c2ecf20Sopenharmony_ci #define PORT_HW_CFG_TX_LASER_GPIO2 0x00000003 4408c2ecf20Sopenharmony_ci #define PORT_HW_CFG_TX_LASER_GPIO3 0x00000004 4418c2ecf20Sopenharmony_ci 4428c2ecf20Sopenharmony_ci /* Controls the fault module LED of the SFP+ */ 4438c2ecf20Sopenharmony_ci #define PORT_HW_CFG_FAULT_MODULE_LED_MASK 0x0000FF00 4448c2ecf20Sopenharmony_ci #define PORT_HW_CFG_FAULT_MODULE_LED_SHIFT 8 4458c2ecf20Sopenharmony_ci #define PORT_HW_CFG_FAULT_MODULE_LED_GPIO0 0x00000000 4468c2ecf20Sopenharmony_ci #define PORT_HW_CFG_FAULT_MODULE_LED_GPIO1 0x00000100 4478c2ecf20Sopenharmony_ci #define PORT_HW_CFG_FAULT_MODULE_LED_GPIO2 0x00000200 4488c2ecf20Sopenharmony_ci #define PORT_HW_CFG_FAULT_MODULE_LED_GPIO3 0x00000300 4498c2ecf20Sopenharmony_ci #define PORT_HW_CFG_FAULT_MODULE_LED_DISABLED 0x00000400 4508c2ecf20Sopenharmony_ci 4518c2ecf20Sopenharmony_ci /* The output pin TX_DIS that controls the TX laser of the SFP+ 4528c2ecf20Sopenharmony_ci module. Use the PIN_CFG_XXX defines on top */ 4538c2ecf20Sopenharmony_ci u32 e3_sfp_ctrl; /* 0x168 */ 4548c2ecf20Sopenharmony_ci #define PORT_HW_CFG_E3_TX_LASER_MASK 0x000000FF 4558c2ecf20Sopenharmony_ci #define PORT_HW_CFG_E3_TX_LASER_SHIFT 0 4568c2ecf20Sopenharmony_ci 4578c2ecf20Sopenharmony_ci /* The output pin for SFPP_TYPE which turns on the Fault module LED */ 4588c2ecf20Sopenharmony_ci #define PORT_HW_CFG_E3_FAULT_MDL_LED_MASK 0x0000FF00 4598c2ecf20Sopenharmony_ci #define PORT_HW_CFG_E3_FAULT_MDL_LED_SHIFT 8 4608c2ecf20Sopenharmony_ci 4618c2ecf20Sopenharmony_ci /* The input pin MOD_ABS that indicates whether SFP+ module is 4628c2ecf20Sopenharmony_ci present or not. Use the PIN_CFG_XXX defines on top */ 4638c2ecf20Sopenharmony_ci #define PORT_HW_CFG_E3_MOD_ABS_MASK 0x00FF0000 4648c2ecf20Sopenharmony_ci #define PORT_HW_CFG_E3_MOD_ABS_SHIFT 16 4658c2ecf20Sopenharmony_ci 4668c2ecf20Sopenharmony_ci /* The output pin PWRDIS_SFP_X which disable the power of the SFP+ 4678c2ecf20Sopenharmony_ci module. Use the PIN_CFG_XXX defines on top */ 4688c2ecf20Sopenharmony_ci #define PORT_HW_CFG_E3_PWR_DIS_MASK 0xFF000000 4698c2ecf20Sopenharmony_ci #define PORT_HW_CFG_E3_PWR_DIS_SHIFT 24 4708c2ecf20Sopenharmony_ci 4718c2ecf20Sopenharmony_ci /* 4728c2ecf20Sopenharmony_ci * The input pin which signals module transmit fault. Use the 4738c2ecf20Sopenharmony_ci * PIN_CFG_XXX defines on top 4748c2ecf20Sopenharmony_ci */ 4758c2ecf20Sopenharmony_ci u32 e3_cmn_pin_cfg; /* 0x16C */ 4768c2ecf20Sopenharmony_ci #define PORT_HW_CFG_E3_TX_FAULT_MASK 0x000000FF 4778c2ecf20Sopenharmony_ci #define PORT_HW_CFG_E3_TX_FAULT_SHIFT 0 4788c2ecf20Sopenharmony_ci 4798c2ecf20Sopenharmony_ci /* The output pin which reset the PHY. Use the PIN_CFG_XXX defines on 4808c2ecf20Sopenharmony_ci top */ 4818c2ecf20Sopenharmony_ci #define PORT_HW_CFG_E3_PHY_RESET_MASK 0x0000FF00 4828c2ecf20Sopenharmony_ci #define PORT_HW_CFG_E3_PHY_RESET_SHIFT 8 4838c2ecf20Sopenharmony_ci 4848c2ecf20Sopenharmony_ci /* 4858c2ecf20Sopenharmony_ci * The output pin which powers down the PHY. Use the PIN_CFG_XXX 4868c2ecf20Sopenharmony_ci * defines on top 4878c2ecf20Sopenharmony_ci */ 4888c2ecf20Sopenharmony_ci #define PORT_HW_CFG_E3_PWR_DOWN_MASK 0x00FF0000 4898c2ecf20Sopenharmony_ci #define PORT_HW_CFG_E3_PWR_DOWN_SHIFT 16 4908c2ecf20Sopenharmony_ci 4918c2ecf20Sopenharmony_ci /* The output pin values BSC_SEL which selects the I2C for this port 4928c2ecf20Sopenharmony_ci in the I2C Mux */ 4938c2ecf20Sopenharmony_ci #define PORT_HW_CFG_E3_I2C_MUX0_MASK 0x01000000 4948c2ecf20Sopenharmony_ci #define PORT_HW_CFG_E3_I2C_MUX1_MASK 0x02000000 4958c2ecf20Sopenharmony_ci 4968c2ecf20Sopenharmony_ci 4978c2ecf20Sopenharmony_ci /* 4988c2ecf20Sopenharmony_ci * The input pin I_FAULT which indicate over-current has occurred. 4998c2ecf20Sopenharmony_ci * Use the PIN_CFG_XXX defines on top 5008c2ecf20Sopenharmony_ci */ 5018c2ecf20Sopenharmony_ci u32 e3_cmn_pin_cfg1; /* 0x170 */ 5028c2ecf20Sopenharmony_ci #define PORT_HW_CFG_E3_OVER_CURRENT_MASK 0x000000FF 5038c2ecf20Sopenharmony_ci #define PORT_HW_CFG_E3_OVER_CURRENT_SHIFT 0 5048c2ecf20Sopenharmony_ci 5058c2ecf20Sopenharmony_ci /* pause on host ring */ 5068c2ecf20Sopenharmony_ci u32 generic_features; /* 0x174 */ 5078c2ecf20Sopenharmony_ci #define PORT_HW_CFG_PAUSE_ON_HOST_RING_MASK 0x00000001 5088c2ecf20Sopenharmony_ci #define PORT_HW_CFG_PAUSE_ON_HOST_RING_SHIFT 0 5098c2ecf20Sopenharmony_ci #define PORT_HW_CFG_PAUSE_ON_HOST_RING_DISABLED 0x00000000 5108c2ecf20Sopenharmony_ci #define PORT_HW_CFG_PAUSE_ON_HOST_RING_ENABLED 0x00000001 5118c2ecf20Sopenharmony_ci 5128c2ecf20Sopenharmony_ci /* SFP+ Tx Equalization: NIC recommended and tested value is 0xBEB2 5138c2ecf20Sopenharmony_ci * LOM recommended and tested value is 0xBEB2. Using a different 5148c2ecf20Sopenharmony_ci * value means using a value not tested by BRCM 5158c2ecf20Sopenharmony_ci */ 5168c2ecf20Sopenharmony_ci u32 sfi_tap_values; /* 0x178 */ 5178c2ecf20Sopenharmony_ci #define PORT_HW_CFG_TX_EQUALIZATION_MASK 0x0000FFFF 5188c2ecf20Sopenharmony_ci #define PORT_HW_CFG_TX_EQUALIZATION_SHIFT 0 5198c2ecf20Sopenharmony_ci 5208c2ecf20Sopenharmony_ci /* SFP+ Tx driver broadcast IDRIVER: NIC recommended and tested 5218c2ecf20Sopenharmony_ci * value is 0x2. LOM recommended and tested value is 0x2. Using a 5228c2ecf20Sopenharmony_ci * different value means using a value not tested by BRCM 5238c2ecf20Sopenharmony_ci */ 5248c2ecf20Sopenharmony_ci #define PORT_HW_CFG_TX_DRV_BROADCAST_MASK 0x000F0000 5258c2ecf20Sopenharmony_ci #define PORT_HW_CFG_TX_DRV_BROADCAST_SHIFT 16 5268c2ecf20Sopenharmony_ci /* Set non-default values for TXFIR in SFP mode. */ 5278c2ecf20Sopenharmony_ci #define PORT_HW_CFG_TX_DRV_IFIR_MASK 0x00F00000 5288c2ecf20Sopenharmony_ci #define PORT_HW_CFG_TX_DRV_IFIR_SHIFT 20 5298c2ecf20Sopenharmony_ci 5308c2ecf20Sopenharmony_ci /* Set non-default values for IPREDRIVER in SFP mode. */ 5318c2ecf20Sopenharmony_ci #define PORT_HW_CFG_TX_DRV_IPREDRIVER_MASK 0x0F000000 5328c2ecf20Sopenharmony_ci #define PORT_HW_CFG_TX_DRV_IPREDRIVER_SHIFT 24 5338c2ecf20Sopenharmony_ci 5348c2ecf20Sopenharmony_ci /* Set non-default values for POST2 in SFP mode. */ 5358c2ecf20Sopenharmony_ci #define PORT_HW_CFG_TX_DRV_POST2_MASK 0xF0000000 5368c2ecf20Sopenharmony_ci #define PORT_HW_CFG_TX_DRV_POST2_SHIFT 28 5378c2ecf20Sopenharmony_ci 5388c2ecf20Sopenharmony_ci u32 reserved0[5]; /* 0x17c */ 5398c2ecf20Sopenharmony_ci 5408c2ecf20Sopenharmony_ci u32 aeu_int_mask; /* 0x190 */ 5418c2ecf20Sopenharmony_ci 5428c2ecf20Sopenharmony_ci u32 media_type; /* 0x194 */ 5438c2ecf20Sopenharmony_ci #define PORT_HW_CFG_MEDIA_TYPE_PHY0_MASK 0x000000FF 5448c2ecf20Sopenharmony_ci #define PORT_HW_CFG_MEDIA_TYPE_PHY0_SHIFT 0 5458c2ecf20Sopenharmony_ci 5468c2ecf20Sopenharmony_ci #define PORT_HW_CFG_MEDIA_TYPE_PHY1_MASK 0x0000FF00 5478c2ecf20Sopenharmony_ci #define PORT_HW_CFG_MEDIA_TYPE_PHY1_SHIFT 8 5488c2ecf20Sopenharmony_ci 5498c2ecf20Sopenharmony_ci #define PORT_HW_CFG_MEDIA_TYPE_PHY2_MASK 0x00FF0000 5508c2ecf20Sopenharmony_ci #define PORT_HW_CFG_MEDIA_TYPE_PHY2_SHIFT 16 5518c2ecf20Sopenharmony_ci 5528c2ecf20Sopenharmony_ci /* 4 times 16 bits for all 4 lanes. In case external PHY is present 5538c2ecf20Sopenharmony_ci (not direct mode), those values will not take effect on the 4 XGXS 5548c2ecf20Sopenharmony_ci lanes. For some external PHYs (such as 8706 and 8726) the values 5558c2ecf20Sopenharmony_ci will be used to configure the external PHY in those cases, not 5568c2ecf20Sopenharmony_ci all 4 values are needed. */ 5578c2ecf20Sopenharmony_ci u16 xgxs_config_rx[4]; /* 0x198 */ 5588c2ecf20Sopenharmony_ci u16 xgxs_config_tx[4]; /* 0x1A0 */ 5598c2ecf20Sopenharmony_ci 5608c2ecf20Sopenharmony_ci /* For storing FCOE mac on shared memory */ 5618c2ecf20Sopenharmony_ci u32 fcoe_fip_mac_upper; 5628c2ecf20Sopenharmony_ci #define PORT_HW_CFG_FCOE_UPPERMAC_MASK 0x0000ffff 5638c2ecf20Sopenharmony_ci #define PORT_HW_CFG_FCOE_UPPERMAC_SHIFT 0 5648c2ecf20Sopenharmony_ci u32 fcoe_fip_mac_lower; 5658c2ecf20Sopenharmony_ci 5668c2ecf20Sopenharmony_ci u32 fcoe_wwn_port_name_upper; 5678c2ecf20Sopenharmony_ci u32 fcoe_wwn_port_name_lower; 5688c2ecf20Sopenharmony_ci 5698c2ecf20Sopenharmony_ci u32 fcoe_wwn_node_name_upper; 5708c2ecf20Sopenharmony_ci u32 fcoe_wwn_node_name_lower; 5718c2ecf20Sopenharmony_ci 5728c2ecf20Sopenharmony_ci u32 Reserved1[49]; /* 0x1C0 */ 5738c2ecf20Sopenharmony_ci 5748c2ecf20Sopenharmony_ci /* Enable RJ45 magjack pair swapping on 10GBase-T PHY (0=default), 5758c2ecf20Sopenharmony_ci 84833 only */ 5768c2ecf20Sopenharmony_ci u32 xgbt_phy_cfg; /* 0x284 */ 5778c2ecf20Sopenharmony_ci #define PORT_HW_CFG_RJ45_PAIR_SWAP_MASK 0x000000FF 5788c2ecf20Sopenharmony_ci #define PORT_HW_CFG_RJ45_PAIR_SWAP_SHIFT 0 5798c2ecf20Sopenharmony_ci 5808c2ecf20Sopenharmony_ci u32 default_cfg; /* 0x288 */ 5818c2ecf20Sopenharmony_ci #define PORT_HW_CFG_GPIO0_CONFIG_MASK 0x00000003 5828c2ecf20Sopenharmony_ci #define PORT_HW_CFG_GPIO0_CONFIG_SHIFT 0 5838c2ecf20Sopenharmony_ci #define PORT_HW_CFG_GPIO0_CONFIG_NA 0x00000000 5848c2ecf20Sopenharmony_ci #define PORT_HW_CFG_GPIO0_CONFIG_LOW 0x00000001 5858c2ecf20Sopenharmony_ci #define PORT_HW_CFG_GPIO0_CONFIG_HIGH 0x00000002 5868c2ecf20Sopenharmony_ci #define PORT_HW_CFG_GPIO0_CONFIG_INPUT 0x00000003 5878c2ecf20Sopenharmony_ci 5888c2ecf20Sopenharmony_ci #define PORT_HW_CFG_GPIO1_CONFIG_MASK 0x0000000C 5898c2ecf20Sopenharmony_ci #define PORT_HW_CFG_GPIO1_CONFIG_SHIFT 2 5908c2ecf20Sopenharmony_ci #define PORT_HW_CFG_GPIO1_CONFIG_NA 0x00000000 5918c2ecf20Sopenharmony_ci #define PORT_HW_CFG_GPIO1_CONFIG_LOW 0x00000004 5928c2ecf20Sopenharmony_ci #define PORT_HW_CFG_GPIO1_CONFIG_HIGH 0x00000008 5938c2ecf20Sopenharmony_ci #define PORT_HW_CFG_GPIO1_CONFIG_INPUT 0x0000000c 5948c2ecf20Sopenharmony_ci 5958c2ecf20Sopenharmony_ci #define PORT_HW_CFG_GPIO2_CONFIG_MASK 0x00000030 5968c2ecf20Sopenharmony_ci #define PORT_HW_CFG_GPIO2_CONFIG_SHIFT 4 5978c2ecf20Sopenharmony_ci #define PORT_HW_CFG_GPIO2_CONFIG_NA 0x00000000 5988c2ecf20Sopenharmony_ci #define PORT_HW_CFG_GPIO2_CONFIG_LOW 0x00000010 5998c2ecf20Sopenharmony_ci #define PORT_HW_CFG_GPIO2_CONFIG_HIGH 0x00000020 6008c2ecf20Sopenharmony_ci #define PORT_HW_CFG_GPIO2_CONFIG_INPUT 0x00000030 6018c2ecf20Sopenharmony_ci 6028c2ecf20Sopenharmony_ci #define PORT_HW_CFG_GPIO3_CONFIG_MASK 0x000000C0 6038c2ecf20Sopenharmony_ci #define PORT_HW_CFG_GPIO3_CONFIG_SHIFT 6 6048c2ecf20Sopenharmony_ci #define PORT_HW_CFG_GPIO3_CONFIG_NA 0x00000000 6058c2ecf20Sopenharmony_ci #define PORT_HW_CFG_GPIO3_CONFIG_LOW 0x00000040 6068c2ecf20Sopenharmony_ci #define PORT_HW_CFG_GPIO3_CONFIG_HIGH 0x00000080 6078c2ecf20Sopenharmony_ci #define PORT_HW_CFG_GPIO3_CONFIG_INPUT 0x000000c0 6088c2ecf20Sopenharmony_ci 6098c2ecf20Sopenharmony_ci /* When KR link is required to be set to force which is not 6108c2ecf20Sopenharmony_ci KR-compliant, this parameter determine what is the trigger for it. 6118c2ecf20Sopenharmony_ci When GPIO is selected, low input will force the speed. Currently 6128c2ecf20Sopenharmony_ci default speed is 1G. In the future, it may be widen to select the 6138c2ecf20Sopenharmony_ci forced speed in with another parameter. Note when force-1G is 6148c2ecf20Sopenharmony_ci enabled, it override option 56: Link Speed option. */ 6158c2ecf20Sopenharmony_ci #define PORT_HW_CFG_FORCE_KR_ENABLER_MASK 0x00000F00 6168c2ecf20Sopenharmony_ci #define PORT_HW_CFG_FORCE_KR_ENABLER_SHIFT 8 6178c2ecf20Sopenharmony_ci #define PORT_HW_CFG_FORCE_KR_ENABLER_NOT_FORCED 0x00000000 6188c2ecf20Sopenharmony_ci #define PORT_HW_CFG_FORCE_KR_ENABLER_GPIO0_P0 0x00000100 6198c2ecf20Sopenharmony_ci #define PORT_HW_CFG_FORCE_KR_ENABLER_GPIO1_P0 0x00000200 6208c2ecf20Sopenharmony_ci #define PORT_HW_CFG_FORCE_KR_ENABLER_GPIO2_P0 0x00000300 6218c2ecf20Sopenharmony_ci #define PORT_HW_CFG_FORCE_KR_ENABLER_GPIO3_P0 0x00000400 6228c2ecf20Sopenharmony_ci #define PORT_HW_CFG_FORCE_KR_ENABLER_GPIO0_P1 0x00000500 6238c2ecf20Sopenharmony_ci #define PORT_HW_CFG_FORCE_KR_ENABLER_GPIO1_P1 0x00000600 6248c2ecf20Sopenharmony_ci #define PORT_HW_CFG_FORCE_KR_ENABLER_GPIO2_P1 0x00000700 6258c2ecf20Sopenharmony_ci #define PORT_HW_CFG_FORCE_KR_ENABLER_GPIO3_P1 0x00000800 6268c2ecf20Sopenharmony_ci #define PORT_HW_CFG_FORCE_KR_ENABLER_FORCED 0x00000900 6278c2ecf20Sopenharmony_ci /* Enable to determine with which GPIO to reset the external phy */ 6288c2ecf20Sopenharmony_ci #define PORT_HW_CFG_EXT_PHY_GPIO_RST_MASK 0x000F0000 6298c2ecf20Sopenharmony_ci #define PORT_HW_CFG_EXT_PHY_GPIO_RST_SHIFT 16 6308c2ecf20Sopenharmony_ci #define PORT_HW_CFG_EXT_PHY_GPIO_RST_PHY_TYPE 0x00000000 6318c2ecf20Sopenharmony_ci #define PORT_HW_CFG_EXT_PHY_GPIO_RST_GPIO0_P0 0x00010000 6328c2ecf20Sopenharmony_ci #define PORT_HW_CFG_EXT_PHY_GPIO_RST_GPIO1_P0 0x00020000 6338c2ecf20Sopenharmony_ci #define PORT_HW_CFG_EXT_PHY_GPIO_RST_GPIO2_P0 0x00030000 6348c2ecf20Sopenharmony_ci #define PORT_HW_CFG_EXT_PHY_GPIO_RST_GPIO3_P0 0x00040000 6358c2ecf20Sopenharmony_ci #define PORT_HW_CFG_EXT_PHY_GPIO_RST_GPIO0_P1 0x00050000 6368c2ecf20Sopenharmony_ci #define PORT_HW_CFG_EXT_PHY_GPIO_RST_GPIO1_P1 0x00060000 6378c2ecf20Sopenharmony_ci #define PORT_HW_CFG_EXT_PHY_GPIO_RST_GPIO2_P1 0x00070000 6388c2ecf20Sopenharmony_ci #define PORT_HW_CFG_EXT_PHY_GPIO_RST_GPIO3_P1 0x00080000 6398c2ecf20Sopenharmony_ci 6408c2ecf20Sopenharmony_ci /* Enable BAM on KR */ 6418c2ecf20Sopenharmony_ci #define PORT_HW_CFG_ENABLE_BAM_ON_KR_MASK 0x00100000 6428c2ecf20Sopenharmony_ci #define PORT_HW_CFG_ENABLE_BAM_ON_KR_SHIFT 20 6438c2ecf20Sopenharmony_ci #define PORT_HW_CFG_ENABLE_BAM_ON_KR_DISABLED 0x00000000 6448c2ecf20Sopenharmony_ci #define PORT_HW_CFG_ENABLE_BAM_ON_KR_ENABLED 0x00100000 6458c2ecf20Sopenharmony_ci 6468c2ecf20Sopenharmony_ci /* Enable Common Mode Sense */ 6478c2ecf20Sopenharmony_ci #define PORT_HW_CFG_ENABLE_CMS_MASK 0x00200000 6488c2ecf20Sopenharmony_ci #define PORT_HW_CFG_ENABLE_CMS_SHIFT 21 6498c2ecf20Sopenharmony_ci #define PORT_HW_CFG_ENABLE_CMS_DISABLED 0x00000000 6508c2ecf20Sopenharmony_ci #define PORT_HW_CFG_ENABLE_CMS_ENABLED 0x00200000 6518c2ecf20Sopenharmony_ci 6528c2ecf20Sopenharmony_ci /* Determine the Serdes electrical interface */ 6538c2ecf20Sopenharmony_ci #define PORT_HW_CFG_NET_SERDES_IF_MASK 0x0F000000 6548c2ecf20Sopenharmony_ci #define PORT_HW_CFG_NET_SERDES_IF_SHIFT 24 6558c2ecf20Sopenharmony_ci #define PORT_HW_CFG_NET_SERDES_IF_SGMII 0x00000000 6568c2ecf20Sopenharmony_ci #define PORT_HW_CFG_NET_SERDES_IF_XFI 0x01000000 6578c2ecf20Sopenharmony_ci #define PORT_HW_CFG_NET_SERDES_IF_SFI 0x02000000 6588c2ecf20Sopenharmony_ci #define PORT_HW_CFG_NET_SERDES_IF_KR 0x03000000 6598c2ecf20Sopenharmony_ci #define PORT_HW_CFG_NET_SERDES_IF_DXGXS 0x04000000 6608c2ecf20Sopenharmony_ci #define PORT_HW_CFG_NET_SERDES_IF_KR2 0x05000000 6618c2ecf20Sopenharmony_ci 6628c2ecf20Sopenharmony_ci 6638c2ecf20Sopenharmony_ci u32 speed_capability_mask2; /* 0x28C */ 6648c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY2_D3_MASK 0x0000FFFF 6658c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY2_D3_SHIFT 0 6668c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY2_D3_10M_FULL 0x00000001 6678c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY2_D3__ 0x00000002 6688c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY2_D3___ 0x00000004 6698c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY2_D3_100M_FULL 0x00000008 6708c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY2_D3_1G 0x00000010 6718c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY2_D3_2_DOT_5G 0x00000020 6728c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY2_D3_10G 0x00000040 6738c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY2_D3_20G 0x00000080 6748c2ecf20Sopenharmony_ci 6758c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY2_D0_MASK 0xFFFF0000 6768c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY2_D0_SHIFT 16 6778c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY2_D0_10M_FULL 0x00010000 6788c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY2_D0__ 0x00020000 6798c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY2_D0___ 0x00040000 6808c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY2_D0_100M_FULL 0x00080000 6818c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY2_D0_1G 0x00100000 6828c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY2_D0_2_DOT_5G 0x00200000 6838c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY2_D0_10G 0x00400000 6848c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY2_D0_20G 0x00800000 6858c2ecf20Sopenharmony_ci 6868c2ecf20Sopenharmony_ci 6878c2ecf20Sopenharmony_ci /* In the case where two media types (e.g. copper and fiber) are 6888c2ecf20Sopenharmony_ci present and electrically active at the same time, PHY Selection 6898c2ecf20Sopenharmony_ci will determine which of the two PHYs will be designated as the 6908c2ecf20Sopenharmony_ci Active PHY and used for a connection to the network. */ 6918c2ecf20Sopenharmony_ci u32 multi_phy_config; /* 0x290 */ 6928c2ecf20Sopenharmony_ci #define PORT_HW_CFG_PHY_SELECTION_MASK 0x00000007 6938c2ecf20Sopenharmony_ci #define PORT_HW_CFG_PHY_SELECTION_SHIFT 0 6948c2ecf20Sopenharmony_ci #define PORT_HW_CFG_PHY_SELECTION_HARDWARE_DEFAULT 0x00000000 6958c2ecf20Sopenharmony_ci #define PORT_HW_CFG_PHY_SELECTION_FIRST_PHY 0x00000001 6968c2ecf20Sopenharmony_ci #define PORT_HW_CFG_PHY_SELECTION_SECOND_PHY 0x00000002 6978c2ecf20Sopenharmony_ci #define PORT_HW_CFG_PHY_SELECTION_FIRST_PHY_PRIORITY 0x00000003 6988c2ecf20Sopenharmony_ci #define PORT_HW_CFG_PHY_SELECTION_SECOND_PHY_PRIORITY 0x00000004 6998c2ecf20Sopenharmony_ci 7008c2ecf20Sopenharmony_ci /* When enabled, all second phy nvram parameters will be swapped 7018c2ecf20Sopenharmony_ci with the first phy parameters */ 7028c2ecf20Sopenharmony_ci #define PORT_HW_CFG_PHY_SWAPPED_MASK 0x00000008 7038c2ecf20Sopenharmony_ci #define PORT_HW_CFG_PHY_SWAPPED_SHIFT 3 7048c2ecf20Sopenharmony_ci #define PORT_HW_CFG_PHY_SWAPPED_DISABLED 0x00000000 7058c2ecf20Sopenharmony_ci #define PORT_HW_CFG_PHY_SWAPPED_ENABLED 0x00000008 7068c2ecf20Sopenharmony_ci 7078c2ecf20Sopenharmony_ci 7088c2ecf20Sopenharmony_ci /* Address of the second external phy */ 7098c2ecf20Sopenharmony_ci u32 external_phy_config2; /* 0x294 */ 7108c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_ADDR_MASK 0x000000FF 7118c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_ADDR_SHIFT 0 7128c2ecf20Sopenharmony_ci 7138c2ecf20Sopenharmony_ci /* The second XGXS external PHY type */ 7148c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_MASK 0x0000FF00 7158c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_SHIFT 8 7168c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_DIRECT 0x00000000 7178c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8071 0x00000100 7188c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8072 0x00000200 7198c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8073 0x00000300 7208c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8705 0x00000400 7218c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8706 0x00000500 7228c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8726 0x00000600 7238c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8481 0x00000700 7248c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_SFX7101 0x00000800 7258c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8727 0x00000900 7268c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8727_NOC 0x00000a00 7278c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM84823 0x00000b00 7288c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM54640 0x00000c00 7298c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM84833 0x00000d00 7308c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM54618SE 0x00000e00 7318c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8722 0x00000f00 7328c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM54616 0x00001000 7338c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM84834 0x00001100 7348c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM84858 0x00001200 7358c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_FAILURE 0x0000fd00 7368c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_NOT_CONN 0x0000ff00 7378c2ecf20Sopenharmony_ci 7388c2ecf20Sopenharmony_ci 7398c2ecf20Sopenharmony_ci /* 4 times 16 bits for all 4 lanes. For some external PHYs (such as 7408c2ecf20Sopenharmony_ci 8706, 8726 and 8727) not all 4 values are needed. */ 7418c2ecf20Sopenharmony_ci u16 xgxs_config2_rx[4]; /* 0x296 */ 7428c2ecf20Sopenharmony_ci u16 xgxs_config2_tx[4]; /* 0x2A0 */ 7438c2ecf20Sopenharmony_ci 7448c2ecf20Sopenharmony_ci u32 lane_config; 7458c2ecf20Sopenharmony_ci #define PORT_HW_CFG_LANE_SWAP_CFG_MASK 0x0000ffff 7468c2ecf20Sopenharmony_ci #define PORT_HW_CFG_LANE_SWAP_CFG_SHIFT 0 7478c2ecf20Sopenharmony_ci /* AN and forced */ 7488c2ecf20Sopenharmony_ci #define PORT_HW_CFG_LANE_SWAP_CFG_01230123 0x00001b1b 7498c2ecf20Sopenharmony_ci /* forced only */ 7508c2ecf20Sopenharmony_ci #define PORT_HW_CFG_LANE_SWAP_CFG_01233210 0x00001be4 7518c2ecf20Sopenharmony_ci /* forced only */ 7528c2ecf20Sopenharmony_ci #define PORT_HW_CFG_LANE_SWAP_CFG_31203120 0x0000d8d8 7538c2ecf20Sopenharmony_ci /* forced only */ 7548c2ecf20Sopenharmony_ci #define PORT_HW_CFG_LANE_SWAP_CFG_32103210 0x0000e4e4 7558c2ecf20Sopenharmony_ci #define PORT_HW_CFG_LANE_SWAP_CFG_TX_MASK 0x000000ff 7568c2ecf20Sopenharmony_ci #define PORT_HW_CFG_LANE_SWAP_CFG_TX_SHIFT 0 7578c2ecf20Sopenharmony_ci #define PORT_HW_CFG_LANE_SWAP_CFG_RX_MASK 0x0000ff00 7588c2ecf20Sopenharmony_ci #define PORT_HW_CFG_LANE_SWAP_CFG_RX_SHIFT 8 7598c2ecf20Sopenharmony_ci #define PORT_HW_CFG_LANE_SWAP_CFG_MASTER_MASK 0x0000c000 7608c2ecf20Sopenharmony_ci #define PORT_HW_CFG_LANE_SWAP_CFG_MASTER_SHIFT 14 7618c2ecf20Sopenharmony_ci 7628c2ecf20Sopenharmony_ci /* Indicate whether to swap the external phy polarity */ 7638c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SWAP_PHY_POLARITY_MASK 0x00010000 7648c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SWAP_PHY_POLARITY_DISABLED 0x00000000 7658c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SWAP_PHY_POLARITY_ENABLED 0x00010000 7668c2ecf20Sopenharmony_ci 7678c2ecf20Sopenharmony_ci 7688c2ecf20Sopenharmony_ci u32 external_phy_config; 7698c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_ADDR_MASK 0x000000ff 7708c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_ADDR_SHIFT 0 7718c2ecf20Sopenharmony_ci 7728c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_MASK 0x0000ff00 7738c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_SHIFT 8 7748c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_DIRECT 0x00000000 7758c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8071 0x00000100 7768c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8072 0x00000200 7778c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073 0x00000300 7788c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8705 0x00000400 7798c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8706 0x00000500 7808c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8726 0x00000600 7818c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8481 0x00000700 7828c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_SFX7101 0x00000800 7838c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8727 0x00000900 7848c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8727_NOC 0x00000a00 7858c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84823 0x00000b00 7868c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM54640 0x00000c00 7878c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833 0x00000d00 7888c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM54618SE 0x00000e00 7898c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8722 0x00000f00 7908c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM54616 0x00001000 7918c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84834 0x00001100 7928c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84858 0x00001200 7938c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_DIRECT_WC 0x0000fc00 7948c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_FAILURE 0x0000fd00 7958c2ecf20Sopenharmony_ci #define PORT_HW_CFG_XGXS_EXT_PHY_TYPE_NOT_CONN 0x0000ff00 7968c2ecf20Sopenharmony_ci 7978c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SERDES_EXT_PHY_ADDR_MASK 0x00ff0000 7988c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SERDES_EXT_PHY_ADDR_SHIFT 16 7998c2ecf20Sopenharmony_ci 8008c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SERDES_EXT_PHY_TYPE_MASK 0xff000000 8018c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SERDES_EXT_PHY_TYPE_SHIFT 24 8028c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SERDES_EXT_PHY_TYPE_DIRECT 0x00000000 8038c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SERDES_EXT_PHY_TYPE_BCM5482 0x01000000 8048c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SERDES_EXT_PHY_TYPE_DIRECT_SD 0x02000000 8058c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SERDES_EXT_PHY_TYPE_NOT_CONN 0xff000000 8068c2ecf20Sopenharmony_ci 8078c2ecf20Sopenharmony_ci u32 speed_capability_mask; 8088c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY_D3_MASK 0x0000ffff 8098c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY_D3_SHIFT 0 8108c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY_D3_10M_FULL 0x00000001 8118c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY_D3_10M_HALF 0x00000002 8128c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY_D3_100M_HALF 0x00000004 8138c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY_D3_100M_FULL 0x00000008 8148c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY_D3_1G 0x00000010 8158c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY_D3_2_5G 0x00000020 8168c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY_D3_10G 0x00000040 8178c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY_D3_20G 0x00000080 8188c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY_D3_RESERVED 0x0000f000 8198c2ecf20Sopenharmony_ci 8208c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY_D0_MASK 0xffff0000 8218c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY_D0_SHIFT 16 8228c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY_D0_10M_FULL 0x00010000 8238c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY_D0_10M_HALF 0x00020000 8248c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY_D0_100M_HALF 0x00040000 8258c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY_D0_100M_FULL 0x00080000 8268c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY_D0_1G 0x00100000 8278c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY_D0_2_5G 0x00200000 8288c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY_D0_10G 0x00400000 8298c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY_D0_20G 0x00800000 8308c2ecf20Sopenharmony_ci #define PORT_HW_CFG_SPEED_CAPABILITY_D0_RESERVED 0xf0000000 8318c2ecf20Sopenharmony_ci 8328c2ecf20Sopenharmony_ci /* A place to hold the original MAC address as a backup */ 8338c2ecf20Sopenharmony_ci u32 backup_mac_upper; /* 0x2B4 */ 8348c2ecf20Sopenharmony_ci u32 backup_mac_lower; /* 0x2B8 */ 8358c2ecf20Sopenharmony_ci 8368c2ecf20Sopenharmony_ci}; 8378c2ecf20Sopenharmony_ci 8388c2ecf20Sopenharmony_ci 8398c2ecf20Sopenharmony_ci/**************************************************************************** 8408c2ecf20Sopenharmony_ci * Shared Feature configuration * 8418c2ecf20Sopenharmony_ci ****************************************************************************/ 8428c2ecf20Sopenharmony_cistruct shared_feat_cfg { /* NVRAM Offset */ 8438c2ecf20Sopenharmony_ci 8448c2ecf20Sopenharmony_ci u32 config; /* 0x450 */ 8458c2ecf20Sopenharmony_ci #define SHARED_FEATURE_BMC_ECHO_MODE_EN 0x00000001 8468c2ecf20Sopenharmony_ci 8478c2ecf20Sopenharmony_ci /* Use NVRAM values instead of HW default values */ 8488c2ecf20Sopenharmony_ci #define SHARED_FEAT_CFG_OVERRIDE_PREEMPHASIS_CFG_MASK \ 8498c2ecf20Sopenharmony_ci 0x00000002 8508c2ecf20Sopenharmony_ci #define SHARED_FEAT_CFG_OVERRIDE_PREEMPHASIS_CFG_DISABLED \ 8518c2ecf20Sopenharmony_ci 0x00000000 8528c2ecf20Sopenharmony_ci #define SHARED_FEAT_CFG_OVERRIDE_PREEMPHASIS_CFG_ENABLED \ 8538c2ecf20Sopenharmony_ci 0x00000002 8548c2ecf20Sopenharmony_ci 8558c2ecf20Sopenharmony_ci #define SHARED_FEAT_CFG_NCSI_ID_METHOD_MASK 0x00000008 8568c2ecf20Sopenharmony_ci #define SHARED_FEAT_CFG_NCSI_ID_METHOD_SPIO 0x00000000 8578c2ecf20Sopenharmony_ci #define SHARED_FEAT_CFG_NCSI_ID_METHOD_NVRAM 0x00000008 8588c2ecf20Sopenharmony_ci 8598c2ecf20Sopenharmony_ci #define SHARED_FEAT_CFG_NCSI_ID_MASK 0x00000030 8608c2ecf20Sopenharmony_ci #define SHARED_FEAT_CFG_NCSI_ID_SHIFT 4 8618c2ecf20Sopenharmony_ci 8628c2ecf20Sopenharmony_ci /* Override the OTP back to single function mode. When using GPIO, 8638c2ecf20Sopenharmony_ci high means only SF, 0 is according to CLP configuration */ 8648c2ecf20Sopenharmony_ci #define SHARED_FEAT_CFG_FORCE_SF_MODE_MASK 0x00000700 8658c2ecf20Sopenharmony_ci #define SHARED_FEAT_CFG_FORCE_SF_MODE_SHIFT 8 8668c2ecf20Sopenharmony_ci #define SHARED_FEAT_CFG_FORCE_SF_MODE_MF_ALLOWED 0x00000000 8678c2ecf20Sopenharmony_ci #define SHARED_FEAT_CFG_FORCE_SF_MODE_FORCED_SF 0x00000100 8688c2ecf20Sopenharmony_ci #define SHARED_FEAT_CFG_FORCE_SF_MODE_SPIO4 0x00000200 8698c2ecf20Sopenharmony_ci #define SHARED_FEAT_CFG_FORCE_SF_MODE_SWITCH_INDEPT 0x00000300 8708c2ecf20Sopenharmony_ci #define SHARED_FEAT_CFG_FORCE_SF_MODE_AFEX_MODE 0x00000400 8718c2ecf20Sopenharmony_ci #define SHARED_FEAT_CFG_FORCE_SF_MODE_BD_MODE 0x00000500 8728c2ecf20Sopenharmony_ci #define SHARED_FEAT_CFG_FORCE_SF_MODE_UFP_MODE 0x00000600 8738c2ecf20Sopenharmony_ci #define SHARED_FEAT_CFG_FORCE_SF_MODE_EXTENDED_MODE 0x00000700 8748c2ecf20Sopenharmony_ci 8758c2ecf20Sopenharmony_ci /* The interval in seconds between sending LLDP packets. Set to zero 8768c2ecf20Sopenharmony_ci to disable the feature */ 8778c2ecf20Sopenharmony_ci #define SHARED_FEAT_CFG_LLDP_XMIT_INTERVAL_MASK 0x00ff0000 8788c2ecf20Sopenharmony_ci #define SHARED_FEAT_CFG_LLDP_XMIT_INTERVAL_SHIFT 16 8798c2ecf20Sopenharmony_ci 8808c2ecf20Sopenharmony_ci /* The assigned device type ID for LLDP usage */ 8818c2ecf20Sopenharmony_ci #define SHARED_FEAT_CFG_LLDP_DEVICE_TYPE_ID_MASK 0xff000000 8828c2ecf20Sopenharmony_ci #define SHARED_FEAT_CFG_LLDP_DEVICE_TYPE_ID_SHIFT 24 8838c2ecf20Sopenharmony_ci 8848c2ecf20Sopenharmony_ci}; 8858c2ecf20Sopenharmony_ci 8868c2ecf20Sopenharmony_ci 8878c2ecf20Sopenharmony_ci/**************************************************************************** 8888c2ecf20Sopenharmony_ci * Port Feature configuration * 8898c2ecf20Sopenharmony_ci ****************************************************************************/ 8908c2ecf20Sopenharmony_cistruct port_feat_cfg { /* port 0: 0x454 port 1: 0x4c8 */ 8918c2ecf20Sopenharmony_ci 8928c2ecf20Sopenharmony_ci u32 config; 8938c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR1_SIZE_MASK 0x0000000f 8948c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR1_SIZE_SHIFT 0 8958c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR1_SIZE_DISABLED 0x00000000 8968c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR1_SIZE_64K 0x00000001 8978c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR1_SIZE_128K 0x00000002 8988c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR1_SIZE_256K 0x00000003 8998c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR1_SIZE_512K 0x00000004 9008c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR1_SIZE_1M 0x00000005 9018c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR1_SIZE_2M 0x00000006 9028c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR1_SIZE_4M 0x00000007 9038c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR1_SIZE_8M 0x00000008 9048c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR1_SIZE_16M 0x00000009 9058c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR1_SIZE_32M 0x0000000a 9068c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR1_SIZE_64M 0x0000000b 9078c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR1_SIZE_128M 0x0000000c 9088c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR1_SIZE_256M 0x0000000d 9098c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR1_SIZE_512M 0x0000000e 9108c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR1_SIZE_1G 0x0000000f 9118c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR2_SIZE_MASK 0x000000f0 9128c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR2_SIZE_SHIFT 4 9138c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR2_SIZE_DISABLED 0x00000000 9148c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR2_SIZE_64K 0x00000010 9158c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR2_SIZE_128K 0x00000020 9168c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR2_SIZE_256K 0x00000030 9178c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR2_SIZE_512K 0x00000040 9188c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR2_SIZE_1M 0x00000050 9198c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR2_SIZE_2M 0x00000060 9208c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR2_SIZE_4M 0x00000070 9218c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR2_SIZE_8M 0x00000080 9228c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR2_SIZE_16M 0x00000090 9238c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR2_SIZE_32M 0x000000a0 9248c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR2_SIZE_64M 0x000000b0 9258c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR2_SIZE_128M 0x000000c0 9268c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR2_SIZE_256M 0x000000d0 9278c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR2_SIZE_512M 0x000000e0 9288c2ecf20Sopenharmony_ci #define PORT_FEATURE_BAR2_SIZE_1G 0x000000f0 9298c2ecf20Sopenharmony_ci 9308c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_DCBX_MASK 0x00000100 9318c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_DCBX_DISABLED 0x00000000 9328c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_DCBX_ENABLED 0x00000100 9338c2ecf20Sopenharmony_ci 9348c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_STORAGE_PERSONALITY_MASK 0x00000C00 9358c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_STORAGE_PERSONALITY_FCOE 0x00000400 9368c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_STORAGE_PERSONALITY_ISCSI 0x00000800 9378c2ecf20Sopenharmony_ci 9388c2ecf20Sopenharmony_ci #define PORT_FEATURE_EN_SIZE_MASK 0x0f000000 9398c2ecf20Sopenharmony_ci #define PORT_FEATURE_EN_SIZE_SHIFT 24 9408c2ecf20Sopenharmony_ci #define PORT_FEATURE_WOL_ENABLED 0x01000000 9418c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_ENABLED 0x02000000 9428c2ecf20Sopenharmony_ci #define PORT_FEATURE_MFW_ENABLED 0x04000000 9438c2ecf20Sopenharmony_ci 9448c2ecf20Sopenharmony_ci /* Advertise expansion ROM even if MBA is disabled */ 9458c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_FORCE_EXP_ROM_ADV_MASK 0x08000000 9468c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_FORCE_EXP_ROM_ADV_DISABLED 0x00000000 9478c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_FORCE_EXP_ROM_ADV_ENABLED 0x08000000 9488c2ecf20Sopenharmony_ci 9498c2ecf20Sopenharmony_ci /* Check the optic vendor via i2c against a list of approved modules 9508c2ecf20Sopenharmony_ci in a separate nvram image */ 9518c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_OPT_MDL_ENFRCMNT_MASK 0xe0000000 9528c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_OPT_MDL_ENFRCMNT_SHIFT 29 9538c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_OPT_MDL_ENFRCMNT_NO_ENFORCEMENT \ 9548c2ecf20Sopenharmony_ci 0x00000000 9558c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_OPT_MDL_ENFRCMNT_DISABLE_TX_LASER \ 9568c2ecf20Sopenharmony_ci 0x20000000 9578c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_OPT_MDL_ENFRCMNT_WARNING_MSG 0x40000000 9588c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_OPT_MDL_ENFRCMNT_POWER_DOWN 0x60000000 9598c2ecf20Sopenharmony_ci 9608c2ecf20Sopenharmony_ci u32 wol_config; 9618c2ecf20Sopenharmony_ci /* Default is used when driver sets to "auto" mode */ 9628c2ecf20Sopenharmony_ci #define PORT_FEATURE_WOL_DEFAULT_MASK 0x00000003 9638c2ecf20Sopenharmony_ci #define PORT_FEATURE_WOL_DEFAULT_SHIFT 0 9648c2ecf20Sopenharmony_ci #define PORT_FEATURE_WOL_DEFAULT_DISABLE 0x00000000 9658c2ecf20Sopenharmony_ci #define PORT_FEATURE_WOL_DEFAULT_MAGIC 0x00000001 9668c2ecf20Sopenharmony_ci #define PORT_FEATURE_WOL_DEFAULT_ACPI 0x00000002 9678c2ecf20Sopenharmony_ci #define PORT_FEATURE_WOL_DEFAULT_MAGIC_AND_ACPI 0x00000003 9688c2ecf20Sopenharmony_ci #define PORT_FEATURE_WOL_RES_PAUSE_CAP 0x00000004 9698c2ecf20Sopenharmony_ci #define PORT_FEATURE_WOL_RES_ASYM_PAUSE_CAP 0x00000008 9708c2ecf20Sopenharmony_ci #define PORT_FEATURE_WOL_ACPI_UPON_MGMT 0x00000010 9718c2ecf20Sopenharmony_ci 9728c2ecf20Sopenharmony_ci u32 mba_config; 9738c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_BOOT_AGENT_TYPE_MASK 0x00000007 9748c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_BOOT_AGENT_TYPE_SHIFT 0 9758c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_BOOT_AGENT_TYPE_PXE 0x00000000 9768c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_BOOT_AGENT_TYPE_RPL 0x00000001 9778c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_BOOT_AGENT_TYPE_BOOTP 0x00000002 9788c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_BOOT_AGENT_TYPE_ISCSIB 0x00000003 9798c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_BOOT_AGENT_TYPE_FCOE_BOOT 0x00000004 9808c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_BOOT_AGENT_TYPE_NONE 0x00000007 9818c2ecf20Sopenharmony_ci 9828c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_BOOT_RETRY_MASK 0x00000038 9838c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_BOOT_RETRY_SHIFT 3 9848c2ecf20Sopenharmony_ci 9858c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_RES_PAUSE_CAP 0x00000100 9868c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_RES_ASYM_PAUSE_CAP 0x00000200 9878c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_SETUP_PROMPT_ENABLE 0x00000400 9888c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_HOTKEY_MASK 0x00000800 9898c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_HOTKEY_CTRL_S 0x00000000 9908c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_HOTKEY_CTRL_B 0x00000800 9918c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_EXP_ROM_SIZE_MASK 0x000ff000 9928c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_EXP_ROM_SIZE_SHIFT 12 9938c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_EXP_ROM_SIZE_DISABLED 0x00000000 9948c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_EXP_ROM_SIZE_2K 0x00001000 9958c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_EXP_ROM_SIZE_4K 0x00002000 9968c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_EXP_ROM_SIZE_8K 0x00003000 9978c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_EXP_ROM_SIZE_16K 0x00004000 9988c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_EXP_ROM_SIZE_32K 0x00005000 9998c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_EXP_ROM_SIZE_64K 0x00006000 10008c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_EXP_ROM_SIZE_128K 0x00007000 10018c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_EXP_ROM_SIZE_256K 0x00008000 10028c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_EXP_ROM_SIZE_512K 0x00009000 10038c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_EXP_ROM_SIZE_1M 0x0000a000 10048c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_EXP_ROM_SIZE_2M 0x0000b000 10058c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_EXP_ROM_SIZE_4M 0x0000c000 10068c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_EXP_ROM_SIZE_8M 0x0000d000 10078c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_EXP_ROM_SIZE_16M 0x0000e000 10088c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_EXP_ROM_SIZE_32M 0x0000f000 10098c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_MSG_TIMEOUT_MASK 0x00f00000 10108c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_MSG_TIMEOUT_SHIFT 20 10118c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_BIOS_BOOTSTRAP_MASK 0x03000000 10128c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_BIOS_BOOTSTRAP_SHIFT 24 10138c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_BIOS_BOOTSTRAP_AUTO 0x00000000 10148c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_BIOS_BOOTSTRAP_BBS 0x01000000 10158c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_BIOS_BOOTSTRAP_INT18H 0x02000000 10168c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_BIOS_BOOTSTRAP_INT19H 0x03000000 10178c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_LINK_SPEED_MASK 0x3c000000 10188c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_LINK_SPEED_SHIFT 26 10198c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_LINK_SPEED_AUTO 0x00000000 10208c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_LINK_SPEED_10HD 0x04000000 10218c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_LINK_SPEED_10FD 0x08000000 10228c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_LINK_SPEED_100HD 0x0c000000 10238c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_LINK_SPEED_100FD 0x10000000 10248c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_LINK_SPEED_1GBPS 0x14000000 10258c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_LINK_SPEED_2_5GBPS 0x18000000 10268c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_LINK_SPEED_10GBPS_CX4 0x1c000000 10278c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_LINK_SPEED_20GBPS 0x20000000 10288c2ecf20Sopenharmony_ci u32 bmc_config; 10298c2ecf20Sopenharmony_ci #define PORT_FEATURE_BMC_LINK_OVERRIDE_MASK 0x00000001 10308c2ecf20Sopenharmony_ci #define PORT_FEATURE_BMC_LINK_OVERRIDE_DEFAULT 0x00000000 10318c2ecf20Sopenharmony_ci #define PORT_FEATURE_BMC_LINK_OVERRIDE_EN 0x00000001 10328c2ecf20Sopenharmony_ci 10338c2ecf20Sopenharmony_ci u32 mba_vlan_cfg; 10348c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_VLAN_TAG_MASK 0x0000ffff 10358c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_VLAN_TAG_SHIFT 0 10368c2ecf20Sopenharmony_ci #define PORT_FEATURE_MBA_VLAN_EN 0x00010000 10378c2ecf20Sopenharmony_ci 10388c2ecf20Sopenharmony_ci u32 resource_cfg; 10398c2ecf20Sopenharmony_ci #define PORT_FEATURE_RESOURCE_CFG_VALID 0x00000001 10408c2ecf20Sopenharmony_ci #define PORT_FEATURE_RESOURCE_CFG_DIAG 0x00000002 10418c2ecf20Sopenharmony_ci #define PORT_FEATURE_RESOURCE_CFG_L2 0x00000004 10428c2ecf20Sopenharmony_ci #define PORT_FEATURE_RESOURCE_CFG_ISCSI 0x00000008 10438c2ecf20Sopenharmony_ci #define PORT_FEATURE_RESOURCE_CFG_RDMA 0x00000010 10448c2ecf20Sopenharmony_ci 10458c2ecf20Sopenharmony_ci u32 smbus_config; 10468c2ecf20Sopenharmony_ci #define PORT_FEATURE_SMBUS_ADDR_MASK 0x000000fe 10478c2ecf20Sopenharmony_ci #define PORT_FEATURE_SMBUS_ADDR_SHIFT 1 10488c2ecf20Sopenharmony_ci 10498c2ecf20Sopenharmony_ci u32 vf_config; 10508c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_VF_BAR2_SIZE_MASK 0x0000000f 10518c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_VF_BAR2_SIZE_SHIFT 0 10528c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_VF_BAR2_SIZE_DISABLED 0x00000000 10538c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_VF_BAR2_SIZE_4K 0x00000001 10548c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_VF_BAR2_SIZE_8K 0x00000002 10558c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_VF_BAR2_SIZE_16K 0x00000003 10568c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_VF_BAR2_SIZE_32K 0x00000004 10578c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_VF_BAR2_SIZE_64K 0x00000005 10588c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_VF_BAR2_SIZE_128K 0x00000006 10598c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_VF_BAR2_SIZE_256K 0x00000007 10608c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_VF_BAR2_SIZE_512K 0x00000008 10618c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_VF_BAR2_SIZE_1M 0x00000009 10628c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_VF_BAR2_SIZE_2M 0x0000000a 10638c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_VF_BAR2_SIZE_4M 0x0000000b 10648c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_VF_BAR2_SIZE_8M 0x0000000c 10658c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_VF_BAR2_SIZE_16M 0x0000000d 10668c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_VF_BAR2_SIZE_32M 0x0000000e 10678c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_VF_BAR2_SIZE_64M 0x0000000f 10688c2ecf20Sopenharmony_ci 10698c2ecf20Sopenharmony_ci u32 link_config; /* Used as HW defaults for the driver */ 10708c2ecf20Sopenharmony_ci #define PORT_FEATURE_CONNECTED_SWITCH_MASK 0x03000000 10718c2ecf20Sopenharmony_ci #define PORT_FEATURE_CONNECTED_SWITCH_SHIFT 24 10728c2ecf20Sopenharmony_ci /* (forced) low speed switch (< 10G) */ 10738c2ecf20Sopenharmony_ci #define PORT_FEATURE_CON_SWITCH_1G_SWITCH 0x00000000 10748c2ecf20Sopenharmony_ci /* (forced) high speed switch (>= 10G) */ 10758c2ecf20Sopenharmony_ci #define PORT_FEATURE_CON_SWITCH_10G_SWITCH 0x01000000 10768c2ecf20Sopenharmony_ci #define PORT_FEATURE_CON_SWITCH_AUTO_DETECT 0x02000000 10778c2ecf20Sopenharmony_ci #define PORT_FEATURE_CON_SWITCH_ONE_TIME_DETECT 0x03000000 10788c2ecf20Sopenharmony_ci 10798c2ecf20Sopenharmony_ci #define PORT_FEATURE_LINK_SPEED_MASK 0x000f0000 10808c2ecf20Sopenharmony_ci #define PORT_FEATURE_LINK_SPEED_SHIFT 16 10818c2ecf20Sopenharmony_ci #define PORT_FEATURE_LINK_SPEED_AUTO 0x00000000 10828c2ecf20Sopenharmony_ci #define PORT_FEATURE_LINK_SPEED_10M_FULL 0x00010000 10838c2ecf20Sopenharmony_ci #define PORT_FEATURE_LINK_SPEED_10M_HALF 0x00020000 10848c2ecf20Sopenharmony_ci #define PORT_FEATURE_LINK_SPEED_100M_HALF 0x00030000 10858c2ecf20Sopenharmony_ci #define PORT_FEATURE_LINK_SPEED_100M_FULL 0x00040000 10868c2ecf20Sopenharmony_ci #define PORT_FEATURE_LINK_SPEED_1G 0x00050000 10878c2ecf20Sopenharmony_ci #define PORT_FEATURE_LINK_SPEED_2_5G 0x00060000 10888c2ecf20Sopenharmony_ci #define PORT_FEATURE_LINK_SPEED_10G_CX4 0x00070000 10898c2ecf20Sopenharmony_ci #define PORT_FEATURE_LINK_SPEED_20G 0x00080000 10908c2ecf20Sopenharmony_ci 10918c2ecf20Sopenharmony_ci #define PORT_FEATURE_FLOW_CONTROL_MASK 0x00000700 10928c2ecf20Sopenharmony_ci #define PORT_FEATURE_FLOW_CONTROL_SHIFT 8 10938c2ecf20Sopenharmony_ci #define PORT_FEATURE_FLOW_CONTROL_AUTO 0x00000000 10948c2ecf20Sopenharmony_ci #define PORT_FEATURE_FLOW_CONTROL_TX 0x00000100 10958c2ecf20Sopenharmony_ci #define PORT_FEATURE_FLOW_CONTROL_RX 0x00000200 10968c2ecf20Sopenharmony_ci #define PORT_FEATURE_FLOW_CONTROL_BOTH 0x00000300 10978c2ecf20Sopenharmony_ci #define PORT_FEATURE_FLOW_CONTROL_NONE 0x00000400 10988c2ecf20Sopenharmony_ci 10998c2ecf20Sopenharmony_ci /* The default for MCP link configuration, 11008c2ecf20Sopenharmony_ci uses the same defines as link_config */ 11018c2ecf20Sopenharmony_ci u32 mfw_wol_link_cfg; 11028c2ecf20Sopenharmony_ci 11038c2ecf20Sopenharmony_ci /* The default for the driver of the second external phy, 11048c2ecf20Sopenharmony_ci uses the same defines as link_config */ 11058c2ecf20Sopenharmony_ci u32 link_config2; /* 0x47C */ 11068c2ecf20Sopenharmony_ci 11078c2ecf20Sopenharmony_ci /* The default for MCP of the second external phy, 11088c2ecf20Sopenharmony_ci uses the same defines as link_config */ 11098c2ecf20Sopenharmony_ci u32 mfw_wol_link_cfg2; /* 0x480 */ 11108c2ecf20Sopenharmony_ci 11118c2ecf20Sopenharmony_ci 11128c2ecf20Sopenharmony_ci /* EEE power saving mode */ 11138c2ecf20Sopenharmony_ci u32 eee_power_mode; /* 0x484 */ 11148c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_EEE_POWER_MODE_MASK 0x000000FF 11158c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_EEE_POWER_MODE_SHIFT 0 11168c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_EEE_POWER_MODE_DISABLED 0x00000000 11178c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_EEE_POWER_MODE_BALANCED 0x00000001 11188c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_EEE_POWER_MODE_AGGRESSIVE 0x00000002 11198c2ecf20Sopenharmony_ci #define PORT_FEAT_CFG_EEE_POWER_MODE_LOW_LATENCY 0x00000003 11208c2ecf20Sopenharmony_ci 11218c2ecf20Sopenharmony_ci 11228c2ecf20Sopenharmony_ci u32 Reserved2[16]; /* 0x488 */ 11238c2ecf20Sopenharmony_ci}; 11248c2ecf20Sopenharmony_ci 11258c2ecf20Sopenharmony_ci 11268c2ecf20Sopenharmony_ci/**************************************************************************** 11278c2ecf20Sopenharmony_ci * Device Information * 11288c2ecf20Sopenharmony_ci ****************************************************************************/ 11298c2ecf20Sopenharmony_cistruct shm_dev_info { /* size */ 11308c2ecf20Sopenharmony_ci 11318c2ecf20Sopenharmony_ci u32 bc_rev; /* 8 bits each: major, minor, build */ /* 4 */ 11328c2ecf20Sopenharmony_ci 11338c2ecf20Sopenharmony_ci struct shared_hw_cfg shared_hw_config; /* 40 */ 11348c2ecf20Sopenharmony_ci 11358c2ecf20Sopenharmony_ci struct port_hw_cfg port_hw_config[PORT_MAX]; /* 400*2=800 */ 11368c2ecf20Sopenharmony_ci 11378c2ecf20Sopenharmony_ci struct shared_feat_cfg shared_feature_config; /* 4 */ 11388c2ecf20Sopenharmony_ci 11398c2ecf20Sopenharmony_ci struct port_feat_cfg port_feature_config[PORT_MAX];/* 116*2=232 */ 11408c2ecf20Sopenharmony_ci 11418c2ecf20Sopenharmony_ci}; 11428c2ecf20Sopenharmony_ci 11438c2ecf20Sopenharmony_cistruct extended_dev_info_shared_cfg { 11448c2ecf20Sopenharmony_ci u32 reserved[18]; 11458c2ecf20Sopenharmony_ci u32 mbi_version; 11468c2ecf20Sopenharmony_ci u32 mbi_date; 11478c2ecf20Sopenharmony_ci}; 11488c2ecf20Sopenharmony_ci 11498c2ecf20Sopenharmony_ci#if !defined(__LITTLE_ENDIAN) && !defined(__BIG_ENDIAN) 11508c2ecf20Sopenharmony_ci #error "Missing either LITTLE_ENDIAN or BIG_ENDIAN definition." 11518c2ecf20Sopenharmony_ci#endif 11528c2ecf20Sopenharmony_ci 11538c2ecf20Sopenharmony_ci#define FUNC_0 0 11548c2ecf20Sopenharmony_ci#define FUNC_1 1 11558c2ecf20Sopenharmony_ci#define FUNC_2 2 11568c2ecf20Sopenharmony_ci#define FUNC_3 3 11578c2ecf20Sopenharmony_ci#define FUNC_4 4 11588c2ecf20Sopenharmony_ci#define FUNC_5 5 11598c2ecf20Sopenharmony_ci#define FUNC_6 6 11608c2ecf20Sopenharmony_ci#define FUNC_7 7 11618c2ecf20Sopenharmony_ci#define E1_FUNC_MAX 2 11628c2ecf20Sopenharmony_ci#define E1H_FUNC_MAX 8 11638c2ecf20Sopenharmony_ci#define E2_FUNC_MAX 4 /* per path */ 11648c2ecf20Sopenharmony_ci 11658c2ecf20Sopenharmony_ci#define VN_0 0 11668c2ecf20Sopenharmony_ci#define VN_1 1 11678c2ecf20Sopenharmony_ci#define VN_2 2 11688c2ecf20Sopenharmony_ci#define VN_3 3 11698c2ecf20Sopenharmony_ci#define E1VN_MAX 1 11708c2ecf20Sopenharmony_ci#define E1HVN_MAX 4 11718c2ecf20Sopenharmony_ci 11728c2ecf20Sopenharmony_ci#define E2_VF_MAX 64 /* HC_REG_VF_CONFIGURATION_SIZE */ 11738c2ecf20Sopenharmony_ci/* This value (in milliseconds) determines the frequency of the driver 11748c2ecf20Sopenharmony_ci * issuing the PULSE message code. The firmware monitors this periodic 11758c2ecf20Sopenharmony_ci * pulse to determine when to switch to an OS-absent mode. */ 11768c2ecf20Sopenharmony_ci#define DRV_PULSE_PERIOD_MS 250 11778c2ecf20Sopenharmony_ci 11788c2ecf20Sopenharmony_ci/* This value (in milliseconds) determines how long the driver should 11798c2ecf20Sopenharmony_ci * wait for an acknowledgement from the firmware before timing out. Once 11808c2ecf20Sopenharmony_ci * the firmware has timed out, the driver will assume there is no firmware 11818c2ecf20Sopenharmony_ci * running and there won't be any firmware-driver synchronization during a 11828c2ecf20Sopenharmony_ci * driver reset. */ 11838c2ecf20Sopenharmony_ci#define FW_ACK_TIME_OUT_MS 5000 11848c2ecf20Sopenharmony_ci 11858c2ecf20Sopenharmony_ci#define FW_ACK_POLL_TIME_MS 1 11868c2ecf20Sopenharmony_ci 11878c2ecf20Sopenharmony_ci#define FW_ACK_NUM_OF_POLL (FW_ACK_TIME_OUT_MS/FW_ACK_POLL_TIME_MS) 11888c2ecf20Sopenharmony_ci 11898c2ecf20Sopenharmony_ci#define MFW_TRACE_SIGNATURE 0x54524342 11908c2ecf20Sopenharmony_ci 11918c2ecf20Sopenharmony_ci/**************************************************************************** 11928c2ecf20Sopenharmony_ci * Driver <-> FW Mailbox * 11938c2ecf20Sopenharmony_ci ****************************************************************************/ 11948c2ecf20Sopenharmony_cistruct drv_port_mb { 11958c2ecf20Sopenharmony_ci 11968c2ecf20Sopenharmony_ci u32 link_status; 11978c2ecf20Sopenharmony_ci /* Driver should update this field on any link change event */ 11988c2ecf20Sopenharmony_ci 11998c2ecf20Sopenharmony_ci #define LINK_STATUS_NONE (0<<0) 12008c2ecf20Sopenharmony_ci #define LINK_STATUS_LINK_FLAG_MASK 0x00000001 12018c2ecf20Sopenharmony_ci #define LINK_STATUS_LINK_UP 0x00000001 12028c2ecf20Sopenharmony_ci #define LINK_STATUS_SPEED_AND_DUPLEX_MASK 0x0000001E 12038c2ecf20Sopenharmony_ci #define LINK_STATUS_SPEED_AND_DUPLEX_AN_NOT_COMPLETE (0<<1) 12048c2ecf20Sopenharmony_ci #define LINK_STATUS_SPEED_AND_DUPLEX_10THD (1<<1) 12058c2ecf20Sopenharmony_ci #define LINK_STATUS_SPEED_AND_DUPLEX_10TFD (2<<1) 12068c2ecf20Sopenharmony_ci #define LINK_STATUS_SPEED_AND_DUPLEX_100TXHD (3<<1) 12078c2ecf20Sopenharmony_ci #define LINK_STATUS_SPEED_AND_DUPLEX_100T4 (4<<1) 12088c2ecf20Sopenharmony_ci #define LINK_STATUS_SPEED_AND_DUPLEX_100TXFD (5<<1) 12098c2ecf20Sopenharmony_ci #define LINK_STATUS_SPEED_AND_DUPLEX_1000THD (6<<1) 12108c2ecf20Sopenharmony_ci #define LINK_STATUS_SPEED_AND_DUPLEX_1000TFD (7<<1) 12118c2ecf20Sopenharmony_ci #define LINK_STATUS_SPEED_AND_DUPLEX_1000XFD (7<<1) 12128c2ecf20Sopenharmony_ci #define LINK_STATUS_SPEED_AND_DUPLEX_2500THD (8<<1) 12138c2ecf20Sopenharmony_ci #define LINK_STATUS_SPEED_AND_DUPLEX_2500TFD (9<<1) 12148c2ecf20Sopenharmony_ci #define LINK_STATUS_SPEED_AND_DUPLEX_2500XFD (9<<1) 12158c2ecf20Sopenharmony_ci #define LINK_STATUS_SPEED_AND_DUPLEX_10GTFD (10<<1) 12168c2ecf20Sopenharmony_ci #define LINK_STATUS_SPEED_AND_DUPLEX_10GXFD (10<<1) 12178c2ecf20Sopenharmony_ci #define LINK_STATUS_SPEED_AND_DUPLEX_20GTFD (11<<1) 12188c2ecf20Sopenharmony_ci #define LINK_STATUS_SPEED_AND_DUPLEX_20GXFD (11<<1) 12198c2ecf20Sopenharmony_ci 12208c2ecf20Sopenharmony_ci #define LINK_STATUS_AUTO_NEGOTIATE_FLAG_MASK 0x00000020 12218c2ecf20Sopenharmony_ci #define LINK_STATUS_AUTO_NEGOTIATE_ENABLED 0x00000020 12228c2ecf20Sopenharmony_ci 12238c2ecf20Sopenharmony_ci #define LINK_STATUS_AUTO_NEGOTIATE_COMPLETE 0x00000040 12248c2ecf20Sopenharmony_ci #define LINK_STATUS_PARALLEL_DETECTION_FLAG_MASK 0x00000080 12258c2ecf20Sopenharmony_ci #define LINK_STATUS_PARALLEL_DETECTION_USED 0x00000080 12268c2ecf20Sopenharmony_ci 12278c2ecf20Sopenharmony_ci #define LINK_STATUS_LINK_PARTNER_1000TFD_CAPABLE 0x00000200 12288c2ecf20Sopenharmony_ci #define LINK_STATUS_LINK_PARTNER_1000THD_CAPABLE 0x00000400 12298c2ecf20Sopenharmony_ci #define LINK_STATUS_LINK_PARTNER_100T4_CAPABLE 0x00000800 12308c2ecf20Sopenharmony_ci #define LINK_STATUS_LINK_PARTNER_100TXFD_CAPABLE 0x00001000 12318c2ecf20Sopenharmony_ci #define LINK_STATUS_LINK_PARTNER_100TXHD_CAPABLE 0x00002000 12328c2ecf20Sopenharmony_ci #define LINK_STATUS_LINK_PARTNER_10TFD_CAPABLE 0x00004000 12338c2ecf20Sopenharmony_ci #define LINK_STATUS_LINK_PARTNER_10THD_CAPABLE 0x00008000 12348c2ecf20Sopenharmony_ci 12358c2ecf20Sopenharmony_ci #define LINK_STATUS_TX_FLOW_CONTROL_FLAG_MASK 0x00010000 12368c2ecf20Sopenharmony_ci #define LINK_STATUS_TX_FLOW_CONTROL_ENABLED 0x00010000 12378c2ecf20Sopenharmony_ci 12388c2ecf20Sopenharmony_ci #define LINK_STATUS_RX_FLOW_CONTROL_FLAG_MASK 0x00020000 12398c2ecf20Sopenharmony_ci #define LINK_STATUS_RX_FLOW_CONTROL_ENABLED 0x00020000 12408c2ecf20Sopenharmony_ci 12418c2ecf20Sopenharmony_ci #define LINK_STATUS_LINK_PARTNER_FLOW_CONTROL_MASK 0x000C0000 12428c2ecf20Sopenharmony_ci #define LINK_STATUS_LINK_PARTNER_NOT_PAUSE_CAPABLE (0<<18) 12438c2ecf20Sopenharmony_ci #define LINK_STATUS_LINK_PARTNER_SYMMETRIC_PAUSE (1<<18) 12448c2ecf20Sopenharmony_ci #define LINK_STATUS_LINK_PARTNER_ASYMMETRIC_PAUSE (2<<18) 12458c2ecf20Sopenharmony_ci #define LINK_STATUS_LINK_PARTNER_BOTH_PAUSE (3<<18) 12468c2ecf20Sopenharmony_ci 12478c2ecf20Sopenharmony_ci #define LINK_STATUS_SERDES_LINK 0x00100000 12488c2ecf20Sopenharmony_ci 12498c2ecf20Sopenharmony_ci #define LINK_STATUS_LINK_PARTNER_2500XFD_CAPABLE 0x00200000 12508c2ecf20Sopenharmony_ci #define LINK_STATUS_LINK_PARTNER_2500XHD_CAPABLE 0x00400000 12518c2ecf20Sopenharmony_ci #define LINK_STATUS_LINK_PARTNER_10GXFD_CAPABLE 0x00800000 12528c2ecf20Sopenharmony_ci #define LINK_STATUS_LINK_PARTNER_20GXFD_CAPABLE 0x10000000 12538c2ecf20Sopenharmony_ci 12548c2ecf20Sopenharmony_ci #define LINK_STATUS_PFC_ENABLED 0x20000000 12558c2ecf20Sopenharmony_ci 12568c2ecf20Sopenharmony_ci #define LINK_STATUS_PHYSICAL_LINK_FLAG 0x40000000 12578c2ecf20Sopenharmony_ci #define LINK_STATUS_SFP_TX_FAULT 0x80000000 12588c2ecf20Sopenharmony_ci 12598c2ecf20Sopenharmony_ci u32 port_stx; 12608c2ecf20Sopenharmony_ci 12618c2ecf20Sopenharmony_ci u32 stat_nig_timer; 12628c2ecf20Sopenharmony_ci 12638c2ecf20Sopenharmony_ci /* MCP firmware does not use this field */ 12648c2ecf20Sopenharmony_ci u32 ext_phy_fw_version; 12658c2ecf20Sopenharmony_ci 12668c2ecf20Sopenharmony_ci}; 12678c2ecf20Sopenharmony_ci 12688c2ecf20Sopenharmony_ci 12698c2ecf20Sopenharmony_cistruct drv_func_mb { 12708c2ecf20Sopenharmony_ci 12718c2ecf20Sopenharmony_ci u32 drv_mb_header; 12728c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_MASK 0xffff0000 12738c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_LOAD_REQ 0x10000000 12748c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_LOAD_DONE 0x11000000 12758c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_UNLOAD_REQ_WOL_EN 0x20000000 12768c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_UNLOAD_REQ_WOL_DIS 0x20010000 12778c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_UNLOAD_REQ_WOL_MCP 0x20020000 12788c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_UNLOAD_DONE 0x21000000 12798c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_DCC_OK 0x30000000 12808c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_DCC_FAILURE 0x31000000 12818c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_DIAG_ENTER_REQ 0x50000000 12828c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_DIAG_EXIT_REQ 0x60000000 12838c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_VALIDATE_KEY 0x70000000 12848c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_GET_CURR_KEY 0x80000000 12858c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_GET_UPGRADE_KEY 0x81000000 12868c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_GET_MANUF_KEY 0x82000000 12878c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_LOAD_L2B_PRAM 0x90000000 12888c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_OEM_OK 0x00010000 12898c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_OEM_FAILURE 0x00020000 12908c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_OEM_UPDATE_SVID_OK 0x00030000 12918c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_OEM_UPDATE_SVID_FAILURE 0x00040000 12928c2ecf20Sopenharmony_ci /* 12938c2ecf20Sopenharmony_ci * The optic module verification command requires bootcode 12948c2ecf20Sopenharmony_ci * v5.0.6 or later, te specific optic module verification command 12958c2ecf20Sopenharmony_ci * requires bootcode v5.2.12 or later 12968c2ecf20Sopenharmony_ci */ 12978c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_VRFY_FIRST_PHY_OPT_MDL 0xa0000000 12988c2ecf20Sopenharmony_ci #define REQ_BC_VER_4_VRFY_FIRST_PHY_OPT_MDL 0x00050006 12998c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_VRFY_SPECIFIC_PHY_OPT_MDL 0xa1000000 13008c2ecf20Sopenharmony_ci #define REQ_BC_VER_4_VRFY_SPECIFIC_PHY_OPT_MDL 0x00050234 13018c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_VRFY_AFEX_SUPPORTED 0xa2000000 13028c2ecf20Sopenharmony_ci #define REQ_BC_VER_4_VRFY_AFEX_SUPPORTED 0x00070002 13038c2ecf20Sopenharmony_ci #define REQ_BC_VER_4_SFP_TX_DISABLE_SUPPORTED 0x00070014 13048c2ecf20Sopenharmony_ci #define REQ_BC_VER_4_MT_SUPPORTED 0x00070201 13058c2ecf20Sopenharmony_ci #define REQ_BC_VER_4_PFC_STATS_SUPPORTED 0x00070201 13068c2ecf20Sopenharmony_ci #define REQ_BC_VER_4_FCOE_FEATURES 0x00070209 13078c2ecf20Sopenharmony_ci 13088c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_DCBX_ADMIN_PMF_MSG 0xb0000000 13098c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_DCBX_PMF_DRV_OK 0xb2000000 13108c2ecf20Sopenharmony_ci #define REQ_BC_VER_4_DCBX_ADMIN_MSG_NON_PMF 0x00070401 13118c2ecf20Sopenharmony_ci 13128c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_VF_DISABLED_DONE 0xc0000000 13138c2ecf20Sopenharmony_ci 13148c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_AFEX_DRIVER_SETMAC 0xd0000000 13158c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_AFEX_LISTGET_ACK 0xd1000000 13168c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_AFEX_LISTSET_ACK 0xd2000000 13178c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_AFEX_STATSGET_ACK 0xd3000000 13188c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_AFEX_VIFSET_ACK 0xd4000000 13198c2ecf20Sopenharmony_ci 13208c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_DRV_INFO_ACK 0xd8000000 13218c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_DRV_INFO_NACK 0xd9000000 13228c2ecf20Sopenharmony_ci 13238c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_EEE_RESULTS_ACK 0xda000000 13248c2ecf20Sopenharmony_ci 13258c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_RMMOD 0xdb000000 13268c2ecf20Sopenharmony_ci #define REQ_BC_VER_4_RMMOD_CMD 0x0007080f 13278c2ecf20Sopenharmony_ci 13288c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_SET_MF_BW 0xe0000000 13298c2ecf20Sopenharmony_ci #define REQ_BC_VER_4_SET_MF_BW 0x00060202 13308c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_SET_MF_BW_ACK 0xe1000000 13318c2ecf20Sopenharmony_ci 13328c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_LINK_STATUS_CHANGED 0x01000000 13338c2ecf20Sopenharmony_ci 13348c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_INITIATE_FLR 0x02000000 13358c2ecf20Sopenharmony_ci #define REQ_BC_VER_4_INITIATE_FLR 0x00070213 13368c2ecf20Sopenharmony_ci 13378c2ecf20Sopenharmony_ci #define BIOS_MSG_CODE_LIC_CHALLENGE 0xff010000 13388c2ecf20Sopenharmony_ci #define BIOS_MSG_CODE_LIC_RESPONSE 0xff020000 13398c2ecf20Sopenharmony_ci #define BIOS_MSG_CODE_VIRT_MAC_PRIM 0xff030000 13408c2ecf20Sopenharmony_ci #define BIOS_MSG_CODE_VIRT_MAC_ISCSI 0xff040000 13418c2ecf20Sopenharmony_ci 13428c2ecf20Sopenharmony_ci #define DRV_MSG_SEQ_NUMBER_MASK 0x0000ffff 13438c2ecf20Sopenharmony_ci 13448c2ecf20Sopenharmony_ci u32 drv_mb_param; 13458c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_SET_MF_BW_MIN_MASK 0x00ff0000 13468c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_SET_MF_BW_MAX_MASK 0xff000000 13478c2ecf20Sopenharmony_ci 13488c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_UNLOAD_SKIP_LINK_RESET 0x00000002 13498c2ecf20Sopenharmony_ci 13508c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_LOAD_REQ_WITH_LFA 0x0000100a 13518c2ecf20Sopenharmony_ci #define DRV_MSG_CODE_LOAD_REQ_FORCE_LFA 0x00002000 13528c2ecf20Sopenharmony_ci 13538c2ecf20Sopenharmony_ci u32 fw_mb_header; 13548c2ecf20Sopenharmony_ci #define FW_MSG_CODE_MASK 0xffff0000 13558c2ecf20Sopenharmony_ci #define FW_MSG_CODE_DRV_LOAD_COMMON 0x10100000 13568c2ecf20Sopenharmony_ci #define FW_MSG_CODE_DRV_LOAD_PORT 0x10110000 13578c2ecf20Sopenharmony_ci #define FW_MSG_CODE_DRV_LOAD_FUNCTION 0x10120000 13588c2ecf20Sopenharmony_ci /* Load common chip is supported from bc 6.0.0 */ 13598c2ecf20Sopenharmony_ci #define REQ_BC_VER_4_DRV_LOAD_COMMON_CHIP 0x00060000 13608c2ecf20Sopenharmony_ci #define FW_MSG_CODE_DRV_LOAD_COMMON_CHIP 0x10130000 13618c2ecf20Sopenharmony_ci 13628c2ecf20Sopenharmony_ci #define FW_MSG_CODE_DRV_LOAD_REFUSED 0x10200000 13638c2ecf20Sopenharmony_ci #define FW_MSG_CODE_DRV_LOAD_DONE 0x11100000 13648c2ecf20Sopenharmony_ci #define FW_MSG_CODE_DRV_UNLOAD_COMMON 0x20100000 13658c2ecf20Sopenharmony_ci #define FW_MSG_CODE_DRV_UNLOAD_PORT 0x20110000 13668c2ecf20Sopenharmony_ci #define FW_MSG_CODE_DRV_UNLOAD_FUNCTION 0x20120000 13678c2ecf20Sopenharmony_ci #define FW_MSG_CODE_DRV_UNLOAD_DONE 0x21100000 13688c2ecf20Sopenharmony_ci #define FW_MSG_CODE_DCC_DONE 0x30100000 13698c2ecf20Sopenharmony_ci #define FW_MSG_CODE_LLDP_DONE 0x40100000 13708c2ecf20Sopenharmony_ci #define FW_MSG_CODE_DIAG_ENTER_DONE 0x50100000 13718c2ecf20Sopenharmony_ci #define FW_MSG_CODE_DIAG_REFUSE 0x50200000 13728c2ecf20Sopenharmony_ci #define FW_MSG_CODE_DIAG_EXIT_DONE 0x60100000 13738c2ecf20Sopenharmony_ci #define FW_MSG_CODE_VALIDATE_KEY_SUCCESS 0x70100000 13748c2ecf20Sopenharmony_ci #define FW_MSG_CODE_VALIDATE_KEY_FAILURE 0x70200000 13758c2ecf20Sopenharmony_ci #define FW_MSG_CODE_GET_KEY_DONE 0x80100000 13768c2ecf20Sopenharmony_ci #define FW_MSG_CODE_NO_KEY 0x80f00000 13778c2ecf20Sopenharmony_ci #define FW_MSG_CODE_LIC_INFO_NOT_READY 0x80f80000 13788c2ecf20Sopenharmony_ci #define FW_MSG_CODE_L2B_PRAM_LOADED 0x90100000 13798c2ecf20Sopenharmony_ci #define FW_MSG_CODE_L2B_PRAM_T_LOAD_FAILURE 0x90210000 13808c2ecf20Sopenharmony_ci #define FW_MSG_CODE_L2B_PRAM_C_LOAD_FAILURE 0x90220000 13818c2ecf20Sopenharmony_ci #define FW_MSG_CODE_L2B_PRAM_X_LOAD_FAILURE 0x90230000 13828c2ecf20Sopenharmony_ci #define FW_MSG_CODE_L2B_PRAM_U_LOAD_FAILURE 0x90240000 13838c2ecf20Sopenharmony_ci #define FW_MSG_CODE_VRFY_OPT_MDL_SUCCESS 0xa0100000 13848c2ecf20Sopenharmony_ci #define FW_MSG_CODE_VRFY_OPT_MDL_INVLD_IMG 0xa0200000 13858c2ecf20Sopenharmony_ci #define FW_MSG_CODE_VRFY_OPT_MDL_UNAPPROVED 0xa0300000 13868c2ecf20Sopenharmony_ci #define FW_MSG_CODE_VF_DISABLED_DONE 0xb0000000 13878c2ecf20Sopenharmony_ci #define FW_MSG_CODE_HW_SET_INVALID_IMAGE 0xb0100000 13888c2ecf20Sopenharmony_ci 13898c2ecf20Sopenharmony_ci #define FW_MSG_CODE_AFEX_DRIVER_SETMAC_DONE 0xd0100000 13908c2ecf20Sopenharmony_ci #define FW_MSG_CODE_AFEX_LISTGET_ACK 0xd1100000 13918c2ecf20Sopenharmony_ci #define FW_MSG_CODE_AFEX_LISTSET_ACK 0xd2100000 13928c2ecf20Sopenharmony_ci #define FW_MSG_CODE_AFEX_STATSGET_ACK 0xd3100000 13938c2ecf20Sopenharmony_ci #define FW_MSG_CODE_AFEX_VIFSET_ACK 0xd4100000 13948c2ecf20Sopenharmony_ci 13958c2ecf20Sopenharmony_ci #define FW_MSG_CODE_DRV_INFO_ACK 0xd8100000 13968c2ecf20Sopenharmony_ci #define FW_MSG_CODE_DRV_INFO_NACK 0xd9100000 13978c2ecf20Sopenharmony_ci 13988c2ecf20Sopenharmony_ci #define FW_MSG_CODE_EEE_RESULS_ACK 0xda100000 13998c2ecf20Sopenharmony_ci 14008c2ecf20Sopenharmony_ci #define FW_MSG_CODE_RMMOD_ACK 0xdb100000 14018c2ecf20Sopenharmony_ci 14028c2ecf20Sopenharmony_ci #define FW_MSG_CODE_SET_MF_BW_SENT 0xe0000000 14038c2ecf20Sopenharmony_ci #define FW_MSG_CODE_SET_MF_BW_DONE 0xe1000000 14048c2ecf20Sopenharmony_ci 14058c2ecf20Sopenharmony_ci #define FW_MSG_CODE_LINK_CHANGED_ACK 0x01100000 14068c2ecf20Sopenharmony_ci 14078c2ecf20Sopenharmony_ci #define FW_MSG_CODE_LIC_CHALLENGE 0xff010000 14088c2ecf20Sopenharmony_ci #define FW_MSG_CODE_LIC_RESPONSE 0xff020000 14098c2ecf20Sopenharmony_ci #define FW_MSG_CODE_VIRT_MAC_PRIM 0xff030000 14108c2ecf20Sopenharmony_ci #define FW_MSG_CODE_VIRT_MAC_ISCSI 0xff040000 14118c2ecf20Sopenharmony_ci 14128c2ecf20Sopenharmony_ci #define FW_MSG_SEQ_NUMBER_MASK 0x0000ffff 14138c2ecf20Sopenharmony_ci 14148c2ecf20Sopenharmony_ci u32 fw_mb_param; 14158c2ecf20Sopenharmony_ci 14168c2ecf20Sopenharmony_ci u32 drv_pulse_mb; 14178c2ecf20Sopenharmony_ci #define DRV_PULSE_SEQ_MASK 0x00007fff 14188c2ecf20Sopenharmony_ci #define DRV_PULSE_SYSTEM_TIME_MASK 0xffff0000 14198c2ecf20Sopenharmony_ci /* 14208c2ecf20Sopenharmony_ci * The system time is in the format of 14218c2ecf20Sopenharmony_ci * (year-2001)*12*32 + month*32 + day. 14228c2ecf20Sopenharmony_ci */ 14238c2ecf20Sopenharmony_ci #define DRV_PULSE_ALWAYS_ALIVE 0x00008000 14248c2ecf20Sopenharmony_ci /* 14258c2ecf20Sopenharmony_ci * Indicate to the firmware not to go into the 14268c2ecf20Sopenharmony_ci * OS-absent when it is not getting driver pulse. 14278c2ecf20Sopenharmony_ci * This is used for debugging as well for PXE(MBA). 14288c2ecf20Sopenharmony_ci */ 14298c2ecf20Sopenharmony_ci 14308c2ecf20Sopenharmony_ci u32 mcp_pulse_mb; 14318c2ecf20Sopenharmony_ci #define MCP_PULSE_SEQ_MASK 0x00007fff 14328c2ecf20Sopenharmony_ci #define MCP_PULSE_ALWAYS_ALIVE 0x00008000 14338c2ecf20Sopenharmony_ci /* Indicates to the driver not to assert due to lack 14348c2ecf20Sopenharmony_ci * of MCP response */ 14358c2ecf20Sopenharmony_ci #define MCP_EVENT_MASK 0xffff0000 14368c2ecf20Sopenharmony_ci #define MCP_EVENT_OTHER_DRIVER_RESET_REQ 0x00010000 14378c2ecf20Sopenharmony_ci 14388c2ecf20Sopenharmony_ci u32 iscsi_boot_signature; 14398c2ecf20Sopenharmony_ci u32 iscsi_boot_block_offset; 14408c2ecf20Sopenharmony_ci 14418c2ecf20Sopenharmony_ci u32 drv_status; 14428c2ecf20Sopenharmony_ci #define DRV_STATUS_PMF 0x00000001 14438c2ecf20Sopenharmony_ci #define DRV_STATUS_VF_DISABLED 0x00000002 14448c2ecf20Sopenharmony_ci #define DRV_STATUS_SET_MF_BW 0x00000004 14458c2ecf20Sopenharmony_ci #define DRV_STATUS_LINK_EVENT 0x00000008 14468c2ecf20Sopenharmony_ci 14478c2ecf20Sopenharmony_ci #define DRV_STATUS_OEM_EVENT_MASK 0x00000070 14488c2ecf20Sopenharmony_ci #define DRV_STATUS_OEM_DISABLE_ENABLE_PF 0x00000010 14498c2ecf20Sopenharmony_ci #define DRV_STATUS_OEM_BANDWIDTH_ALLOCATION 0x00000020 14508c2ecf20Sopenharmony_ci 14518c2ecf20Sopenharmony_ci #define DRV_STATUS_OEM_UPDATE_SVID 0x00000080 14528c2ecf20Sopenharmony_ci 14538c2ecf20Sopenharmony_ci #define DRV_STATUS_DCC_EVENT_MASK 0x0000ff00 14548c2ecf20Sopenharmony_ci #define DRV_STATUS_DCC_DISABLE_ENABLE_PF 0x00000100 14558c2ecf20Sopenharmony_ci #define DRV_STATUS_DCC_BANDWIDTH_ALLOCATION 0x00000200 14568c2ecf20Sopenharmony_ci #define DRV_STATUS_DCC_CHANGE_MAC_ADDRESS 0x00000400 14578c2ecf20Sopenharmony_ci #define DRV_STATUS_DCC_RESERVED1 0x00000800 14588c2ecf20Sopenharmony_ci #define DRV_STATUS_DCC_SET_PROTOCOL 0x00001000 14598c2ecf20Sopenharmony_ci #define DRV_STATUS_DCC_SET_PRIORITY 0x00002000 14608c2ecf20Sopenharmony_ci 14618c2ecf20Sopenharmony_ci #define DRV_STATUS_DCBX_EVENT_MASK 0x000f0000 14628c2ecf20Sopenharmony_ci #define DRV_STATUS_DCBX_NEGOTIATION_RESULTS 0x00010000 14638c2ecf20Sopenharmony_ci #define DRV_STATUS_AFEX_EVENT_MASK 0x03f00000 14648c2ecf20Sopenharmony_ci #define DRV_STATUS_AFEX_LISTGET_REQ 0x00100000 14658c2ecf20Sopenharmony_ci #define DRV_STATUS_AFEX_LISTSET_REQ 0x00200000 14668c2ecf20Sopenharmony_ci #define DRV_STATUS_AFEX_STATSGET_REQ 0x00400000 14678c2ecf20Sopenharmony_ci #define DRV_STATUS_AFEX_VIFSET_REQ 0x00800000 14688c2ecf20Sopenharmony_ci 14698c2ecf20Sopenharmony_ci #define DRV_STATUS_DRV_INFO_REQ 0x04000000 14708c2ecf20Sopenharmony_ci 14718c2ecf20Sopenharmony_ci #define DRV_STATUS_EEE_NEGOTIATION_RESULTS 0x08000000 14728c2ecf20Sopenharmony_ci 14738c2ecf20Sopenharmony_ci u32 virt_mac_upper; 14748c2ecf20Sopenharmony_ci #define VIRT_MAC_SIGN_MASK 0xffff0000 14758c2ecf20Sopenharmony_ci #define VIRT_MAC_SIGNATURE 0x564d0000 14768c2ecf20Sopenharmony_ci u32 virt_mac_lower; 14778c2ecf20Sopenharmony_ci 14788c2ecf20Sopenharmony_ci}; 14798c2ecf20Sopenharmony_ci 14808c2ecf20Sopenharmony_ci 14818c2ecf20Sopenharmony_ci/**************************************************************************** 14828c2ecf20Sopenharmony_ci * Management firmware state * 14838c2ecf20Sopenharmony_ci ****************************************************************************/ 14848c2ecf20Sopenharmony_ci/* Allocate 440 bytes for management firmware */ 14858c2ecf20Sopenharmony_ci#define MGMTFW_STATE_WORD_SIZE 110 14868c2ecf20Sopenharmony_ci 14878c2ecf20Sopenharmony_cistruct mgmtfw_state { 14888c2ecf20Sopenharmony_ci u32 opaque[MGMTFW_STATE_WORD_SIZE]; 14898c2ecf20Sopenharmony_ci}; 14908c2ecf20Sopenharmony_ci 14918c2ecf20Sopenharmony_ci 14928c2ecf20Sopenharmony_ci/**************************************************************************** 14938c2ecf20Sopenharmony_ci * Multi-Function configuration * 14948c2ecf20Sopenharmony_ci ****************************************************************************/ 14958c2ecf20Sopenharmony_cistruct shared_mf_cfg { 14968c2ecf20Sopenharmony_ci 14978c2ecf20Sopenharmony_ci u32 clp_mb; 14988c2ecf20Sopenharmony_ci #define SHARED_MF_CLP_SET_DEFAULT 0x00000000 14998c2ecf20Sopenharmony_ci /* set by CLP */ 15008c2ecf20Sopenharmony_ci #define SHARED_MF_CLP_EXIT 0x00000001 15018c2ecf20Sopenharmony_ci /* set by MCP */ 15028c2ecf20Sopenharmony_ci #define SHARED_MF_CLP_EXIT_DONE 0x00010000 15038c2ecf20Sopenharmony_ci 15048c2ecf20Sopenharmony_ci}; 15058c2ecf20Sopenharmony_ci 15068c2ecf20Sopenharmony_cistruct port_mf_cfg { 15078c2ecf20Sopenharmony_ci 15088c2ecf20Sopenharmony_ci u32 dynamic_cfg; /* device control channel */ 15098c2ecf20Sopenharmony_ci #define PORT_MF_CFG_E1HOV_TAG_MASK 0x0000ffff 15108c2ecf20Sopenharmony_ci #define PORT_MF_CFG_E1HOV_TAG_SHIFT 0 15118c2ecf20Sopenharmony_ci #define PORT_MF_CFG_E1HOV_TAG_DEFAULT PORT_MF_CFG_E1HOV_TAG_MASK 15128c2ecf20Sopenharmony_ci 15138c2ecf20Sopenharmony_ci u32 reserved[1]; 15148c2ecf20Sopenharmony_ci 15158c2ecf20Sopenharmony_ci}; 15168c2ecf20Sopenharmony_ci 15178c2ecf20Sopenharmony_cistruct func_mf_cfg { 15188c2ecf20Sopenharmony_ci 15198c2ecf20Sopenharmony_ci u32 config; 15208c2ecf20Sopenharmony_ci /* E/R/I/D */ 15218c2ecf20Sopenharmony_ci /* function 0 of each port cannot be hidden */ 15228c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_FUNC_HIDE 0x00000001 15238c2ecf20Sopenharmony_ci 15248c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_PROTOCOL_MASK 0x00000006 15258c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_PROTOCOL_FCOE 0x00000000 15268c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_PROTOCOL_ETHERNET 0x00000002 15278c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_PROTOCOL_ETHERNET_WITH_RDMA 0x00000004 15288c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_PROTOCOL_ISCSI 0x00000006 15298c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_PROTOCOL_DEFAULT \ 15308c2ecf20Sopenharmony_ci FUNC_MF_CFG_PROTOCOL_ETHERNET_WITH_RDMA 15318c2ecf20Sopenharmony_ci 15328c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_FUNC_DISABLED 0x00000008 15338c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_FUNC_DELETED 0x00000010 15348c2ecf20Sopenharmony_ci 15358c2ecf20Sopenharmony_ci /* PRI */ 15368c2ecf20Sopenharmony_ci /* 0 - low priority, 3 - high priority */ 15378c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_TRANSMIT_PRIORITY_MASK 0x00000300 15388c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_TRANSMIT_PRIORITY_SHIFT 8 15398c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_TRANSMIT_PRIORITY_DEFAULT 0x00000000 15408c2ecf20Sopenharmony_ci 15418c2ecf20Sopenharmony_ci /* MINBW, MAXBW */ 15428c2ecf20Sopenharmony_ci /* value range - 0..100, increments in 100Mbps */ 15438c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_MIN_BW_MASK 0x00ff0000 15448c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_MIN_BW_SHIFT 16 15458c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_MIN_BW_DEFAULT 0x00000000 15468c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_MAX_BW_MASK 0xff000000 15478c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_MAX_BW_SHIFT 24 15488c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_MAX_BW_DEFAULT 0x64000000 15498c2ecf20Sopenharmony_ci 15508c2ecf20Sopenharmony_ci u32 mac_upper; /* MAC */ 15518c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_UPPERMAC_MASK 0x0000ffff 15528c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_UPPERMAC_SHIFT 0 15538c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_UPPERMAC_DEFAULT FUNC_MF_CFG_UPPERMAC_MASK 15548c2ecf20Sopenharmony_ci u32 mac_lower; 15558c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_LOWERMAC_DEFAULT 0xffffffff 15568c2ecf20Sopenharmony_ci 15578c2ecf20Sopenharmony_ci u32 e1hov_tag; /* VNI */ 15588c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_E1HOV_TAG_MASK 0x0000ffff 15598c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_E1HOV_TAG_SHIFT 0 15608c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_E1HOV_TAG_DEFAULT FUNC_MF_CFG_E1HOV_TAG_MASK 15618c2ecf20Sopenharmony_ci 15628c2ecf20Sopenharmony_ci /* afex default VLAN ID - 12 bits */ 15638c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_AFEX_VLAN_MASK 0x0fff0000 15648c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_AFEX_VLAN_SHIFT 16 15658c2ecf20Sopenharmony_ci 15668c2ecf20Sopenharmony_ci u32 afex_config; 15678c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_AFEX_COS_FILTER_MASK 0x000000ff 15688c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_AFEX_COS_FILTER_SHIFT 0 15698c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_AFEX_MBA_ENABLED_MASK 0x0000ff00 15708c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_AFEX_MBA_ENABLED_SHIFT 8 15718c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_AFEX_MBA_ENABLED_VAL 0x00000100 15728c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_AFEX_VLAN_MODE_MASK 0x000f0000 15738c2ecf20Sopenharmony_ci #define FUNC_MF_CFG_AFEX_VLAN_MODE_SHIFT 16 15748c2ecf20Sopenharmony_ci 15758c2ecf20Sopenharmony_ci u32 reserved; 15768c2ecf20Sopenharmony_ci}; 15778c2ecf20Sopenharmony_ci 15788c2ecf20Sopenharmony_cienum mf_cfg_afex_vlan_mode { 15798c2ecf20Sopenharmony_ci FUNC_MF_CFG_AFEX_VLAN_TRUNK_MODE = 0, 15808c2ecf20Sopenharmony_ci FUNC_MF_CFG_AFEX_VLAN_ACCESS_MODE, 15818c2ecf20Sopenharmony_ci FUNC_MF_CFG_AFEX_VLAN_TRUNK_TAG_NATIVE_MODE 15828c2ecf20Sopenharmony_ci}; 15838c2ecf20Sopenharmony_ci 15848c2ecf20Sopenharmony_ci/* This structure is not applicable and should not be accessed on 57711 */ 15858c2ecf20Sopenharmony_cistruct func_ext_cfg { 15868c2ecf20Sopenharmony_ci u32 func_cfg; 15878c2ecf20Sopenharmony_ci #define MACP_FUNC_CFG_FLAGS_MASK 0x0000007F 15888c2ecf20Sopenharmony_ci #define MACP_FUNC_CFG_FLAGS_SHIFT 0 15898c2ecf20Sopenharmony_ci #define MACP_FUNC_CFG_FLAGS_ENABLED 0x00000001 15908c2ecf20Sopenharmony_ci #define MACP_FUNC_CFG_FLAGS_ETHERNET 0x00000002 15918c2ecf20Sopenharmony_ci #define MACP_FUNC_CFG_FLAGS_ISCSI_OFFLOAD 0x00000004 15928c2ecf20Sopenharmony_ci #define MACP_FUNC_CFG_FLAGS_FCOE_OFFLOAD 0x00000008 15938c2ecf20Sopenharmony_ci #define MACP_FUNC_CFG_PAUSE_ON_HOST_RING 0x00000080 15948c2ecf20Sopenharmony_ci 15958c2ecf20Sopenharmony_ci u32 iscsi_mac_addr_upper; 15968c2ecf20Sopenharmony_ci u32 iscsi_mac_addr_lower; 15978c2ecf20Sopenharmony_ci 15988c2ecf20Sopenharmony_ci u32 fcoe_mac_addr_upper; 15998c2ecf20Sopenharmony_ci u32 fcoe_mac_addr_lower; 16008c2ecf20Sopenharmony_ci 16018c2ecf20Sopenharmony_ci u32 fcoe_wwn_port_name_upper; 16028c2ecf20Sopenharmony_ci u32 fcoe_wwn_port_name_lower; 16038c2ecf20Sopenharmony_ci 16048c2ecf20Sopenharmony_ci u32 fcoe_wwn_node_name_upper; 16058c2ecf20Sopenharmony_ci u32 fcoe_wwn_node_name_lower; 16068c2ecf20Sopenharmony_ci 16078c2ecf20Sopenharmony_ci u32 preserve_data; 16088c2ecf20Sopenharmony_ci #define MF_FUNC_CFG_PRESERVE_L2_MAC (1<<0) 16098c2ecf20Sopenharmony_ci #define MF_FUNC_CFG_PRESERVE_ISCSI_MAC (1<<1) 16108c2ecf20Sopenharmony_ci #define MF_FUNC_CFG_PRESERVE_FCOE_MAC (1<<2) 16118c2ecf20Sopenharmony_ci #define MF_FUNC_CFG_PRESERVE_FCOE_WWN_P (1<<3) 16128c2ecf20Sopenharmony_ci #define MF_FUNC_CFG_PRESERVE_FCOE_WWN_N (1<<4) 16138c2ecf20Sopenharmony_ci #define MF_FUNC_CFG_PRESERVE_TX_BW (1<<5) 16148c2ecf20Sopenharmony_ci}; 16158c2ecf20Sopenharmony_ci 16168c2ecf20Sopenharmony_cistruct mf_cfg { 16178c2ecf20Sopenharmony_ci 16188c2ecf20Sopenharmony_ci struct shared_mf_cfg shared_mf_config; /* 0x4 */ 16198c2ecf20Sopenharmony_ci /* 0x8*2*2=0x20 */ 16208c2ecf20Sopenharmony_ci struct port_mf_cfg port_mf_config[NVM_PATH_MAX][PORT_MAX]; 16218c2ecf20Sopenharmony_ci /* for all chips, there are 8 mf functions */ 16228c2ecf20Sopenharmony_ci struct func_mf_cfg func_mf_config[E1H_FUNC_MAX]; /* 0x18 * 8 = 0xc0 */ 16238c2ecf20Sopenharmony_ci /* 16248c2ecf20Sopenharmony_ci * Extended configuration per function - this array does not exist and 16258c2ecf20Sopenharmony_ci * should not be accessed on 57711 16268c2ecf20Sopenharmony_ci */ 16278c2ecf20Sopenharmony_ci struct func_ext_cfg func_ext_config[E1H_FUNC_MAX]; /* 0x28 * 8 = 0x140*/ 16288c2ecf20Sopenharmony_ci}; /* 0x224 */ 16298c2ecf20Sopenharmony_ci 16308c2ecf20Sopenharmony_ci/**************************************************************************** 16318c2ecf20Sopenharmony_ci * Shared Memory Region * 16328c2ecf20Sopenharmony_ci ****************************************************************************/ 16338c2ecf20Sopenharmony_cistruct shmem_region { /* SharedMem Offset (size) */ 16348c2ecf20Sopenharmony_ci 16358c2ecf20Sopenharmony_ci u32 validity_map[PORT_MAX]; /* 0x0 (4*2 = 0x8) */ 16368c2ecf20Sopenharmony_ci #define SHR_MEM_FORMAT_REV_MASK 0xff000000 16378c2ecf20Sopenharmony_ci #define SHR_MEM_FORMAT_REV_ID ('A'<<24) 16388c2ecf20Sopenharmony_ci /* validity bits */ 16398c2ecf20Sopenharmony_ci #define SHR_MEM_VALIDITY_PCI_CFG 0x00100000 16408c2ecf20Sopenharmony_ci #define SHR_MEM_VALIDITY_MB 0x00200000 16418c2ecf20Sopenharmony_ci #define SHR_MEM_VALIDITY_DEV_INFO 0x00400000 16428c2ecf20Sopenharmony_ci #define SHR_MEM_VALIDITY_RESERVED 0x00000007 16438c2ecf20Sopenharmony_ci /* One licensing bit should be set */ 16448c2ecf20Sopenharmony_ci #define SHR_MEM_VALIDITY_LIC_KEY_IN_EFFECT_MASK 0x00000038 16458c2ecf20Sopenharmony_ci #define SHR_MEM_VALIDITY_LIC_MANUF_KEY_IN_EFFECT 0x00000008 16468c2ecf20Sopenharmony_ci #define SHR_MEM_VALIDITY_LIC_UPGRADE_KEY_IN_EFFECT 0x00000010 16478c2ecf20Sopenharmony_ci #define SHR_MEM_VALIDITY_LIC_NO_KEY_IN_EFFECT 0x00000020 16488c2ecf20Sopenharmony_ci /* Active MFW */ 16498c2ecf20Sopenharmony_ci #define SHR_MEM_VALIDITY_ACTIVE_MFW_UNKNOWN 0x00000000 16508c2ecf20Sopenharmony_ci #define SHR_MEM_VALIDITY_ACTIVE_MFW_MASK 0x000001c0 16518c2ecf20Sopenharmony_ci #define SHR_MEM_VALIDITY_ACTIVE_MFW_IPMI 0x00000040 16528c2ecf20Sopenharmony_ci #define SHR_MEM_VALIDITY_ACTIVE_MFW_UMP 0x00000080 16538c2ecf20Sopenharmony_ci #define SHR_MEM_VALIDITY_ACTIVE_MFW_NCSI 0x000000c0 16548c2ecf20Sopenharmony_ci #define SHR_MEM_VALIDITY_ACTIVE_MFW_NONE 0x000001c0 16558c2ecf20Sopenharmony_ci 16568c2ecf20Sopenharmony_ci struct shm_dev_info dev_info; /* 0x8 (0x438) */ 16578c2ecf20Sopenharmony_ci 16588c2ecf20Sopenharmony_ci struct license_key drv_lic_key[PORT_MAX]; /* 0x440 (52*2=0x68) */ 16598c2ecf20Sopenharmony_ci 16608c2ecf20Sopenharmony_ci /* FW information (for internal FW use) */ 16618c2ecf20Sopenharmony_ci u32 fw_info_fio_offset; /* 0x4a8 (0x4) */ 16628c2ecf20Sopenharmony_ci struct mgmtfw_state mgmtfw_state; /* 0x4ac (0x1b8) */ 16638c2ecf20Sopenharmony_ci 16648c2ecf20Sopenharmony_ci struct drv_port_mb port_mb[PORT_MAX]; /* 0x664 (16*2=0x20) */ 16658c2ecf20Sopenharmony_ci 16668c2ecf20Sopenharmony_ci#ifdef BMAPI 16678c2ecf20Sopenharmony_ci /* This is a variable length array */ 16688c2ecf20Sopenharmony_ci /* the number of function depends on the chip type */ 16698c2ecf20Sopenharmony_ci struct drv_func_mb func_mb[1]; /* 0x684 (44*2/4/8=0x58/0xb0/0x160) */ 16708c2ecf20Sopenharmony_ci#else 16718c2ecf20Sopenharmony_ci /* the number of function depends on the chip type */ 16728c2ecf20Sopenharmony_ci struct drv_func_mb func_mb[]; /* 0x684 (44*2/4/8=0x58/0xb0/0x160) */ 16738c2ecf20Sopenharmony_ci#endif /* BMAPI */ 16748c2ecf20Sopenharmony_ci 16758c2ecf20Sopenharmony_ci}; /* 57710 = 0x6dc | 57711 = 0x7E4 | 57712 = 0x734 */ 16768c2ecf20Sopenharmony_ci 16778c2ecf20Sopenharmony_ci/**************************************************************************** 16788c2ecf20Sopenharmony_ci * Shared Memory 2 Region * 16798c2ecf20Sopenharmony_ci ****************************************************************************/ 16808c2ecf20Sopenharmony_ci/* The fw_flr_ack is actually built in the following way: */ 16818c2ecf20Sopenharmony_ci/* 8 bit: PF ack */ 16828c2ecf20Sopenharmony_ci/* 64 bit: VF ack */ 16838c2ecf20Sopenharmony_ci/* 8 bit: ios_dis_ack */ 16848c2ecf20Sopenharmony_ci/* In order to maintain endianity in the mailbox hsi, we want to keep using */ 16858c2ecf20Sopenharmony_ci/* u32. The fw must have the VF right after the PF since this is how it */ 16868c2ecf20Sopenharmony_ci/* access arrays(it expects always the VF to reside after the PF, and that */ 16878c2ecf20Sopenharmony_ci/* makes the calculation much easier for it. ) */ 16888c2ecf20Sopenharmony_ci/* In order to answer both limitations, and keep the struct small, the code */ 16898c2ecf20Sopenharmony_ci/* will abuse the structure defined here to achieve the actual partition */ 16908c2ecf20Sopenharmony_ci/* above */ 16918c2ecf20Sopenharmony_ci/****************************************************************************/ 16928c2ecf20Sopenharmony_cistruct fw_flr_ack { 16938c2ecf20Sopenharmony_ci u32 pf_ack; 16948c2ecf20Sopenharmony_ci u32 vf_ack[1]; 16958c2ecf20Sopenharmony_ci u32 iov_dis_ack; 16968c2ecf20Sopenharmony_ci}; 16978c2ecf20Sopenharmony_ci 16988c2ecf20Sopenharmony_cistruct fw_flr_mb { 16998c2ecf20Sopenharmony_ci u32 aggint; 17008c2ecf20Sopenharmony_ci u32 opgen_addr; 17018c2ecf20Sopenharmony_ci struct fw_flr_ack ack; 17028c2ecf20Sopenharmony_ci}; 17038c2ecf20Sopenharmony_ci 17048c2ecf20Sopenharmony_cistruct eee_remote_vals { 17058c2ecf20Sopenharmony_ci u32 tx_tw; 17068c2ecf20Sopenharmony_ci u32 rx_tw; 17078c2ecf20Sopenharmony_ci}; 17088c2ecf20Sopenharmony_ci 17098c2ecf20Sopenharmony_ci/**** SUPPORT FOR SHMEM ARRRAYS *** 17108c2ecf20Sopenharmony_ci * The SHMEM HSI is aligned on 32 bit boundaries which makes it difficult to 17118c2ecf20Sopenharmony_ci * define arrays with storage types smaller then unsigned dwords. 17128c2ecf20Sopenharmony_ci * The macros below add generic support for SHMEM arrays with numeric elements 17138c2ecf20Sopenharmony_ci * that can span 2,4,8 or 16 bits. The array underlying type is a 32 bit dword 17148c2ecf20Sopenharmony_ci * array with individual bit-filed elements accessed using shifts and masks. 17158c2ecf20Sopenharmony_ci * 17168c2ecf20Sopenharmony_ci */ 17178c2ecf20Sopenharmony_ci 17188c2ecf20Sopenharmony_ci/* eb is the bitwidth of a single element */ 17198c2ecf20Sopenharmony_ci#define SHMEM_ARRAY_MASK(eb) ((1<<(eb))-1) 17208c2ecf20Sopenharmony_ci#define SHMEM_ARRAY_ENTRY(i, eb) ((i)/(32/(eb))) 17218c2ecf20Sopenharmony_ci 17228c2ecf20Sopenharmony_ci/* the bit-position macro allows the used to flip the order of the arrays 17238c2ecf20Sopenharmony_ci * elements on a per byte or word boundary. 17248c2ecf20Sopenharmony_ci * 17258c2ecf20Sopenharmony_ci * example: an array with 8 entries each 4 bit wide. This array will fit into 17268c2ecf20Sopenharmony_ci * a single dword. The diagrmas below show the array order of the nibbles. 17278c2ecf20Sopenharmony_ci * 17288c2ecf20Sopenharmony_ci * SHMEM_ARRAY_BITPOS(i, 4, 4) defines the stadard ordering: 17298c2ecf20Sopenharmony_ci * 17308c2ecf20Sopenharmony_ci * | | | | 17318c2ecf20Sopenharmony_ci * 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 17328c2ecf20Sopenharmony_ci * | | | | 17338c2ecf20Sopenharmony_ci * 17348c2ecf20Sopenharmony_ci * SHMEM_ARRAY_BITPOS(i, 4, 8) defines a flip ordering per byte: 17358c2ecf20Sopenharmony_ci * 17368c2ecf20Sopenharmony_ci * | | | | 17378c2ecf20Sopenharmony_ci * 1 | 0 | 3 | 2 | 5 | 4 | 7 | 6 | 17388c2ecf20Sopenharmony_ci * | | | | 17398c2ecf20Sopenharmony_ci * 17408c2ecf20Sopenharmony_ci * SHMEM_ARRAY_BITPOS(i, 4, 16) defines a flip ordering per word: 17418c2ecf20Sopenharmony_ci * 17428c2ecf20Sopenharmony_ci * | | | | 17438c2ecf20Sopenharmony_ci * 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 17448c2ecf20Sopenharmony_ci * | | | | 17458c2ecf20Sopenharmony_ci */ 17468c2ecf20Sopenharmony_ci#define SHMEM_ARRAY_BITPOS(i, eb, fb) \ 17478c2ecf20Sopenharmony_ci ((((32/(fb)) - 1 - ((i)/((fb)/(eb))) % (32/(fb))) * (fb)) + \ 17488c2ecf20Sopenharmony_ci (((i)%((fb)/(eb))) * (eb))) 17498c2ecf20Sopenharmony_ci 17508c2ecf20Sopenharmony_ci#define SHMEM_ARRAY_GET(a, i, eb, fb) \ 17518c2ecf20Sopenharmony_ci ((a[SHMEM_ARRAY_ENTRY(i, eb)] >> SHMEM_ARRAY_BITPOS(i, eb, fb)) & \ 17528c2ecf20Sopenharmony_ci SHMEM_ARRAY_MASK(eb)) 17538c2ecf20Sopenharmony_ci 17548c2ecf20Sopenharmony_ci#define SHMEM_ARRAY_SET(a, i, eb, fb, val) \ 17558c2ecf20Sopenharmony_cido { \ 17568c2ecf20Sopenharmony_ci a[SHMEM_ARRAY_ENTRY(i, eb)] &= ~(SHMEM_ARRAY_MASK(eb) << \ 17578c2ecf20Sopenharmony_ci SHMEM_ARRAY_BITPOS(i, eb, fb)); \ 17588c2ecf20Sopenharmony_ci a[SHMEM_ARRAY_ENTRY(i, eb)] |= (((val) & SHMEM_ARRAY_MASK(eb)) << \ 17598c2ecf20Sopenharmony_ci SHMEM_ARRAY_BITPOS(i, eb, fb)); \ 17608c2ecf20Sopenharmony_ci} while (0) 17618c2ecf20Sopenharmony_ci 17628c2ecf20Sopenharmony_ci 17638c2ecf20Sopenharmony_ci/****START OF DCBX STRUCTURES DECLARATIONS****/ 17648c2ecf20Sopenharmony_ci#define DCBX_MAX_NUM_PRI_PG_ENTRIES 8 17658c2ecf20Sopenharmony_ci#define DCBX_PRI_PG_BITWIDTH 4 17668c2ecf20Sopenharmony_ci#define DCBX_PRI_PG_FBITS 8 17678c2ecf20Sopenharmony_ci#define DCBX_PRI_PG_GET(a, i) \ 17688c2ecf20Sopenharmony_ci SHMEM_ARRAY_GET(a, i, DCBX_PRI_PG_BITWIDTH, DCBX_PRI_PG_FBITS) 17698c2ecf20Sopenharmony_ci#define DCBX_PRI_PG_SET(a, i, val) \ 17708c2ecf20Sopenharmony_ci SHMEM_ARRAY_SET(a, i, DCBX_PRI_PG_BITWIDTH, DCBX_PRI_PG_FBITS, val) 17718c2ecf20Sopenharmony_ci#define DCBX_MAX_NUM_PG_BW_ENTRIES 8 17728c2ecf20Sopenharmony_ci#define DCBX_BW_PG_BITWIDTH 8 17738c2ecf20Sopenharmony_ci#define DCBX_PG_BW_GET(a, i) \ 17748c2ecf20Sopenharmony_ci SHMEM_ARRAY_GET(a, i, DCBX_BW_PG_BITWIDTH, DCBX_BW_PG_BITWIDTH) 17758c2ecf20Sopenharmony_ci#define DCBX_PG_BW_SET(a, i, val) \ 17768c2ecf20Sopenharmony_ci SHMEM_ARRAY_SET(a, i, DCBX_BW_PG_BITWIDTH, DCBX_BW_PG_BITWIDTH, val) 17778c2ecf20Sopenharmony_ci#define DCBX_STRICT_PRI_PG 15 17788c2ecf20Sopenharmony_ci#define DCBX_MAX_APP_PROTOCOL 16 17798c2ecf20Sopenharmony_ci#define FCOE_APP_IDX 0 17808c2ecf20Sopenharmony_ci#define ISCSI_APP_IDX 1 17818c2ecf20Sopenharmony_ci#define PREDEFINED_APP_IDX_MAX 2 17828c2ecf20Sopenharmony_ci 17838c2ecf20Sopenharmony_ci 17848c2ecf20Sopenharmony_ci/* Big/Little endian have the same representation. */ 17858c2ecf20Sopenharmony_cistruct dcbx_ets_feature { 17868c2ecf20Sopenharmony_ci /* 17878c2ecf20Sopenharmony_ci * For Admin MIB - is this feature supported by the 17888c2ecf20Sopenharmony_ci * driver | For Local MIB - should this feature be enabled. 17898c2ecf20Sopenharmony_ci */ 17908c2ecf20Sopenharmony_ci u32 enabled; 17918c2ecf20Sopenharmony_ci u32 pg_bw_tbl[2]; 17928c2ecf20Sopenharmony_ci u32 pri_pg_tbl[1]; 17938c2ecf20Sopenharmony_ci}; 17948c2ecf20Sopenharmony_ci 17958c2ecf20Sopenharmony_ci/* Driver structure in LE */ 17968c2ecf20Sopenharmony_cistruct dcbx_pfc_feature { 17978c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN 17988c2ecf20Sopenharmony_ci u8 pri_en_bitmap; 17998c2ecf20Sopenharmony_ci #define DCBX_PFC_PRI_0 0x01 18008c2ecf20Sopenharmony_ci #define DCBX_PFC_PRI_1 0x02 18018c2ecf20Sopenharmony_ci #define DCBX_PFC_PRI_2 0x04 18028c2ecf20Sopenharmony_ci #define DCBX_PFC_PRI_3 0x08 18038c2ecf20Sopenharmony_ci #define DCBX_PFC_PRI_4 0x10 18048c2ecf20Sopenharmony_ci #define DCBX_PFC_PRI_5 0x20 18058c2ecf20Sopenharmony_ci #define DCBX_PFC_PRI_6 0x40 18068c2ecf20Sopenharmony_ci #define DCBX_PFC_PRI_7 0x80 18078c2ecf20Sopenharmony_ci u8 pfc_caps; 18088c2ecf20Sopenharmony_ci u8 reserved; 18098c2ecf20Sopenharmony_ci u8 enabled; 18108c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 18118c2ecf20Sopenharmony_ci u8 enabled; 18128c2ecf20Sopenharmony_ci u8 reserved; 18138c2ecf20Sopenharmony_ci u8 pfc_caps; 18148c2ecf20Sopenharmony_ci u8 pri_en_bitmap; 18158c2ecf20Sopenharmony_ci #define DCBX_PFC_PRI_0 0x01 18168c2ecf20Sopenharmony_ci #define DCBX_PFC_PRI_1 0x02 18178c2ecf20Sopenharmony_ci #define DCBX_PFC_PRI_2 0x04 18188c2ecf20Sopenharmony_ci #define DCBX_PFC_PRI_3 0x08 18198c2ecf20Sopenharmony_ci #define DCBX_PFC_PRI_4 0x10 18208c2ecf20Sopenharmony_ci #define DCBX_PFC_PRI_5 0x20 18218c2ecf20Sopenharmony_ci #define DCBX_PFC_PRI_6 0x40 18228c2ecf20Sopenharmony_ci #define DCBX_PFC_PRI_7 0x80 18238c2ecf20Sopenharmony_ci#endif 18248c2ecf20Sopenharmony_ci}; 18258c2ecf20Sopenharmony_ci 18268c2ecf20Sopenharmony_cistruct dcbx_app_priority_entry { 18278c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN 18288c2ecf20Sopenharmony_ci u16 app_id; 18298c2ecf20Sopenharmony_ci u8 pri_bitmap; 18308c2ecf20Sopenharmony_ci u8 appBitfield; 18318c2ecf20Sopenharmony_ci #define DCBX_APP_ENTRY_VALID 0x01 18328c2ecf20Sopenharmony_ci #define DCBX_APP_ENTRY_SF_MASK 0xF0 18338c2ecf20Sopenharmony_ci #define DCBX_APP_ENTRY_SF_SHIFT 4 18348c2ecf20Sopenharmony_ci #define DCBX_APP_SF_ETH_TYPE 0x10 18358c2ecf20Sopenharmony_ci #define DCBX_APP_SF_PORT 0x20 18368c2ecf20Sopenharmony_ci #define DCBX_APP_SF_UDP 0x40 18378c2ecf20Sopenharmony_ci #define DCBX_APP_SF_DEFAULT 0x80 18388c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 18398c2ecf20Sopenharmony_ci u8 appBitfield; 18408c2ecf20Sopenharmony_ci #define DCBX_APP_ENTRY_VALID 0x01 18418c2ecf20Sopenharmony_ci #define DCBX_APP_ENTRY_SF_MASK 0xF0 18428c2ecf20Sopenharmony_ci #define DCBX_APP_ENTRY_SF_SHIFT 4 18438c2ecf20Sopenharmony_ci #define DCBX_APP_ENTRY_VALID 0x01 18448c2ecf20Sopenharmony_ci #define DCBX_APP_SF_ETH_TYPE 0x10 18458c2ecf20Sopenharmony_ci #define DCBX_APP_SF_PORT 0x20 18468c2ecf20Sopenharmony_ci #define DCBX_APP_SF_UDP 0x40 18478c2ecf20Sopenharmony_ci #define DCBX_APP_SF_DEFAULT 0x80 18488c2ecf20Sopenharmony_ci u8 pri_bitmap; 18498c2ecf20Sopenharmony_ci u16 app_id; 18508c2ecf20Sopenharmony_ci#endif 18518c2ecf20Sopenharmony_ci}; 18528c2ecf20Sopenharmony_ci 18538c2ecf20Sopenharmony_ci 18548c2ecf20Sopenharmony_ci/* FW structure in BE */ 18558c2ecf20Sopenharmony_cistruct dcbx_app_priority_feature { 18568c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN 18578c2ecf20Sopenharmony_ci u8 reserved; 18588c2ecf20Sopenharmony_ci u8 default_pri; 18598c2ecf20Sopenharmony_ci u8 tc_supported; 18608c2ecf20Sopenharmony_ci u8 enabled; 18618c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 18628c2ecf20Sopenharmony_ci u8 enabled; 18638c2ecf20Sopenharmony_ci u8 tc_supported; 18648c2ecf20Sopenharmony_ci u8 default_pri; 18658c2ecf20Sopenharmony_ci u8 reserved; 18668c2ecf20Sopenharmony_ci#endif 18678c2ecf20Sopenharmony_ci struct dcbx_app_priority_entry app_pri_tbl[DCBX_MAX_APP_PROTOCOL]; 18688c2ecf20Sopenharmony_ci}; 18698c2ecf20Sopenharmony_ci 18708c2ecf20Sopenharmony_ci/* FW structure in BE */ 18718c2ecf20Sopenharmony_cistruct dcbx_features { 18728c2ecf20Sopenharmony_ci /* PG feature */ 18738c2ecf20Sopenharmony_ci struct dcbx_ets_feature ets; 18748c2ecf20Sopenharmony_ci /* PFC feature */ 18758c2ecf20Sopenharmony_ci struct dcbx_pfc_feature pfc; 18768c2ecf20Sopenharmony_ci /* APP feature */ 18778c2ecf20Sopenharmony_ci struct dcbx_app_priority_feature app; 18788c2ecf20Sopenharmony_ci}; 18798c2ecf20Sopenharmony_ci 18808c2ecf20Sopenharmony_ci/* LLDP protocol parameters */ 18818c2ecf20Sopenharmony_ci/* FW structure in BE */ 18828c2ecf20Sopenharmony_cistruct lldp_params { 18838c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN 18848c2ecf20Sopenharmony_ci u8 msg_fast_tx_interval; 18858c2ecf20Sopenharmony_ci u8 msg_tx_hold; 18868c2ecf20Sopenharmony_ci u8 msg_tx_interval; 18878c2ecf20Sopenharmony_ci u8 admin_status; 18888c2ecf20Sopenharmony_ci #define LLDP_TX_ONLY 0x01 18898c2ecf20Sopenharmony_ci #define LLDP_RX_ONLY 0x02 18908c2ecf20Sopenharmony_ci #define LLDP_TX_RX 0x03 18918c2ecf20Sopenharmony_ci #define LLDP_DISABLED 0x04 18928c2ecf20Sopenharmony_ci u8 reserved1; 18938c2ecf20Sopenharmony_ci u8 tx_fast; 18948c2ecf20Sopenharmony_ci u8 tx_crd_max; 18958c2ecf20Sopenharmony_ci u8 tx_crd; 18968c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 18978c2ecf20Sopenharmony_ci u8 admin_status; 18988c2ecf20Sopenharmony_ci #define LLDP_TX_ONLY 0x01 18998c2ecf20Sopenharmony_ci #define LLDP_RX_ONLY 0x02 19008c2ecf20Sopenharmony_ci #define LLDP_TX_RX 0x03 19018c2ecf20Sopenharmony_ci #define LLDP_DISABLED 0x04 19028c2ecf20Sopenharmony_ci u8 msg_tx_interval; 19038c2ecf20Sopenharmony_ci u8 msg_tx_hold; 19048c2ecf20Sopenharmony_ci u8 msg_fast_tx_interval; 19058c2ecf20Sopenharmony_ci u8 tx_crd; 19068c2ecf20Sopenharmony_ci u8 tx_crd_max; 19078c2ecf20Sopenharmony_ci u8 tx_fast; 19088c2ecf20Sopenharmony_ci u8 reserved1; 19098c2ecf20Sopenharmony_ci#endif 19108c2ecf20Sopenharmony_ci #define REM_CHASSIS_ID_STAT_LEN 4 19118c2ecf20Sopenharmony_ci #define REM_PORT_ID_STAT_LEN 4 19128c2ecf20Sopenharmony_ci /* Holds remote Chassis ID TLV header, subtype and 9B of payload. */ 19138c2ecf20Sopenharmony_ci u32 peer_chassis_id[REM_CHASSIS_ID_STAT_LEN]; 19148c2ecf20Sopenharmony_ci /* Holds remote Port ID TLV header, subtype and 9B of payload. */ 19158c2ecf20Sopenharmony_ci u32 peer_port_id[REM_PORT_ID_STAT_LEN]; 19168c2ecf20Sopenharmony_ci}; 19178c2ecf20Sopenharmony_ci 19188c2ecf20Sopenharmony_cistruct lldp_dcbx_stat { 19198c2ecf20Sopenharmony_ci #define LOCAL_CHASSIS_ID_STAT_LEN 2 19208c2ecf20Sopenharmony_ci #define LOCAL_PORT_ID_STAT_LEN 2 19218c2ecf20Sopenharmony_ci /* Holds local Chassis ID 8B payload of constant subtype 4. */ 19228c2ecf20Sopenharmony_ci u32 local_chassis_id[LOCAL_CHASSIS_ID_STAT_LEN]; 19238c2ecf20Sopenharmony_ci /* Holds local Port ID 8B payload of constant subtype 3. */ 19248c2ecf20Sopenharmony_ci u32 local_port_id[LOCAL_PORT_ID_STAT_LEN]; 19258c2ecf20Sopenharmony_ci /* Number of DCBX frames transmitted. */ 19268c2ecf20Sopenharmony_ci u32 num_tx_dcbx_pkts; 19278c2ecf20Sopenharmony_ci /* Number of DCBX frames received. */ 19288c2ecf20Sopenharmony_ci u32 num_rx_dcbx_pkts; 19298c2ecf20Sopenharmony_ci}; 19308c2ecf20Sopenharmony_ci 19318c2ecf20Sopenharmony_ci/* ADMIN MIB - DCBX local machine default configuration. */ 19328c2ecf20Sopenharmony_cistruct lldp_admin_mib { 19338c2ecf20Sopenharmony_ci u32 ver_cfg_flags; 19348c2ecf20Sopenharmony_ci #define DCBX_ETS_CONFIG_TX_ENABLED 0x00000001 19358c2ecf20Sopenharmony_ci #define DCBX_PFC_CONFIG_TX_ENABLED 0x00000002 19368c2ecf20Sopenharmony_ci #define DCBX_APP_CONFIG_TX_ENABLED 0x00000004 19378c2ecf20Sopenharmony_ci #define DCBX_ETS_RECO_TX_ENABLED 0x00000008 19388c2ecf20Sopenharmony_ci #define DCBX_ETS_RECO_VALID 0x00000010 19398c2ecf20Sopenharmony_ci #define DCBX_ETS_WILLING 0x00000020 19408c2ecf20Sopenharmony_ci #define DCBX_PFC_WILLING 0x00000040 19418c2ecf20Sopenharmony_ci #define DCBX_APP_WILLING 0x00000080 19428c2ecf20Sopenharmony_ci #define DCBX_VERSION_CEE 0x00000100 19438c2ecf20Sopenharmony_ci #define DCBX_VERSION_IEEE 0x00000200 19448c2ecf20Sopenharmony_ci #define DCBX_DCBX_ENABLED 0x00000400 19458c2ecf20Sopenharmony_ci #define DCBX_CEE_VERSION_MASK 0x0000f000 19468c2ecf20Sopenharmony_ci #define DCBX_CEE_VERSION_SHIFT 12 19478c2ecf20Sopenharmony_ci #define DCBX_CEE_MAX_VERSION_MASK 0x000f0000 19488c2ecf20Sopenharmony_ci #define DCBX_CEE_MAX_VERSION_SHIFT 16 19498c2ecf20Sopenharmony_ci struct dcbx_features features; 19508c2ecf20Sopenharmony_ci}; 19518c2ecf20Sopenharmony_ci 19528c2ecf20Sopenharmony_ci/* REMOTE MIB - remote machine DCBX configuration. */ 19538c2ecf20Sopenharmony_cistruct lldp_remote_mib { 19548c2ecf20Sopenharmony_ci u32 prefix_seq_num; 19558c2ecf20Sopenharmony_ci u32 flags; 19568c2ecf20Sopenharmony_ci #define DCBX_ETS_TLV_RX 0x00000001 19578c2ecf20Sopenharmony_ci #define DCBX_PFC_TLV_RX 0x00000002 19588c2ecf20Sopenharmony_ci #define DCBX_APP_TLV_RX 0x00000004 19598c2ecf20Sopenharmony_ci #define DCBX_ETS_RX_ERROR 0x00000010 19608c2ecf20Sopenharmony_ci #define DCBX_PFC_RX_ERROR 0x00000020 19618c2ecf20Sopenharmony_ci #define DCBX_APP_RX_ERROR 0x00000040 19628c2ecf20Sopenharmony_ci #define DCBX_ETS_REM_WILLING 0x00000100 19638c2ecf20Sopenharmony_ci #define DCBX_PFC_REM_WILLING 0x00000200 19648c2ecf20Sopenharmony_ci #define DCBX_APP_REM_WILLING 0x00000400 19658c2ecf20Sopenharmony_ci #define DCBX_REMOTE_ETS_RECO_VALID 0x00001000 19668c2ecf20Sopenharmony_ci #define DCBX_REMOTE_MIB_VALID 0x00002000 19678c2ecf20Sopenharmony_ci struct dcbx_features features; 19688c2ecf20Sopenharmony_ci u32 suffix_seq_num; 19698c2ecf20Sopenharmony_ci}; 19708c2ecf20Sopenharmony_ci 19718c2ecf20Sopenharmony_ci/* LOCAL MIB - operational DCBX configuration - transmitted on Tx LLDPDU. */ 19728c2ecf20Sopenharmony_cistruct lldp_local_mib { 19738c2ecf20Sopenharmony_ci u32 prefix_seq_num; 19748c2ecf20Sopenharmony_ci /* Indicates if there is mismatch with negotiation results. */ 19758c2ecf20Sopenharmony_ci u32 error; 19768c2ecf20Sopenharmony_ci #define DCBX_LOCAL_ETS_ERROR 0x00000001 19778c2ecf20Sopenharmony_ci #define DCBX_LOCAL_PFC_ERROR 0x00000002 19788c2ecf20Sopenharmony_ci #define DCBX_LOCAL_APP_ERROR 0x00000004 19798c2ecf20Sopenharmony_ci #define DCBX_LOCAL_PFC_MISMATCH 0x00000010 19808c2ecf20Sopenharmony_ci #define DCBX_LOCAL_APP_MISMATCH 0x00000020 19818c2ecf20Sopenharmony_ci #define DCBX_REMOTE_MIB_ERROR 0x00000040 19828c2ecf20Sopenharmony_ci #define DCBX_REMOTE_ETS_TLV_NOT_FOUND 0x00000080 19838c2ecf20Sopenharmony_ci #define DCBX_REMOTE_PFC_TLV_NOT_FOUND 0x00000100 19848c2ecf20Sopenharmony_ci #define DCBX_REMOTE_APP_TLV_NOT_FOUND 0x00000200 19858c2ecf20Sopenharmony_ci struct dcbx_features features; 19868c2ecf20Sopenharmony_ci u32 suffix_seq_num; 19878c2ecf20Sopenharmony_ci}; 19888c2ecf20Sopenharmony_ci/***END OF DCBX STRUCTURES DECLARATIONS***/ 19898c2ecf20Sopenharmony_ci 19908c2ecf20Sopenharmony_ci/***********************************************************/ 19918c2ecf20Sopenharmony_ci/* Elink section */ 19928c2ecf20Sopenharmony_ci/***********************************************************/ 19938c2ecf20Sopenharmony_ci#define SHMEM_LINK_CONFIG_SIZE 2 19948c2ecf20Sopenharmony_cistruct shmem_lfa { 19958c2ecf20Sopenharmony_ci u32 req_duplex; 19968c2ecf20Sopenharmony_ci #define REQ_DUPLEX_PHY0_MASK 0x0000ffff 19978c2ecf20Sopenharmony_ci #define REQ_DUPLEX_PHY0_SHIFT 0 19988c2ecf20Sopenharmony_ci #define REQ_DUPLEX_PHY1_MASK 0xffff0000 19998c2ecf20Sopenharmony_ci #define REQ_DUPLEX_PHY1_SHIFT 16 20008c2ecf20Sopenharmony_ci u32 req_flow_ctrl; 20018c2ecf20Sopenharmony_ci #define REQ_FLOW_CTRL_PHY0_MASK 0x0000ffff 20028c2ecf20Sopenharmony_ci #define REQ_FLOW_CTRL_PHY0_SHIFT 0 20038c2ecf20Sopenharmony_ci #define REQ_FLOW_CTRL_PHY1_MASK 0xffff0000 20048c2ecf20Sopenharmony_ci #define REQ_FLOW_CTRL_PHY1_SHIFT 16 20058c2ecf20Sopenharmony_ci u32 req_line_speed; /* Also determine AutoNeg */ 20068c2ecf20Sopenharmony_ci #define REQ_LINE_SPD_PHY0_MASK 0x0000ffff 20078c2ecf20Sopenharmony_ci #define REQ_LINE_SPD_PHY0_SHIFT 0 20088c2ecf20Sopenharmony_ci #define REQ_LINE_SPD_PHY1_MASK 0xffff0000 20098c2ecf20Sopenharmony_ci #define REQ_LINE_SPD_PHY1_SHIFT 16 20108c2ecf20Sopenharmony_ci u32 speed_cap_mask[SHMEM_LINK_CONFIG_SIZE]; 20118c2ecf20Sopenharmony_ci u32 additional_config; 20128c2ecf20Sopenharmony_ci #define REQ_FC_AUTO_ADV_MASK 0x0000ffff 20138c2ecf20Sopenharmony_ci #define REQ_FC_AUTO_ADV0_SHIFT 0 20148c2ecf20Sopenharmony_ci #define NO_LFA_DUE_TO_DCC_MASK 0x00010000 20158c2ecf20Sopenharmony_ci u32 lfa_sts; 20168c2ecf20Sopenharmony_ci #define LFA_LINK_FLAP_REASON_OFFSET 0 20178c2ecf20Sopenharmony_ci #define LFA_LINK_FLAP_REASON_MASK 0x000000ff 20188c2ecf20Sopenharmony_ci #define LFA_LINK_DOWN 0x1 20198c2ecf20Sopenharmony_ci #define LFA_LOOPBACK_ENABLED 0x2 20208c2ecf20Sopenharmony_ci #define LFA_DUPLEX_MISMATCH 0x3 20218c2ecf20Sopenharmony_ci #define LFA_MFW_IS_TOO_OLD 0x4 20228c2ecf20Sopenharmony_ci #define LFA_LINK_SPEED_MISMATCH 0x5 20238c2ecf20Sopenharmony_ci #define LFA_FLOW_CTRL_MISMATCH 0x6 20248c2ecf20Sopenharmony_ci #define LFA_SPEED_CAP_MISMATCH 0x7 20258c2ecf20Sopenharmony_ci #define LFA_DCC_LFA_DISABLED 0x8 20268c2ecf20Sopenharmony_ci #define LFA_EEE_MISMATCH 0x9 20278c2ecf20Sopenharmony_ci 20288c2ecf20Sopenharmony_ci #define LINK_FLAP_AVOIDANCE_COUNT_OFFSET 8 20298c2ecf20Sopenharmony_ci #define LINK_FLAP_AVOIDANCE_COUNT_MASK 0x0000ff00 20308c2ecf20Sopenharmony_ci 20318c2ecf20Sopenharmony_ci #define LINK_FLAP_COUNT_OFFSET 16 20328c2ecf20Sopenharmony_ci #define LINK_FLAP_COUNT_MASK 0x00ff0000 20338c2ecf20Sopenharmony_ci 20348c2ecf20Sopenharmony_ci #define LFA_FLAGS_MASK 0xff000000 20358c2ecf20Sopenharmony_ci #define SHMEM_LFA_DONT_CLEAR_STAT (1<<24) 20368c2ecf20Sopenharmony_ci}; 20378c2ecf20Sopenharmony_ci 20388c2ecf20Sopenharmony_ci/* Used to support NSCI get OS driver version 20398c2ecf20Sopenharmony_ci * on driver load the version value will be set 20408c2ecf20Sopenharmony_ci * on driver unload driver value of 0x0 will be set. 20418c2ecf20Sopenharmony_ci */ 20428c2ecf20Sopenharmony_cistruct os_drv_ver { 20438c2ecf20Sopenharmony_ci#define DRV_VER_NOT_LOADED 0 20448c2ecf20Sopenharmony_ci 20458c2ecf20Sopenharmony_ci /* personalties order is important */ 20468c2ecf20Sopenharmony_ci#define DRV_PERS_ETHERNET 0 20478c2ecf20Sopenharmony_ci#define DRV_PERS_ISCSI 1 20488c2ecf20Sopenharmony_ci#define DRV_PERS_FCOE 2 20498c2ecf20Sopenharmony_ci 20508c2ecf20Sopenharmony_ci /* shmem2 struct is constant can't add more personalties here */ 20518c2ecf20Sopenharmony_ci#define MAX_DRV_PERS 3 20528c2ecf20Sopenharmony_ci u32 versions[MAX_DRV_PERS]; 20538c2ecf20Sopenharmony_ci}; 20548c2ecf20Sopenharmony_ci 20558c2ecf20Sopenharmony_cistruct ncsi_oem_fcoe_features { 20568c2ecf20Sopenharmony_ci u32 fcoe_features1; 20578c2ecf20Sopenharmony_ci #define FCOE_FEATURES1_IOS_PER_CONNECTION_MASK 0x0000FFFF 20588c2ecf20Sopenharmony_ci #define FCOE_FEATURES1_IOS_PER_CONNECTION_OFFSET 0 20598c2ecf20Sopenharmony_ci 20608c2ecf20Sopenharmony_ci #define FCOE_FEATURES1_LOGINS_PER_PORT_MASK 0xFFFF0000 20618c2ecf20Sopenharmony_ci #define FCOE_FEATURES1_LOGINS_PER_PORT_OFFSET 16 20628c2ecf20Sopenharmony_ci 20638c2ecf20Sopenharmony_ci u32 fcoe_features2; 20648c2ecf20Sopenharmony_ci #define FCOE_FEATURES2_EXCHANGES_MASK 0x0000FFFF 20658c2ecf20Sopenharmony_ci #define FCOE_FEATURES2_EXCHANGES_OFFSET 0 20668c2ecf20Sopenharmony_ci 20678c2ecf20Sopenharmony_ci #define FCOE_FEATURES2_NPIV_WWN_PER_PORT_MASK 0xFFFF0000 20688c2ecf20Sopenharmony_ci #define FCOE_FEATURES2_NPIV_WWN_PER_PORT_OFFSET 16 20698c2ecf20Sopenharmony_ci 20708c2ecf20Sopenharmony_ci u32 fcoe_features3; 20718c2ecf20Sopenharmony_ci #define FCOE_FEATURES3_TARGETS_SUPPORTED_MASK 0x0000FFFF 20728c2ecf20Sopenharmony_ci #define FCOE_FEATURES3_TARGETS_SUPPORTED_OFFSET 0 20738c2ecf20Sopenharmony_ci 20748c2ecf20Sopenharmony_ci #define FCOE_FEATURES3_OUTSTANDING_COMMANDS_MASK 0xFFFF0000 20758c2ecf20Sopenharmony_ci #define FCOE_FEATURES3_OUTSTANDING_COMMANDS_OFFSET 16 20768c2ecf20Sopenharmony_ci 20778c2ecf20Sopenharmony_ci u32 fcoe_features4; 20788c2ecf20Sopenharmony_ci #define FCOE_FEATURES4_FEATURE_SETTINGS_MASK 0x0000000F 20798c2ecf20Sopenharmony_ci #define FCOE_FEATURES4_FEATURE_SETTINGS_OFFSET 0 20808c2ecf20Sopenharmony_ci}; 20818c2ecf20Sopenharmony_ci 20828c2ecf20Sopenharmony_cienum curr_cfg_method_e { 20838c2ecf20Sopenharmony_ci CURR_CFG_MET_NONE = 0, /* default config */ 20848c2ecf20Sopenharmony_ci CURR_CFG_MET_OS = 1, 20858c2ecf20Sopenharmony_ci CURR_CFG_MET_VENDOR_SPEC = 2,/* e.g. Option ROM, NPAR, O/S Cfg Utils */ 20868c2ecf20Sopenharmony_ci}; 20878c2ecf20Sopenharmony_ci 20888c2ecf20Sopenharmony_ci#define FC_NPIV_WWPN_SIZE 8 20898c2ecf20Sopenharmony_ci#define FC_NPIV_WWNN_SIZE 8 20908c2ecf20Sopenharmony_cistruct bdn_npiv_settings { 20918c2ecf20Sopenharmony_ci u8 npiv_wwpn[FC_NPIV_WWPN_SIZE]; 20928c2ecf20Sopenharmony_ci u8 npiv_wwnn[FC_NPIV_WWNN_SIZE]; 20938c2ecf20Sopenharmony_ci}; 20948c2ecf20Sopenharmony_ci 20958c2ecf20Sopenharmony_cistruct bdn_fc_npiv_cfg { 20968c2ecf20Sopenharmony_ci /* hdr used internally by the MFW */ 20978c2ecf20Sopenharmony_ci u32 hdr; 20988c2ecf20Sopenharmony_ci u32 num_of_npiv; 20998c2ecf20Sopenharmony_ci}; 21008c2ecf20Sopenharmony_ci 21018c2ecf20Sopenharmony_ci#define MAX_NUMBER_NPIV 64 21028c2ecf20Sopenharmony_cistruct bdn_fc_npiv_tbl { 21038c2ecf20Sopenharmony_ci struct bdn_fc_npiv_cfg fc_npiv_cfg; 21048c2ecf20Sopenharmony_ci struct bdn_npiv_settings settings[MAX_NUMBER_NPIV]; 21058c2ecf20Sopenharmony_ci}; 21068c2ecf20Sopenharmony_ci 21078c2ecf20Sopenharmony_cistruct mdump_driver_info { 21088c2ecf20Sopenharmony_ci u32 epoc; 21098c2ecf20Sopenharmony_ci u32 drv_ver; 21108c2ecf20Sopenharmony_ci u32 fw_ver; 21118c2ecf20Sopenharmony_ci 21128c2ecf20Sopenharmony_ci u32 valid_dump; 21138c2ecf20Sopenharmony_ci #define FIRST_DUMP_VALID (1 << 0) 21148c2ecf20Sopenharmony_ci #define SECOND_DUMP_VALID (1 << 1) 21158c2ecf20Sopenharmony_ci 21168c2ecf20Sopenharmony_ci u32 flags; 21178c2ecf20Sopenharmony_ci #define ENABLE_ALL_TRIGGERS (0x7fffffff) 21188c2ecf20Sopenharmony_ci #define TRIGGER_MDUMP_ONCE (1 << 31) 21198c2ecf20Sopenharmony_ci}; 21208c2ecf20Sopenharmony_ci 21218c2ecf20Sopenharmony_cistruct ncsi_oem_data { 21228c2ecf20Sopenharmony_ci u32 driver_version[4]; 21238c2ecf20Sopenharmony_ci struct ncsi_oem_fcoe_features ncsi_oem_fcoe_features; 21248c2ecf20Sopenharmony_ci}; 21258c2ecf20Sopenharmony_ci 21268c2ecf20Sopenharmony_cistruct shmem2_region { 21278c2ecf20Sopenharmony_ci 21288c2ecf20Sopenharmony_ci u32 size; /* 0x0000 */ 21298c2ecf20Sopenharmony_ci 21308c2ecf20Sopenharmony_ci u32 dcc_support; /* 0x0004 */ 21318c2ecf20Sopenharmony_ci #define SHMEM_DCC_SUPPORT_NONE 0x00000000 21328c2ecf20Sopenharmony_ci #define SHMEM_DCC_SUPPORT_DISABLE_ENABLE_PF_TLV 0x00000001 21338c2ecf20Sopenharmony_ci #define SHMEM_DCC_SUPPORT_BANDWIDTH_ALLOCATION_TLV 0x00000004 21348c2ecf20Sopenharmony_ci #define SHMEM_DCC_SUPPORT_CHANGE_MAC_ADDRESS_TLV 0x00000008 21358c2ecf20Sopenharmony_ci #define SHMEM_DCC_SUPPORT_SET_PROTOCOL_TLV 0x00000040 21368c2ecf20Sopenharmony_ci #define SHMEM_DCC_SUPPORT_SET_PRIORITY_TLV 0x00000080 21378c2ecf20Sopenharmony_ci 21388c2ecf20Sopenharmony_ci u32 ext_phy_fw_version2[PORT_MAX]; /* 0x0008 */ 21398c2ecf20Sopenharmony_ci /* 21408c2ecf20Sopenharmony_ci * For backwards compatibility, if the mf_cfg_addr does not exist 21418c2ecf20Sopenharmony_ci * (the size filed is smaller than 0xc) the mf_cfg resides at the 21428c2ecf20Sopenharmony_ci * end of struct shmem_region 21438c2ecf20Sopenharmony_ci */ 21448c2ecf20Sopenharmony_ci u32 mf_cfg_addr; /* 0x0010 */ 21458c2ecf20Sopenharmony_ci #define SHMEM_MF_CFG_ADDR_NONE 0x00000000 21468c2ecf20Sopenharmony_ci 21478c2ecf20Sopenharmony_ci struct fw_flr_mb flr_mb; /* 0x0014 */ 21488c2ecf20Sopenharmony_ci u32 dcbx_lldp_params_offset; /* 0x0028 */ 21498c2ecf20Sopenharmony_ci #define SHMEM_LLDP_DCBX_PARAMS_NONE 0x00000000 21508c2ecf20Sopenharmony_ci u32 dcbx_neg_res_offset; /* 0x002c */ 21518c2ecf20Sopenharmony_ci #define SHMEM_DCBX_NEG_RES_NONE 0x00000000 21528c2ecf20Sopenharmony_ci u32 dcbx_remote_mib_offset; /* 0x0030 */ 21538c2ecf20Sopenharmony_ci #define SHMEM_DCBX_REMOTE_MIB_NONE 0x00000000 21548c2ecf20Sopenharmony_ci /* 21558c2ecf20Sopenharmony_ci * The other shmemX_base_addr holds the other path's shmem address 21568c2ecf20Sopenharmony_ci * required for example in case of common phy init, or for path1 to know 21578c2ecf20Sopenharmony_ci * the address of mcp debug trace which is located in offset from shmem 21588c2ecf20Sopenharmony_ci * of path0 21598c2ecf20Sopenharmony_ci */ 21608c2ecf20Sopenharmony_ci u32 other_shmem_base_addr; /* 0x0034 */ 21618c2ecf20Sopenharmony_ci u32 other_shmem2_base_addr; /* 0x0038 */ 21628c2ecf20Sopenharmony_ci /* 21638c2ecf20Sopenharmony_ci * mcp_vf_disabled is set by the MCP to indicate the driver about VFs 21648c2ecf20Sopenharmony_ci * which were disabled/flred 21658c2ecf20Sopenharmony_ci */ 21668c2ecf20Sopenharmony_ci u32 mcp_vf_disabled[E2_VF_MAX / 32]; /* 0x003c */ 21678c2ecf20Sopenharmony_ci 21688c2ecf20Sopenharmony_ci /* 21698c2ecf20Sopenharmony_ci * drv_ack_vf_disabled is set by the PF driver to ack handled disabled 21708c2ecf20Sopenharmony_ci * VFs 21718c2ecf20Sopenharmony_ci */ 21728c2ecf20Sopenharmony_ci u32 drv_ack_vf_disabled[E2_FUNC_MAX][E2_VF_MAX / 32]; /* 0x0044 */ 21738c2ecf20Sopenharmony_ci 21748c2ecf20Sopenharmony_ci u32 dcbx_lldp_dcbx_stat_offset; /* 0x0064 */ 21758c2ecf20Sopenharmony_ci #define SHMEM_LLDP_DCBX_STAT_NONE 0x00000000 21768c2ecf20Sopenharmony_ci 21778c2ecf20Sopenharmony_ci /* 21788c2ecf20Sopenharmony_ci * edebug_driver_if field is used to transfer messages between edebug 21798c2ecf20Sopenharmony_ci * app to the driver through shmem2. 21808c2ecf20Sopenharmony_ci * 21818c2ecf20Sopenharmony_ci * message format: 21828c2ecf20Sopenharmony_ci * bits 0-2 - function number / instance of driver to perform request 21838c2ecf20Sopenharmony_ci * bits 3-5 - op code / is_ack? 21848c2ecf20Sopenharmony_ci * bits 6-63 - data 21858c2ecf20Sopenharmony_ci */ 21868c2ecf20Sopenharmony_ci u32 edebug_driver_if[2]; /* 0x0068 */ 21878c2ecf20Sopenharmony_ci #define EDEBUG_DRIVER_IF_OP_CODE_GET_PHYS_ADDR 1 21888c2ecf20Sopenharmony_ci #define EDEBUG_DRIVER_IF_OP_CODE_GET_BUS_ADDR 2 21898c2ecf20Sopenharmony_ci #define EDEBUG_DRIVER_IF_OP_CODE_DISABLE_STAT 3 21908c2ecf20Sopenharmony_ci 21918c2ecf20Sopenharmony_ci u32 nvm_retain_bitmap_addr; /* 0x0070 */ 21928c2ecf20Sopenharmony_ci 21938c2ecf20Sopenharmony_ci /* afex support of that driver */ 21948c2ecf20Sopenharmony_ci u32 afex_driver_support; /* 0x0074 */ 21958c2ecf20Sopenharmony_ci #define SHMEM_AFEX_VERSION_MASK 0x100f 21968c2ecf20Sopenharmony_ci #define SHMEM_AFEX_SUPPORTED_VERSION_ONE 0x1001 21978c2ecf20Sopenharmony_ci #define SHMEM_AFEX_REDUCED_DRV_LOADED 0x8000 21988c2ecf20Sopenharmony_ci 21998c2ecf20Sopenharmony_ci /* driver receives addr in scratchpad to which it should respond */ 22008c2ecf20Sopenharmony_ci u32 afex_scratchpad_addr_to_write[E2_FUNC_MAX]; 22018c2ecf20Sopenharmony_ci 22028c2ecf20Sopenharmony_ci /* generic params from MCP to driver (value depends on the msg sent 22038c2ecf20Sopenharmony_ci * to driver 22048c2ecf20Sopenharmony_ci */ 22058c2ecf20Sopenharmony_ci u32 afex_param1_to_driver[E2_FUNC_MAX]; /* 0x0088 */ 22068c2ecf20Sopenharmony_ci u32 afex_param2_to_driver[E2_FUNC_MAX]; /* 0x0098 */ 22078c2ecf20Sopenharmony_ci 22088c2ecf20Sopenharmony_ci u32 swim_base_addr; /* 0x0108 */ 22098c2ecf20Sopenharmony_ci u32 swim_funcs; 22108c2ecf20Sopenharmony_ci u32 swim_main_cb; 22118c2ecf20Sopenharmony_ci 22128c2ecf20Sopenharmony_ci /* bitmap notifying which VIF profiles stored in nvram are enabled by 22138c2ecf20Sopenharmony_ci * switch 22148c2ecf20Sopenharmony_ci */ 22158c2ecf20Sopenharmony_ci u32 afex_profiles_enabled[2]; 22168c2ecf20Sopenharmony_ci 22178c2ecf20Sopenharmony_ci /* generic flags controlled by the driver */ 22188c2ecf20Sopenharmony_ci u32 drv_flags; 22198c2ecf20Sopenharmony_ci #define DRV_FLAGS_DCB_CONFIGURED 0x0 22208c2ecf20Sopenharmony_ci #define DRV_FLAGS_DCB_CONFIGURATION_ABORTED 0x1 22218c2ecf20Sopenharmony_ci #define DRV_FLAGS_DCB_MFW_CONFIGURED 0x2 22228c2ecf20Sopenharmony_ci 22238c2ecf20Sopenharmony_ci #define DRV_FLAGS_PORT_MASK ((1 << DRV_FLAGS_DCB_CONFIGURED) | \ 22248c2ecf20Sopenharmony_ci (1 << DRV_FLAGS_DCB_CONFIGURATION_ABORTED) | \ 22258c2ecf20Sopenharmony_ci (1 << DRV_FLAGS_DCB_MFW_CONFIGURED)) 22268c2ecf20Sopenharmony_ci /* pointer to extended dev_info shared data copied from nvm image */ 22278c2ecf20Sopenharmony_ci u32 extended_dev_info_shared_addr; 22288c2ecf20Sopenharmony_ci u32 ncsi_oem_data_addr; 22298c2ecf20Sopenharmony_ci 22308c2ecf20Sopenharmony_ci u32 ocsd_host_addr; /* initialized by option ROM */ 22318c2ecf20Sopenharmony_ci u32 ocbb_host_addr; /* initialized by option ROM */ 22328c2ecf20Sopenharmony_ci u32 ocsd_req_update_interval; /* initialized by option ROM */ 22338c2ecf20Sopenharmony_ci u32 temperature_in_half_celsius; 22348c2ecf20Sopenharmony_ci u32 glob_struct_in_host; 22358c2ecf20Sopenharmony_ci 22368c2ecf20Sopenharmony_ci u32 dcbx_neg_res_ext_offset; 22378c2ecf20Sopenharmony_ci#define SHMEM_DCBX_NEG_RES_EXT_NONE 0x00000000 22388c2ecf20Sopenharmony_ci 22398c2ecf20Sopenharmony_ci u32 drv_capabilities_flag[E2_FUNC_MAX]; 22408c2ecf20Sopenharmony_ci#define DRV_FLAGS_CAPABILITIES_LOADED_SUPPORTED 0x00000001 22418c2ecf20Sopenharmony_ci#define DRV_FLAGS_CAPABILITIES_LOADED_L2 0x00000002 22428c2ecf20Sopenharmony_ci#define DRV_FLAGS_CAPABILITIES_LOADED_FCOE 0x00000004 22438c2ecf20Sopenharmony_ci#define DRV_FLAGS_CAPABILITIES_LOADED_ISCSI 0x00000008 22448c2ecf20Sopenharmony_ci#define DRV_FLAGS_MTU_MASK 0xffff0000 22458c2ecf20Sopenharmony_ci#define DRV_FLAGS_MTU_SHIFT 16 22468c2ecf20Sopenharmony_ci 22478c2ecf20Sopenharmony_ci u32 extended_dev_info_shared_cfg_size; 22488c2ecf20Sopenharmony_ci 22498c2ecf20Sopenharmony_ci u32 dcbx_en[PORT_MAX]; 22508c2ecf20Sopenharmony_ci 22518c2ecf20Sopenharmony_ci /* The offset points to the multi threaded meta structure */ 22528c2ecf20Sopenharmony_ci u32 multi_thread_data_offset; 22538c2ecf20Sopenharmony_ci 22548c2ecf20Sopenharmony_ci /* address of DMAable host address holding values from the drivers */ 22558c2ecf20Sopenharmony_ci u32 drv_info_host_addr_lo; 22568c2ecf20Sopenharmony_ci u32 drv_info_host_addr_hi; 22578c2ecf20Sopenharmony_ci 22588c2ecf20Sopenharmony_ci /* general values written by the MFW (such as current version) */ 22598c2ecf20Sopenharmony_ci u32 drv_info_control; 22608c2ecf20Sopenharmony_ci#define DRV_INFO_CONTROL_VER_MASK 0x000000ff 22618c2ecf20Sopenharmony_ci#define DRV_INFO_CONTROL_VER_SHIFT 0 22628c2ecf20Sopenharmony_ci#define DRV_INFO_CONTROL_OP_CODE_MASK 0x0000ff00 22638c2ecf20Sopenharmony_ci#define DRV_INFO_CONTROL_OP_CODE_SHIFT 8 22648c2ecf20Sopenharmony_ci u32 ibft_host_addr; /* initialized by option ROM */ 22658c2ecf20Sopenharmony_ci struct eee_remote_vals eee_remote_vals[PORT_MAX]; 22668c2ecf20Sopenharmony_ci u32 reserved[E2_FUNC_MAX]; 22678c2ecf20Sopenharmony_ci 22688c2ecf20Sopenharmony_ci 22698c2ecf20Sopenharmony_ci /* the status of EEE auto-negotiation 22708c2ecf20Sopenharmony_ci * bits 15:0 the configured tx-lpi entry timer value. Depends on bit 31. 22718c2ecf20Sopenharmony_ci * bits 19:16 the supported modes for EEE. 22728c2ecf20Sopenharmony_ci * bits 23:20 the speeds advertised for EEE. 22738c2ecf20Sopenharmony_ci * bits 27:24 the speeds the Link partner advertised for EEE. 22748c2ecf20Sopenharmony_ci * The supported/adv. modes in bits 27:19 originate from the 22758c2ecf20Sopenharmony_ci * SHMEM_EEE_XXX_ADV definitions (where XXX is replaced by speed). 22768c2ecf20Sopenharmony_ci * bit 28 when 1'b1 EEE was requested. 22778c2ecf20Sopenharmony_ci * bit 29 when 1'b1 tx lpi was requested. 22788c2ecf20Sopenharmony_ci * bit 30 when 1'b1 EEE was negotiated. Tx lpi will be asserted iff 22798c2ecf20Sopenharmony_ci * 30:29 are 2'b11. 22808c2ecf20Sopenharmony_ci * bit 31 when 1'b0 bits 15:0 contain a PORT_FEAT_CFG_EEE_ define as 22818c2ecf20Sopenharmony_ci * value. When 1'b1 those bits contains a value times 16 microseconds. 22828c2ecf20Sopenharmony_ci */ 22838c2ecf20Sopenharmony_ci u32 eee_status[PORT_MAX]; 22848c2ecf20Sopenharmony_ci #define SHMEM_EEE_TIMER_MASK 0x0000ffff 22858c2ecf20Sopenharmony_ci #define SHMEM_EEE_SUPPORTED_MASK 0x000f0000 22868c2ecf20Sopenharmony_ci #define SHMEM_EEE_SUPPORTED_SHIFT 16 22878c2ecf20Sopenharmony_ci #define SHMEM_EEE_ADV_STATUS_MASK 0x00f00000 22888c2ecf20Sopenharmony_ci #define SHMEM_EEE_100M_ADV (1<<0) 22898c2ecf20Sopenharmony_ci #define SHMEM_EEE_1G_ADV (1<<1) 22908c2ecf20Sopenharmony_ci #define SHMEM_EEE_10G_ADV (1<<2) 22918c2ecf20Sopenharmony_ci #define SHMEM_EEE_ADV_STATUS_SHIFT 20 22928c2ecf20Sopenharmony_ci #define SHMEM_EEE_LP_ADV_STATUS_MASK 0x0f000000 22938c2ecf20Sopenharmony_ci #define SHMEM_EEE_LP_ADV_STATUS_SHIFT 24 22948c2ecf20Sopenharmony_ci #define SHMEM_EEE_REQUESTED_BIT 0x10000000 22958c2ecf20Sopenharmony_ci #define SHMEM_EEE_LPI_REQUESTED_BIT 0x20000000 22968c2ecf20Sopenharmony_ci #define SHMEM_EEE_ACTIVE_BIT 0x40000000 22978c2ecf20Sopenharmony_ci #define SHMEM_EEE_TIME_OUTPUT_BIT 0x80000000 22988c2ecf20Sopenharmony_ci 22998c2ecf20Sopenharmony_ci u32 sizeof_port_stats; 23008c2ecf20Sopenharmony_ci 23018c2ecf20Sopenharmony_ci /* Link Flap Avoidance */ 23028c2ecf20Sopenharmony_ci u32 lfa_host_addr[PORT_MAX]; 23038c2ecf20Sopenharmony_ci u32 reserved1; 23048c2ecf20Sopenharmony_ci 23058c2ecf20Sopenharmony_ci u32 reserved2; /* Offset 0x148 */ 23068c2ecf20Sopenharmony_ci u32 reserved3; /* Offset 0x14C */ 23078c2ecf20Sopenharmony_ci u32 reserved4; /* Offset 0x150 */ 23088c2ecf20Sopenharmony_ci u32 link_attr_sync[PORT_MAX]; /* Offset 0x154 */ 23098c2ecf20Sopenharmony_ci #define LINK_ATTR_SYNC_KR2_ENABLE 0x00000001 23108c2ecf20Sopenharmony_ci #define LINK_ATTR_84858 0x00000002 23118c2ecf20Sopenharmony_ci #define LINK_SFP_EEPROM_COMP_CODE_MASK 0x0000ff00 23128c2ecf20Sopenharmony_ci #define LINK_SFP_EEPROM_COMP_CODE_SHIFT 8 23138c2ecf20Sopenharmony_ci #define LINK_SFP_EEPROM_COMP_CODE_SR 0x00001000 23148c2ecf20Sopenharmony_ci #define LINK_SFP_EEPROM_COMP_CODE_LR 0x00002000 23158c2ecf20Sopenharmony_ci #define LINK_SFP_EEPROM_COMP_CODE_LRM 0x00004000 23168c2ecf20Sopenharmony_ci 23178c2ecf20Sopenharmony_ci u32 reserved5[2]; 23188c2ecf20Sopenharmony_ci u32 link_change_count[PORT_MAX]; /* Offset 0x160-0x164 */ 23198c2ecf20Sopenharmony_ci #define LINK_CHANGE_COUNT_MASK 0xff /* Offset 0x168 */ 23208c2ecf20Sopenharmony_ci /* driver version for each personality */ 23218c2ecf20Sopenharmony_ci struct os_drv_ver func_os_drv_ver[E2_FUNC_MAX]; /* Offset 0x16c */ 23228c2ecf20Sopenharmony_ci 23238c2ecf20Sopenharmony_ci /* Flag to the driver that PF's drv_info_host_addr buffer was read */ 23248c2ecf20Sopenharmony_ci u32 mfw_drv_indication; 23258c2ecf20Sopenharmony_ci 23268c2ecf20Sopenharmony_ci /* We use indication for each PF (0..3) */ 23278c2ecf20Sopenharmony_ci#define MFW_DRV_IND_READ_DONE_OFFSET(_pf_) (1 << (_pf_)) 23288c2ecf20Sopenharmony_ci union { /* For various OEMs */ /* Offset 0x1a0 */ 23298c2ecf20Sopenharmony_ci u8 storage_boot_prog[E2_FUNC_MAX]; 23308c2ecf20Sopenharmony_ci #define STORAGE_BOOT_PROG_MASK 0x000000FF 23318c2ecf20Sopenharmony_ci #define STORAGE_BOOT_PROG_NONE 0x00000000 23328c2ecf20Sopenharmony_ci #define STORAGE_BOOT_PROG_ISCSI_IP_ACQUIRED 0x00000002 23338c2ecf20Sopenharmony_ci #define STORAGE_BOOT_PROG_FCOE_FABRIC_LOGIN_SUCCESS 0x00000002 23348c2ecf20Sopenharmony_ci #define STORAGE_BOOT_PROG_TARGET_FOUND 0x00000004 23358c2ecf20Sopenharmony_ci #define STORAGE_BOOT_PROG_ISCSI_CHAP_SUCCESS 0x00000008 23368c2ecf20Sopenharmony_ci #define STORAGE_BOOT_PROG_FCOE_LUN_FOUND 0x00000008 23378c2ecf20Sopenharmony_ci #define STORAGE_BOOT_PROG_LOGGED_INTO_TGT 0x00000010 23388c2ecf20Sopenharmony_ci #define STORAGE_BOOT_PROG_IMG_DOWNLOADED 0x00000020 23398c2ecf20Sopenharmony_ci #define STORAGE_BOOT_PROG_OS_HANDOFF 0x00000040 23408c2ecf20Sopenharmony_ci #define STORAGE_BOOT_PROG_COMPLETED 0x00000080 23418c2ecf20Sopenharmony_ci 23428c2ecf20Sopenharmony_ci u32 oem_i2c_data_addr; 23438c2ecf20Sopenharmony_ci }; 23448c2ecf20Sopenharmony_ci 23458c2ecf20Sopenharmony_ci /* 9 entires for the C2S PCP map for each inner VLAN PCP + 1 default */ 23468c2ecf20Sopenharmony_ci /* For PCP values 0-3 use the map lower */ 23478c2ecf20Sopenharmony_ci /* 0xFF000000 - PCP 0, 0x00FF0000 - PCP 1, 23488c2ecf20Sopenharmony_ci * 0x0000FF00 - PCP 2, 0x000000FF PCP 3 23498c2ecf20Sopenharmony_ci */ 23508c2ecf20Sopenharmony_ci u32 c2s_pcp_map_lower[E2_FUNC_MAX]; /* 0x1a4 */ 23518c2ecf20Sopenharmony_ci 23528c2ecf20Sopenharmony_ci /* For PCP values 4-7 use the map upper */ 23538c2ecf20Sopenharmony_ci /* 0xFF000000 - PCP 4, 0x00FF0000 - PCP 5, 23548c2ecf20Sopenharmony_ci * 0x0000FF00 - PCP 6, 0x000000FF PCP 7 23558c2ecf20Sopenharmony_ci */ 23568c2ecf20Sopenharmony_ci u32 c2s_pcp_map_upper[E2_FUNC_MAX]; /* 0x1b4 */ 23578c2ecf20Sopenharmony_ci 23588c2ecf20Sopenharmony_ci /* For PCP default value get the MSB byte of the map default */ 23598c2ecf20Sopenharmony_ci u32 c2s_pcp_map_default[E2_FUNC_MAX]; /* 0x1c4 */ 23608c2ecf20Sopenharmony_ci 23618c2ecf20Sopenharmony_ci /* FC_NPIV table offset in NVRAM */ 23628c2ecf20Sopenharmony_ci u32 fc_npiv_nvram_tbl_addr[PORT_MAX]; /* 0x1d4 */ 23638c2ecf20Sopenharmony_ci 23648c2ecf20Sopenharmony_ci /* Shows last method that changed configuration of this device */ 23658c2ecf20Sopenharmony_ci enum curr_cfg_method_e curr_cfg; /* 0x1dc */ 23668c2ecf20Sopenharmony_ci 23678c2ecf20Sopenharmony_ci /* Storm FW version, shold be kept in the format 0xMMmmbbdd: 23688c2ecf20Sopenharmony_ci * MM - Major, mm - Minor, bb - Build ,dd - Drop 23698c2ecf20Sopenharmony_ci */ 23708c2ecf20Sopenharmony_ci u32 netproc_fw_ver; /* 0x1e0 */ 23718c2ecf20Sopenharmony_ci 23728c2ecf20Sopenharmony_ci /* Option ROM SMASH CLP version */ 23738c2ecf20Sopenharmony_ci u32 clp_ver; /* 0x1e4 */ 23748c2ecf20Sopenharmony_ci 23758c2ecf20Sopenharmony_ci u32 pcie_bus_num; /* 0x1e8 */ 23768c2ecf20Sopenharmony_ci 23778c2ecf20Sopenharmony_ci u32 sriov_switch_mode; /* 0x1ec */ 23788c2ecf20Sopenharmony_ci #define SRIOV_SWITCH_MODE_NONE 0x0 23798c2ecf20Sopenharmony_ci #define SRIOV_SWITCH_MODE_VEB 0x1 23808c2ecf20Sopenharmony_ci #define SRIOV_SWITCH_MODE_VEPA 0x2 23818c2ecf20Sopenharmony_ci 23828c2ecf20Sopenharmony_ci u8 rsrv2[E2_FUNC_MAX]; /* 0x1f0 */ 23838c2ecf20Sopenharmony_ci 23848c2ecf20Sopenharmony_ci u32 img_inv_table_addr; /* Address to INV_TABLE_P */ /* 0x1f4 */ 23858c2ecf20Sopenharmony_ci 23868c2ecf20Sopenharmony_ci u32 mtu_size[E2_FUNC_MAX]; /* 0x1f8 */ 23878c2ecf20Sopenharmony_ci 23888c2ecf20Sopenharmony_ci u32 os_driver_state[E2_FUNC_MAX]; /* 0x208 */ 23898c2ecf20Sopenharmony_ci #define OS_DRIVER_STATE_NOT_LOADED 0 /* not installed */ 23908c2ecf20Sopenharmony_ci #define OS_DRIVER_STATE_LOADING 1 /* transition state */ 23918c2ecf20Sopenharmony_ci #define OS_DRIVER_STATE_DISABLED 2 /* installed but disabled */ 23928c2ecf20Sopenharmony_ci #define OS_DRIVER_STATE_ACTIVE 3 /* installed and active */ 23938c2ecf20Sopenharmony_ci 23948c2ecf20Sopenharmony_ci /* mini dump driver info */ 23958c2ecf20Sopenharmony_ci struct mdump_driver_info drv_info; /* 0x218 */ 23968c2ecf20Sopenharmony_ci}; 23978c2ecf20Sopenharmony_ci 23988c2ecf20Sopenharmony_ci 23998c2ecf20Sopenharmony_cistruct emac_stats { 24008c2ecf20Sopenharmony_ci u32 rx_stat_ifhcinoctets; 24018c2ecf20Sopenharmony_ci u32 rx_stat_ifhcinbadoctets; 24028c2ecf20Sopenharmony_ci u32 rx_stat_etherstatsfragments; 24038c2ecf20Sopenharmony_ci u32 rx_stat_ifhcinucastpkts; 24048c2ecf20Sopenharmony_ci u32 rx_stat_ifhcinmulticastpkts; 24058c2ecf20Sopenharmony_ci u32 rx_stat_ifhcinbroadcastpkts; 24068c2ecf20Sopenharmony_ci u32 rx_stat_dot3statsfcserrors; 24078c2ecf20Sopenharmony_ci u32 rx_stat_dot3statsalignmenterrors; 24088c2ecf20Sopenharmony_ci u32 rx_stat_dot3statscarriersenseerrors; 24098c2ecf20Sopenharmony_ci u32 rx_stat_xonpauseframesreceived; 24108c2ecf20Sopenharmony_ci u32 rx_stat_xoffpauseframesreceived; 24118c2ecf20Sopenharmony_ci u32 rx_stat_maccontrolframesreceived; 24128c2ecf20Sopenharmony_ci u32 rx_stat_xoffstateentered; 24138c2ecf20Sopenharmony_ci u32 rx_stat_dot3statsframestoolong; 24148c2ecf20Sopenharmony_ci u32 rx_stat_etherstatsjabbers; 24158c2ecf20Sopenharmony_ci u32 rx_stat_etherstatsundersizepkts; 24168c2ecf20Sopenharmony_ci u32 rx_stat_etherstatspkts64octets; 24178c2ecf20Sopenharmony_ci u32 rx_stat_etherstatspkts65octetsto127octets; 24188c2ecf20Sopenharmony_ci u32 rx_stat_etherstatspkts128octetsto255octets; 24198c2ecf20Sopenharmony_ci u32 rx_stat_etherstatspkts256octetsto511octets; 24208c2ecf20Sopenharmony_ci u32 rx_stat_etherstatspkts512octetsto1023octets; 24218c2ecf20Sopenharmony_ci u32 rx_stat_etherstatspkts1024octetsto1522octets; 24228c2ecf20Sopenharmony_ci u32 rx_stat_etherstatspktsover1522octets; 24238c2ecf20Sopenharmony_ci 24248c2ecf20Sopenharmony_ci u32 rx_stat_falsecarriererrors; 24258c2ecf20Sopenharmony_ci 24268c2ecf20Sopenharmony_ci u32 tx_stat_ifhcoutoctets; 24278c2ecf20Sopenharmony_ci u32 tx_stat_ifhcoutbadoctets; 24288c2ecf20Sopenharmony_ci u32 tx_stat_etherstatscollisions; 24298c2ecf20Sopenharmony_ci u32 tx_stat_outxonsent; 24308c2ecf20Sopenharmony_ci u32 tx_stat_outxoffsent; 24318c2ecf20Sopenharmony_ci u32 tx_stat_flowcontroldone; 24328c2ecf20Sopenharmony_ci u32 tx_stat_dot3statssinglecollisionframes; 24338c2ecf20Sopenharmony_ci u32 tx_stat_dot3statsmultiplecollisionframes; 24348c2ecf20Sopenharmony_ci u32 tx_stat_dot3statsdeferredtransmissions; 24358c2ecf20Sopenharmony_ci u32 tx_stat_dot3statsexcessivecollisions; 24368c2ecf20Sopenharmony_ci u32 tx_stat_dot3statslatecollisions; 24378c2ecf20Sopenharmony_ci u32 tx_stat_ifhcoutucastpkts; 24388c2ecf20Sopenharmony_ci u32 tx_stat_ifhcoutmulticastpkts; 24398c2ecf20Sopenharmony_ci u32 tx_stat_ifhcoutbroadcastpkts; 24408c2ecf20Sopenharmony_ci u32 tx_stat_etherstatspkts64octets; 24418c2ecf20Sopenharmony_ci u32 tx_stat_etherstatspkts65octetsto127octets; 24428c2ecf20Sopenharmony_ci u32 tx_stat_etherstatspkts128octetsto255octets; 24438c2ecf20Sopenharmony_ci u32 tx_stat_etherstatspkts256octetsto511octets; 24448c2ecf20Sopenharmony_ci u32 tx_stat_etherstatspkts512octetsto1023octets; 24458c2ecf20Sopenharmony_ci u32 tx_stat_etherstatspkts1024octetsto1522octets; 24468c2ecf20Sopenharmony_ci u32 tx_stat_etherstatspktsover1522octets; 24478c2ecf20Sopenharmony_ci u32 tx_stat_dot3statsinternalmactransmiterrors; 24488c2ecf20Sopenharmony_ci}; 24498c2ecf20Sopenharmony_ci 24508c2ecf20Sopenharmony_ci 24518c2ecf20Sopenharmony_cistruct bmac1_stats { 24528c2ecf20Sopenharmony_ci u32 tx_stat_gtpkt_lo; 24538c2ecf20Sopenharmony_ci u32 tx_stat_gtpkt_hi; 24548c2ecf20Sopenharmony_ci u32 tx_stat_gtxpf_lo; 24558c2ecf20Sopenharmony_ci u32 tx_stat_gtxpf_hi; 24568c2ecf20Sopenharmony_ci u32 tx_stat_gtfcs_lo; 24578c2ecf20Sopenharmony_ci u32 tx_stat_gtfcs_hi; 24588c2ecf20Sopenharmony_ci u32 tx_stat_gtmca_lo; 24598c2ecf20Sopenharmony_ci u32 tx_stat_gtmca_hi; 24608c2ecf20Sopenharmony_ci u32 tx_stat_gtbca_lo; 24618c2ecf20Sopenharmony_ci u32 tx_stat_gtbca_hi; 24628c2ecf20Sopenharmony_ci u32 tx_stat_gtfrg_lo; 24638c2ecf20Sopenharmony_ci u32 tx_stat_gtfrg_hi; 24648c2ecf20Sopenharmony_ci u32 tx_stat_gtovr_lo; 24658c2ecf20Sopenharmony_ci u32 tx_stat_gtovr_hi; 24668c2ecf20Sopenharmony_ci u32 tx_stat_gt64_lo; 24678c2ecf20Sopenharmony_ci u32 tx_stat_gt64_hi; 24688c2ecf20Sopenharmony_ci u32 tx_stat_gt127_lo; 24698c2ecf20Sopenharmony_ci u32 tx_stat_gt127_hi; 24708c2ecf20Sopenharmony_ci u32 tx_stat_gt255_lo; 24718c2ecf20Sopenharmony_ci u32 tx_stat_gt255_hi; 24728c2ecf20Sopenharmony_ci u32 tx_stat_gt511_lo; 24738c2ecf20Sopenharmony_ci u32 tx_stat_gt511_hi; 24748c2ecf20Sopenharmony_ci u32 tx_stat_gt1023_lo; 24758c2ecf20Sopenharmony_ci u32 tx_stat_gt1023_hi; 24768c2ecf20Sopenharmony_ci u32 tx_stat_gt1518_lo; 24778c2ecf20Sopenharmony_ci u32 tx_stat_gt1518_hi; 24788c2ecf20Sopenharmony_ci u32 tx_stat_gt2047_lo; 24798c2ecf20Sopenharmony_ci u32 tx_stat_gt2047_hi; 24808c2ecf20Sopenharmony_ci u32 tx_stat_gt4095_lo; 24818c2ecf20Sopenharmony_ci u32 tx_stat_gt4095_hi; 24828c2ecf20Sopenharmony_ci u32 tx_stat_gt9216_lo; 24838c2ecf20Sopenharmony_ci u32 tx_stat_gt9216_hi; 24848c2ecf20Sopenharmony_ci u32 tx_stat_gt16383_lo; 24858c2ecf20Sopenharmony_ci u32 tx_stat_gt16383_hi; 24868c2ecf20Sopenharmony_ci u32 tx_stat_gtmax_lo; 24878c2ecf20Sopenharmony_ci u32 tx_stat_gtmax_hi; 24888c2ecf20Sopenharmony_ci u32 tx_stat_gtufl_lo; 24898c2ecf20Sopenharmony_ci u32 tx_stat_gtufl_hi; 24908c2ecf20Sopenharmony_ci u32 tx_stat_gterr_lo; 24918c2ecf20Sopenharmony_ci u32 tx_stat_gterr_hi; 24928c2ecf20Sopenharmony_ci u32 tx_stat_gtbyt_lo; 24938c2ecf20Sopenharmony_ci u32 tx_stat_gtbyt_hi; 24948c2ecf20Sopenharmony_ci 24958c2ecf20Sopenharmony_ci u32 rx_stat_gr64_lo; 24968c2ecf20Sopenharmony_ci u32 rx_stat_gr64_hi; 24978c2ecf20Sopenharmony_ci u32 rx_stat_gr127_lo; 24988c2ecf20Sopenharmony_ci u32 rx_stat_gr127_hi; 24998c2ecf20Sopenharmony_ci u32 rx_stat_gr255_lo; 25008c2ecf20Sopenharmony_ci u32 rx_stat_gr255_hi; 25018c2ecf20Sopenharmony_ci u32 rx_stat_gr511_lo; 25028c2ecf20Sopenharmony_ci u32 rx_stat_gr511_hi; 25038c2ecf20Sopenharmony_ci u32 rx_stat_gr1023_lo; 25048c2ecf20Sopenharmony_ci u32 rx_stat_gr1023_hi; 25058c2ecf20Sopenharmony_ci u32 rx_stat_gr1518_lo; 25068c2ecf20Sopenharmony_ci u32 rx_stat_gr1518_hi; 25078c2ecf20Sopenharmony_ci u32 rx_stat_gr2047_lo; 25088c2ecf20Sopenharmony_ci u32 rx_stat_gr2047_hi; 25098c2ecf20Sopenharmony_ci u32 rx_stat_gr4095_lo; 25108c2ecf20Sopenharmony_ci u32 rx_stat_gr4095_hi; 25118c2ecf20Sopenharmony_ci u32 rx_stat_gr9216_lo; 25128c2ecf20Sopenharmony_ci u32 rx_stat_gr9216_hi; 25138c2ecf20Sopenharmony_ci u32 rx_stat_gr16383_lo; 25148c2ecf20Sopenharmony_ci u32 rx_stat_gr16383_hi; 25158c2ecf20Sopenharmony_ci u32 rx_stat_grmax_lo; 25168c2ecf20Sopenharmony_ci u32 rx_stat_grmax_hi; 25178c2ecf20Sopenharmony_ci u32 rx_stat_grpkt_lo; 25188c2ecf20Sopenharmony_ci u32 rx_stat_grpkt_hi; 25198c2ecf20Sopenharmony_ci u32 rx_stat_grfcs_lo; 25208c2ecf20Sopenharmony_ci u32 rx_stat_grfcs_hi; 25218c2ecf20Sopenharmony_ci u32 rx_stat_grmca_lo; 25228c2ecf20Sopenharmony_ci u32 rx_stat_grmca_hi; 25238c2ecf20Sopenharmony_ci u32 rx_stat_grbca_lo; 25248c2ecf20Sopenharmony_ci u32 rx_stat_grbca_hi; 25258c2ecf20Sopenharmony_ci u32 rx_stat_grxcf_lo; 25268c2ecf20Sopenharmony_ci u32 rx_stat_grxcf_hi; 25278c2ecf20Sopenharmony_ci u32 rx_stat_grxpf_lo; 25288c2ecf20Sopenharmony_ci u32 rx_stat_grxpf_hi; 25298c2ecf20Sopenharmony_ci u32 rx_stat_grxuo_lo; 25308c2ecf20Sopenharmony_ci u32 rx_stat_grxuo_hi; 25318c2ecf20Sopenharmony_ci u32 rx_stat_grjbr_lo; 25328c2ecf20Sopenharmony_ci u32 rx_stat_grjbr_hi; 25338c2ecf20Sopenharmony_ci u32 rx_stat_grovr_lo; 25348c2ecf20Sopenharmony_ci u32 rx_stat_grovr_hi; 25358c2ecf20Sopenharmony_ci u32 rx_stat_grflr_lo; 25368c2ecf20Sopenharmony_ci u32 rx_stat_grflr_hi; 25378c2ecf20Sopenharmony_ci u32 rx_stat_grmeg_lo; 25388c2ecf20Sopenharmony_ci u32 rx_stat_grmeg_hi; 25398c2ecf20Sopenharmony_ci u32 rx_stat_grmeb_lo; 25408c2ecf20Sopenharmony_ci u32 rx_stat_grmeb_hi; 25418c2ecf20Sopenharmony_ci u32 rx_stat_grbyt_lo; 25428c2ecf20Sopenharmony_ci u32 rx_stat_grbyt_hi; 25438c2ecf20Sopenharmony_ci u32 rx_stat_grund_lo; 25448c2ecf20Sopenharmony_ci u32 rx_stat_grund_hi; 25458c2ecf20Sopenharmony_ci u32 rx_stat_grfrg_lo; 25468c2ecf20Sopenharmony_ci u32 rx_stat_grfrg_hi; 25478c2ecf20Sopenharmony_ci u32 rx_stat_grerb_lo; 25488c2ecf20Sopenharmony_ci u32 rx_stat_grerb_hi; 25498c2ecf20Sopenharmony_ci u32 rx_stat_grfre_lo; 25508c2ecf20Sopenharmony_ci u32 rx_stat_grfre_hi; 25518c2ecf20Sopenharmony_ci u32 rx_stat_gripj_lo; 25528c2ecf20Sopenharmony_ci u32 rx_stat_gripj_hi; 25538c2ecf20Sopenharmony_ci}; 25548c2ecf20Sopenharmony_ci 25558c2ecf20Sopenharmony_cistruct bmac2_stats { 25568c2ecf20Sopenharmony_ci u32 tx_stat_gtpk_lo; /* gtpok */ 25578c2ecf20Sopenharmony_ci u32 tx_stat_gtpk_hi; /* gtpok */ 25588c2ecf20Sopenharmony_ci u32 tx_stat_gtxpf_lo; /* gtpf */ 25598c2ecf20Sopenharmony_ci u32 tx_stat_gtxpf_hi; /* gtpf */ 25608c2ecf20Sopenharmony_ci u32 tx_stat_gtpp_lo; /* NEW BMAC2 */ 25618c2ecf20Sopenharmony_ci u32 tx_stat_gtpp_hi; /* NEW BMAC2 */ 25628c2ecf20Sopenharmony_ci u32 tx_stat_gtfcs_lo; 25638c2ecf20Sopenharmony_ci u32 tx_stat_gtfcs_hi; 25648c2ecf20Sopenharmony_ci u32 tx_stat_gtuca_lo; /* NEW BMAC2 */ 25658c2ecf20Sopenharmony_ci u32 tx_stat_gtuca_hi; /* NEW BMAC2 */ 25668c2ecf20Sopenharmony_ci u32 tx_stat_gtmca_lo; 25678c2ecf20Sopenharmony_ci u32 tx_stat_gtmca_hi; 25688c2ecf20Sopenharmony_ci u32 tx_stat_gtbca_lo; 25698c2ecf20Sopenharmony_ci u32 tx_stat_gtbca_hi; 25708c2ecf20Sopenharmony_ci u32 tx_stat_gtovr_lo; 25718c2ecf20Sopenharmony_ci u32 tx_stat_gtovr_hi; 25728c2ecf20Sopenharmony_ci u32 tx_stat_gtfrg_lo; 25738c2ecf20Sopenharmony_ci u32 tx_stat_gtfrg_hi; 25748c2ecf20Sopenharmony_ci u32 tx_stat_gtpkt1_lo; /* gtpkt */ 25758c2ecf20Sopenharmony_ci u32 tx_stat_gtpkt1_hi; /* gtpkt */ 25768c2ecf20Sopenharmony_ci u32 tx_stat_gt64_lo; 25778c2ecf20Sopenharmony_ci u32 tx_stat_gt64_hi; 25788c2ecf20Sopenharmony_ci u32 tx_stat_gt127_lo; 25798c2ecf20Sopenharmony_ci u32 tx_stat_gt127_hi; 25808c2ecf20Sopenharmony_ci u32 tx_stat_gt255_lo; 25818c2ecf20Sopenharmony_ci u32 tx_stat_gt255_hi; 25828c2ecf20Sopenharmony_ci u32 tx_stat_gt511_lo; 25838c2ecf20Sopenharmony_ci u32 tx_stat_gt511_hi; 25848c2ecf20Sopenharmony_ci u32 tx_stat_gt1023_lo; 25858c2ecf20Sopenharmony_ci u32 tx_stat_gt1023_hi; 25868c2ecf20Sopenharmony_ci u32 tx_stat_gt1518_lo; 25878c2ecf20Sopenharmony_ci u32 tx_stat_gt1518_hi; 25888c2ecf20Sopenharmony_ci u32 tx_stat_gt2047_lo; 25898c2ecf20Sopenharmony_ci u32 tx_stat_gt2047_hi; 25908c2ecf20Sopenharmony_ci u32 tx_stat_gt4095_lo; 25918c2ecf20Sopenharmony_ci u32 tx_stat_gt4095_hi; 25928c2ecf20Sopenharmony_ci u32 tx_stat_gt9216_lo; 25938c2ecf20Sopenharmony_ci u32 tx_stat_gt9216_hi; 25948c2ecf20Sopenharmony_ci u32 tx_stat_gt16383_lo; 25958c2ecf20Sopenharmony_ci u32 tx_stat_gt16383_hi; 25968c2ecf20Sopenharmony_ci u32 tx_stat_gtmax_lo; 25978c2ecf20Sopenharmony_ci u32 tx_stat_gtmax_hi; 25988c2ecf20Sopenharmony_ci u32 tx_stat_gtufl_lo; 25998c2ecf20Sopenharmony_ci u32 tx_stat_gtufl_hi; 26008c2ecf20Sopenharmony_ci u32 tx_stat_gterr_lo; 26018c2ecf20Sopenharmony_ci u32 tx_stat_gterr_hi; 26028c2ecf20Sopenharmony_ci u32 tx_stat_gtbyt_lo; 26038c2ecf20Sopenharmony_ci u32 tx_stat_gtbyt_hi; 26048c2ecf20Sopenharmony_ci 26058c2ecf20Sopenharmony_ci u32 rx_stat_gr64_lo; 26068c2ecf20Sopenharmony_ci u32 rx_stat_gr64_hi; 26078c2ecf20Sopenharmony_ci u32 rx_stat_gr127_lo; 26088c2ecf20Sopenharmony_ci u32 rx_stat_gr127_hi; 26098c2ecf20Sopenharmony_ci u32 rx_stat_gr255_lo; 26108c2ecf20Sopenharmony_ci u32 rx_stat_gr255_hi; 26118c2ecf20Sopenharmony_ci u32 rx_stat_gr511_lo; 26128c2ecf20Sopenharmony_ci u32 rx_stat_gr511_hi; 26138c2ecf20Sopenharmony_ci u32 rx_stat_gr1023_lo; 26148c2ecf20Sopenharmony_ci u32 rx_stat_gr1023_hi; 26158c2ecf20Sopenharmony_ci u32 rx_stat_gr1518_lo; 26168c2ecf20Sopenharmony_ci u32 rx_stat_gr1518_hi; 26178c2ecf20Sopenharmony_ci u32 rx_stat_gr2047_lo; 26188c2ecf20Sopenharmony_ci u32 rx_stat_gr2047_hi; 26198c2ecf20Sopenharmony_ci u32 rx_stat_gr4095_lo; 26208c2ecf20Sopenharmony_ci u32 rx_stat_gr4095_hi; 26218c2ecf20Sopenharmony_ci u32 rx_stat_gr9216_lo; 26228c2ecf20Sopenharmony_ci u32 rx_stat_gr9216_hi; 26238c2ecf20Sopenharmony_ci u32 rx_stat_gr16383_lo; 26248c2ecf20Sopenharmony_ci u32 rx_stat_gr16383_hi; 26258c2ecf20Sopenharmony_ci u32 rx_stat_grmax_lo; 26268c2ecf20Sopenharmony_ci u32 rx_stat_grmax_hi; 26278c2ecf20Sopenharmony_ci u32 rx_stat_grpkt_lo; 26288c2ecf20Sopenharmony_ci u32 rx_stat_grpkt_hi; 26298c2ecf20Sopenharmony_ci u32 rx_stat_grfcs_lo; 26308c2ecf20Sopenharmony_ci u32 rx_stat_grfcs_hi; 26318c2ecf20Sopenharmony_ci u32 rx_stat_gruca_lo; 26328c2ecf20Sopenharmony_ci u32 rx_stat_gruca_hi; 26338c2ecf20Sopenharmony_ci u32 rx_stat_grmca_lo; 26348c2ecf20Sopenharmony_ci u32 rx_stat_grmca_hi; 26358c2ecf20Sopenharmony_ci u32 rx_stat_grbca_lo; 26368c2ecf20Sopenharmony_ci u32 rx_stat_grbca_hi; 26378c2ecf20Sopenharmony_ci u32 rx_stat_grxpf_lo; /* grpf */ 26388c2ecf20Sopenharmony_ci u32 rx_stat_grxpf_hi; /* grpf */ 26398c2ecf20Sopenharmony_ci u32 rx_stat_grpp_lo; 26408c2ecf20Sopenharmony_ci u32 rx_stat_grpp_hi; 26418c2ecf20Sopenharmony_ci u32 rx_stat_grxuo_lo; /* gruo */ 26428c2ecf20Sopenharmony_ci u32 rx_stat_grxuo_hi; /* gruo */ 26438c2ecf20Sopenharmony_ci u32 rx_stat_grjbr_lo; 26448c2ecf20Sopenharmony_ci u32 rx_stat_grjbr_hi; 26458c2ecf20Sopenharmony_ci u32 rx_stat_grovr_lo; 26468c2ecf20Sopenharmony_ci u32 rx_stat_grovr_hi; 26478c2ecf20Sopenharmony_ci u32 rx_stat_grxcf_lo; /* grcf */ 26488c2ecf20Sopenharmony_ci u32 rx_stat_grxcf_hi; /* grcf */ 26498c2ecf20Sopenharmony_ci u32 rx_stat_grflr_lo; 26508c2ecf20Sopenharmony_ci u32 rx_stat_grflr_hi; 26518c2ecf20Sopenharmony_ci u32 rx_stat_grpok_lo; 26528c2ecf20Sopenharmony_ci u32 rx_stat_grpok_hi; 26538c2ecf20Sopenharmony_ci u32 rx_stat_grmeg_lo; 26548c2ecf20Sopenharmony_ci u32 rx_stat_grmeg_hi; 26558c2ecf20Sopenharmony_ci u32 rx_stat_grmeb_lo; 26568c2ecf20Sopenharmony_ci u32 rx_stat_grmeb_hi; 26578c2ecf20Sopenharmony_ci u32 rx_stat_grbyt_lo; 26588c2ecf20Sopenharmony_ci u32 rx_stat_grbyt_hi; 26598c2ecf20Sopenharmony_ci u32 rx_stat_grund_lo; 26608c2ecf20Sopenharmony_ci u32 rx_stat_grund_hi; 26618c2ecf20Sopenharmony_ci u32 rx_stat_grfrg_lo; 26628c2ecf20Sopenharmony_ci u32 rx_stat_grfrg_hi; 26638c2ecf20Sopenharmony_ci u32 rx_stat_grerb_lo; /* grerrbyt */ 26648c2ecf20Sopenharmony_ci u32 rx_stat_grerb_hi; /* grerrbyt */ 26658c2ecf20Sopenharmony_ci u32 rx_stat_grfre_lo; /* grfrerr */ 26668c2ecf20Sopenharmony_ci u32 rx_stat_grfre_hi; /* grfrerr */ 26678c2ecf20Sopenharmony_ci u32 rx_stat_gripj_lo; 26688c2ecf20Sopenharmony_ci u32 rx_stat_gripj_hi; 26698c2ecf20Sopenharmony_ci}; 26708c2ecf20Sopenharmony_ci 26718c2ecf20Sopenharmony_cistruct mstat_stats { 26728c2ecf20Sopenharmony_ci struct { 26738c2ecf20Sopenharmony_ci /* OTE MSTAT on E3 has a bug where this register's contents are 26748c2ecf20Sopenharmony_ci * actually tx_gtxpok + tx_gtxpf + (possibly)tx_gtxpp 26758c2ecf20Sopenharmony_ci */ 26768c2ecf20Sopenharmony_ci u32 tx_gtxpok_lo; 26778c2ecf20Sopenharmony_ci u32 tx_gtxpok_hi; 26788c2ecf20Sopenharmony_ci u32 tx_gtxpf_lo; 26798c2ecf20Sopenharmony_ci u32 tx_gtxpf_hi; 26808c2ecf20Sopenharmony_ci u32 tx_gtxpp_lo; 26818c2ecf20Sopenharmony_ci u32 tx_gtxpp_hi; 26828c2ecf20Sopenharmony_ci u32 tx_gtfcs_lo; 26838c2ecf20Sopenharmony_ci u32 tx_gtfcs_hi; 26848c2ecf20Sopenharmony_ci u32 tx_gtuca_lo; 26858c2ecf20Sopenharmony_ci u32 tx_gtuca_hi; 26868c2ecf20Sopenharmony_ci u32 tx_gtmca_lo; 26878c2ecf20Sopenharmony_ci u32 tx_gtmca_hi; 26888c2ecf20Sopenharmony_ci u32 tx_gtgca_lo; 26898c2ecf20Sopenharmony_ci u32 tx_gtgca_hi; 26908c2ecf20Sopenharmony_ci u32 tx_gtpkt_lo; 26918c2ecf20Sopenharmony_ci u32 tx_gtpkt_hi; 26928c2ecf20Sopenharmony_ci u32 tx_gt64_lo; 26938c2ecf20Sopenharmony_ci u32 tx_gt64_hi; 26948c2ecf20Sopenharmony_ci u32 tx_gt127_lo; 26958c2ecf20Sopenharmony_ci u32 tx_gt127_hi; 26968c2ecf20Sopenharmony_ci u32 tx_gt255_lo; 26978c2ecf20Sopenharmony_ci u32 tx_gt255_hi; 26988c2ecf20Sopenharmony_ci u32 tx_gt511_lo; 26998c2ecf20Sopenharmony_ci u32 tx_gt511_hi; 27008c2ecf20Sopenharmony_ci u32 tx_gt1023_lo; 27018c2ecf20Sopenharmony_ci u32 tx_gt1023_hi; 27028c2ecf20Sopenharmony_ci u32 tx_gt1518_lo; 27038c2ecf20Sopenharmony_ci u32 tx_gt1518_hi; 27048c2ecf20Sopenharmony_ci u32 tx_gt2047_lo; 27058c2ecf20Sopenharmony_ci u32 tx_gt2047_hi; 27068c2ecf20Sopenharmony_ci u32 tx_gt4095_lo; 27078c2ecf20Sopenharmony_ci u32 tx_gt4095_hi; 27088c2ecf20Sopenharmony_ci u32 tx_gt9216_lo; 27098c2ecf20Sopenharmony_ci u32 tx_gt9216_hi; 27108c2ecf20Sopenharmony_ci u32 tx_gt16383_lo; 27118c2ecf20Sopenharmony_ci u32 tx_gt16383_hi; 27128c2ecf20Sopenharmony_ci u32 tx_gtufl_lo; 27138c2ecf20Sopenharmony_ci u32 tx_gtufl_hi; 27148c2ecf20Sopenharmony_ci u32 tx_gterr_lo; 27158c2ecf20Sopenharmony_ci u32 tx_gterr_hi; 27168c2ecf20Sopenharmony_ci u32 tx_gtbyt_lo; 27178c2ecf20Sopenharmony_ci u32 tx_gtbyt_hi; 27188c2ecf20Sopenharmony_ci u32 tx_collisions_lo; 27198c2ecf20Sopenharmony_ci u32 tx_collisions_hi; 27208c2ecf20Sopenharmony_ci u32 tx_singlecollision_lo; 27218c2ecf20Sopenharmony_ci u32 tx_singlecollision_hi; 27228c2ecf20Sopenharmony_ci u32 tx_multiplecollisions_lo; 27238c2ecf20Sopenharmony_ci u32 tx_multiplecollisions_hi; 27248c2ecf20Sopenharmony_ci u32 tx_deferred_lo; 27258c2ecf20Sopenharmony_ci u32 tx_deferred_hi; 27268c2ecf20Sopenharmony_ci u32 tx_excessivecollisions_lo; 27278c2ecf20Sopenharmony_ci u32 tx_excessivecollisions_hi; 27288c2ecf20Sopenharmony_ci u32 tx_latecollisions_lo; 27298c2ecf20Sopenharmony_ci u32 tx_latecollisions_hi; 27308c2ecf20Sopenharmony_ci } stats_tx; 27318c2ecf20Sopenharmony_ci 27328c2ecf20Sopenharmony_ci struct { 27338c2ecf20Sopenharmony_ci u32 rx_gr64_lo; 27348c2ecf20Sopenharmony_ci u32 rx_gr64_hi; 27358c2ecf20Sopenharmony_ci u32 rx_gr127_lo; 27368c2ecf20Sopenharmony_ci u32 rx_gr127_hi; 27378c2ecf20Sopenharmony_ci u32 rx_gr255_lo; 27388c2ecf20Sopenharmony_ci u32 rx_gr255_hi; 27398c2ecf20Sopenharmony_ci u32 rx_gr511_lo; 27408c2ecf20Sopenharmony_ci u32 rx_gr511_hi; 27418c2ecf20Sopenharmony_ci u32 rx_gr1023_lo; 27428c2ecf20Sopenharmony_ci u32 rx_gr1023_hi; 27438c2ecf20Sopenharmony_ci u32 rx_gr1518_lo; 27448c2ecf20Sopenharmony_ci u32 rx_gr1518_hi; 27458c2ecf20Sopenharmony_ci u32 rx_gr2047_lo; 27468c2ecf20Sopenharmony_ci u32 rx_gr2047_hi; 27478c2ecf20Sopenharmony_ci u32 rx_gr4095_lo; 27488c2ecf20Sopenharmony_ci u32 rx_gr4095_hi; 27498c2ecf20Sopenharmony_ci u32 rx_gr9216_lo; 27508c2ecf20Sopenharmony_ci u32 rx_gr9216_hi; 27518c2ecf20Sopenharmony_ci u32 rx_gr16383_lo; 27528c2ecf20Sopenharmony_ci u32 rx_gr16383_hi; 27538c2ecf20Sopenharmony_ci u32 rx_grpkt_lo; 27548c2ecf20Sopenharmony_ci u32 rx_grpkt_hi; 27558c2ecf20Sopenharmony_ci u32 rx_grfcs_lo; 27568c2ecf20Sopenharmony_ci u32 rx_grfcs_hi; 27578c2ecf20Sopenharmony_ci u32 rx_gruca_lo; 27588c2ecf20Sopenharmony_ci u32 rx_gruca_hi; 27598c2ecf20Sopenharmony_ci u32 rx_grmca_lo; 27608c2ecf20Sopenharmony_ci u32 rx_grmca_hi; 27618c2ecf20Sopenharmony_ci u32 rx_grbca_lo; 27628c2ecf20Sopenharmony_ci u32 rx_grbca_hi; 27638c2ecf20Sopenharmony_ci u32 rx_grxpf_lo; 27648c2ecf20Sopenharmony_ci u32 rx_grxpf_hi; 27658c2ecf20Sopenharmony_ci u32 rx_grxpp_lo; 27668c2ecf20Sopenharmony_ci u32 rx_grxpp_hi; 27678c2ecf20Sopenharmony_ci u32 rx_grxuo_lo; 27688c2ecf20Sopenharmony_ci u32 rx_grxuo_hi; 27698c2ecf20Sopenharmony_ci u32 rx_grovr_lo; 27708c2ecf20Sopenharmony_ci u32 rx_grovr_hi; 27718c2ecf20Sopenharmony_ci u32 rx_grxcf_lo; 27728c2ecf20Sopenharmony_ci u32 rx_grxcf_hi; 27738c2ecf20Sopenharmony_ci u32 rx_grflr_lo; 27748c2ecf20Sopenharmony_ci u32 rx_grflr_hi; 27758c2ecf20Sopenharmony_ci u32 rx_grpok_lo; 27768c2ecf20Sopenharmony_ci u32 rx_grpok_hi; 27778c2ecf20Sopenharmony_ci u32 rx_grbyt_lo; 27788c2ecf20Sopenharmony_ci u32 rx_grbyt_hi; 27798c2ecf20Sopenharmony_ci u32 rx_grund_lo; 27808c2ecf20Sopenharmony_ci u32 rx_grund_hi; 27818c2ecf20Sopenharmony_ci u32 rx_grfrg_lo; 27828c2ecf20Sopenharmony_ci u32 rx_grfrg_hi; 27838c2ecf20Sopenharmony_ci u32 rx_grerb_lo; 27848c2ecf20Sopenharmony_ci u32 rx_grerb_hi; 27858c2ecf20Sopenharmony_ci u32 rx_grfre_lo; 27868c2ecf20Sopenharmony_ci u32 rx_grfre_hi; 27878c2ecf20Sopenharmony_ci 27888c2ecf20Sopenharmony_ci u32 rx_alignmenterrors_lo; 27898c2ecf20Sopenharmony_ci u32 rx_alignmenterrors_hi; 27908c2ecf20Sopenharmony_ci u32 rx_falsecarrier_lo; 27918c2ecf20Sopenharmony_ci u32 rx_falsecarrier_hi; 27928c2ecf20Sopenharmony_ci u32 rx_llfcmsgcnt_lo; 27938c2ecf20Sopenharmony_ci u32 rx_llfcmsgcnt_hi; 27948c2ecf20Sopenharmony_ci } stats_rx; 27958c2ecf20Sopenharmony_ci}; 27968c2ecf20Sopenharmony_ci 27978c2ecf20Sopenharmony_ciunion mac_stats { 27988c2ecf20Sopenharmony_ci struct emac_stats emac_stats; 27998c2ecf20Sopenharmony_ci struct bmac1_stats bmac1_stats; 28008c2ecf20Sopenharmony_ci struct bmac2_stats bmac2_stats; 28018c2ecf20Sopenharmony_ci struct mstat_stats mstat_stats; 28028c2ecf20Sopenharmony_ci}; 28038c2ecf20Sopenharmony_ci 28048c2ecf20Sopenharmony_ci 28058c2ecf20Sopenharmony_cistruct mac_stx { 28068c2ecf20Sopenharmony_ci /* in_bad_octets */ 28078c2ecf20Sopenharmony_ci u32 rx_stat_ifhcinbadoctets_hi; 28088c2ecf20Sopenharmony_ci u32 rx_stat_ifhcinbadoctets_lo; 28098c2ecf20Sopenharmony_ci 28108c2ecf20Sopenharmony_ci /* out_bad_octets */ 28118c2ecf20Sopenharmony_ci u32 tx_stat_ifhcoutbadoctets_hi; 28128c2ecf20Sopenharmony_ci u32 tx_stat_ifhcoutbadoctets_lo; 28138c2ecf20Sopenharmony_ci 28148c2ecf20Sopenharmony_ci /* crc_receive_errors */ 28158c2ecf20Sopenharmony_ci u32 rx_stat_dot3statsfcserrors_hi; 28168c2ecf20Sopenharmony_ci u32 rx_stat_dot3statsfcserrors_lo; 28178c2ecf20Sopenharmony_ci /* alignment_errors */ 28188c2ecf20Sopenharmony_ci u32 rx_stat_dot3statsalignmenterrors_hi; 28198c2ecf20Sopenharmony_ci u32 rx_stat_dot3statsalignmenterrors_lo; 28208c2ecf20Sopenharmony_ci /* carrier_sense_errors */ 28218c2ecf20Sopenharmony_ci u32 rx_stat_dot3statscarriersenseerrors_hi; 28228c2ecf20Sopenharmony_ci u32 rx_stat_dot3statscarriersenseerrors_lo; 28238c2ecf20Sopenharmony_ci /* false_carrier_detections */ 28248c2ecf20Sopenharmony_ci u32 rx_stat_falsecarriererrors_hi; 28258c2ecf20Sopenharmony_ci u32 rx_stat_falsecarriererrors_lo; 28268c2ecf20Sopenharmony_ci 28278c2ecf20Sopenharmony_ci /* runt_packets_received */ 28288c2ecf20Sopenharmony_ci u32 rx_stat_etherstatsundersizepkts_hi; 28298c2ecf20Sopenharmony_ci u32 rx_stat_etherstatsundersizepkts_lo; 28308c2ecf20Sopenharmony_ci /* jabber_packets_received */ 28318c2ecf20Sopenharmony_ci u32 rx_stat_dot3statsframestoolong_hi; 28328c2ecf20Sopenharmony_ci u32 rx_stat_dot3statsframestoolong_lo; 28338c2ecf20Sopenharmony_ci 28348c2ecf20Sopenharmony_ci /* error_runt_packets_received */ 28358c2ecf20Sopenharmony_ci u32 rx_stat_etherstatsfragments_hi; 28368c2ecf20Sopenharmony_ci u32 rx_stat_etherstatsfragments_lo; 28378c2ecf20Sopenharmony_ci /* error_jabber_packets_received */ 28388c2ecf20Sopenharmony_ci u32 rx_stat_etherstatsjabbers_hi; 28398c2ecf20Sopenharmony_ci u32 rx_stat_etherstatsjabbers_lo; 28408c2ecf20Sopenharmony_ci 28418c2ecf20Sopenharmony_ci /* control_frames_received */ 28428c2ecf20Sopenharmony_ci u32 rx_stat_maccontrolframesreceived_hi; 28438c2ecf20Sopenharmony_ci u32 rx_stat_maccontrolframesreceived_lo; 28448c2ecf20Sopenharmony_ci u32 rx_stat_mac_xpf_hi; 28458c2ecf20Sopenharmony_ci u32 rx_stat_mac_xpf_lo; 28468c2ecf20Sopenharmony_ci u32 rx_stat_mac_xcf_hi; 28478c2ecf20Sopenharmony_ci u32 rx_stat_mac_xcf_lo; 28488c2ecf20Sopenharmony_ci 28498c2ecf20Sopenharmony_ci /* xoff_state_entered */ 28508c2ecf20Sopenharmony_ci u32 rx_stat_xoffstateentered_hi; 28518c2ecf20Sopenharmony_ci u32 rx_stat_xoffstateentered_lo; 28528c2ecf20Sopenharmony_ci /* pause_xon_frames_received */ 28538c2ecf20Sopenharmony_ci u32 rx_stat_xonpauseframesreceived_hi; 28548c2ecf20Sopenharmony_ci u32 rx_stat_xonpauseframesreceived_lo; 28558c2ecf20Sopenharmony_ci /* pause_xoff_frames_received */ 28568c2ecf20Sopenharmony_ci u32 rx_stat_xoffpauseframesreceived_hi; 28578c2ecf20Sopenharmony_ci u32 rx_stat_xoffpauseframesreceived_lo; 28588c2ecf20Sopenharmony_ci /* pause_xon_frames_transmitted */ 28598c2ecf20Sopenharmony_ci u32 tx_stat_outxonsent_hi; 28608c2ecf20Sopenharmony_ci u32 tx_stat_outxonsent_lo; 28618c2ecf20Sopenharmony_ci /* pause_xoff_frames_transmitted */ 28628c2ecf20Sopenharmony_ci u32 tx_stat_outxoffsent_hi; 28638c2ecf20Sopenharmony_ci u32 tx_stat_outxoffsent_lo; 28648c2ecf20Sopenharmony_ci /* flow_control_done */ 28658c2ecf20Sopenharmony_ci u32 tx_stat_flowcontroldone_hi; 28668c2ecf20Sopenharmony_ci u32 tx_stat_flowcontroldone_lo; 28678c2ecf20Sopenharmony_ci 28688c2ecf20Sopenharmony_ci /* ether_stats_collisions */ 28698c2ecf20Sopenharmony_ci u32 tx_stat_etherstatscollisions_hi; 28708c2ecf20Sopenharmony_ci u32 tx_stat_etherstatscollisions_lo; 28718c2ecf20Sopenharmony_ci /* single_collision_transmit_frames */ 28728c2ecf20Sopenharmony_ci u32 tx_stat_dot3statssinglecollisionframes_hi; 28738c2ecf20Sopenharmony_ci u32 tx_stat_dot3statssinglecollisionframes_lo; 28748c2ecf20Sopenharmony_ci /* multiple_collision_transmit_frames */ 28758c2ecf20Sopenharmony_ci u32 tx_stat_dot3statsmultiplecollisionframes_hi; 28768c2ecf20Sopenharmony_ci u32 tx_stat_dot3statsmultiplecollisionframes_lo; 28778c2ecf20Sopenharmony_ci /* deferred_transmissions */ 28788c2ecf20Sopenharmony_ci u32 tx_stat_dot3statsdeferredtransmissions_hi; 28798c2ecf20Sopenharmony_ci u32 tx_stat_dot3statsdeferredtransmissions_lo; 28808c2ecf20Sopenharmony_ci /* excessive_collision_frames */ 28818c2ecf20Sopenharmony_ci u32 tx_stat_dot3statsexcessivecollisions_hi; 28828c2ecf20Sopenharmony_ci u32 tx_stat_dot3statsexcessivecollisions_lo; 28838c2ecf20Sopenharmony_ci /* late_collision_frames */ 28848c2ecf20Sopenharmony_ci u32 tx_stat_dot3statslatecollisions_hi; 28858c2ecf20Sopenharmony_ci u32 tx_stat_dot3statslatecollisions_lo; 28868c2ecf20Sopenharmony_ci 28878c2ecf20Sopenharmony_ci /* frames_transmitted_64_bytes */ 28888c2ecf20Sopenharmony_ci u32 tx_stat_etherstatspkts64octets_hi; 28898c2ecf20Sopenharmony_ci u32 tx_stat_etherstatspkts64octets_lo; 28908c2ecf20Sopenharmony_ci /* frames_transmitted_65_127_bytes */ 28918c2ecf20Sopenharmony_ci u32 tx_stat_etherstatspkts65octetsto127octets_hi; 28928c2ecf20Sopenharmony_ci u32 tx_stat_etherstatspkts65octetsto127octets_lo; 28938c2ecf20Sopenharmony_ci /* frames_transmitted_128_255_bytes */ 28948c2ecf20Sopenharmony_ci u32 tx_stat_etherstatspkts128octetsto255octets_hi; 28958c2ecf20Sopenharmony_ci u32 tx_stat_etherstatspkts128octetsto255octets_lo; 28968c2ecf20Sopenharmony_ci /* frames_transmitted_256_511_bytes */ 28978c2ecf20Sopenharmony_ci u32 tx_stat_etherstatspkts256octetsto511octets_hi; 28988c2ecf20Sopenharmony_ci u32 tx_stat_etherstatspkts256octetsto511octets_lo; 28998c2ecf20Sopenharmony_ci /* frames_transmitted_512_1023_bytes */ 29008c2ecf20Sopenharmony_ci u32 tx_stat_etherstatspkts512octetsto1023octets_hi; 29018c2ecf20Sopenharmony_ci u32 tx_stat_etherstatspkts512octetsto1023octets_lo; 29028c2ecf20Sopenharmony_ci /* frames_transmitted_1024_1522_bytes */ 29038c2ecf20Sopenharmony_ci u32 tx_stat_etherstatspkts1024octetsto1522octets_hi; 29048c2ecf20Sopenharmony_ci u32 tx_stat_etherstatspkts1024octetsto1522octets_lo; 29058c2ecf20Sopenharmony_ci /* frames_transmitted_1523_9022_bytes */ 29068c2ecf20Sopenharmony_ci u32 tx_stat_etherstatspktsover1522octets_hi; 29078c2ecf20Sopenharmony_ci u32 tx_stat_etherstatspktsover1522octets_lo; 29088c2ecf20Sopenharmony_ci u32 tx_stat_mac_2047_hi; 29098c2ecf20Sopenharmony_ci u32 tx_stat_mac_2047_lo; 29108c2ecf20Sopenharmony_ci u32 tx_stat_mac_4095_hi; 29118c2ecf20Sopenharmony_ci u32 tx_stat_mac_4095_lo; 29128c2ecf20Sopenharmony_ci u32 tx_stat_mac_9216_hi; 29138c2ecf20Sopenharmony_ci u32 tx_stat_mac_9216_lo; 29148c2ecf20Sopenharmony_ci u32 tx_stat_mac_16383_hi; 29158c2ecf20Sopenharmony_ci u32 tx_stat_mac_16383_lo; 29168c2ecf20Sopenharmony_ci 29178c2ecf20Sopenharmony_ci /* internal_mac_transmit_errors */ 29188c2ecf20Sopenharmony_ci u32 tx_stat_dot3statsinternalmactransmiterrors_hi; 29198c2ecf20Sopenharmony_ci u32 tx_stat_dot3statsinternalmactransmiterrors_lo; 29208c2ecf20Sopenharmony_ci 29218c2ecf20Sopenharmony_ci /* if_out_discards */ 29228c2ecf20Sopenharmony_ci u32 tx_stat_mac_ufl_hi; 29238c2ecf20Sopenharmony_ci u32 tx_stat_mac_ufl_lo; 29248c2ecf20Sopenharmony_ci}; 29258c2ecf20Sopenharmony_ci 29268c2ecf20Sopenharmony_ci 29278c2ecf20Sopenharmony_ci#define MAC_STX_IDX_MAX 2 29288c2ecf20Sopenharmony_ci 29298c2ecf20Sopenharmony_cistruct host_port_stats { 29308c2ecf20Sopenharmony_ci u32 host_port_stats_counter; 29318c2ecf20Sopenharmony_ci 29328c2ecf20Sopenharmony_ci struct mac_stx mac_stx[MAC_STX_IDX_MAX]; 29338c2ecf20Sopenharmony_ci 29348c2ecf20Sopenharmony_ci u32 brb_drop_hi; 29358c2ecf20Sopenharmony_ci u32 brb_drop_lo; 29368c2ecf20Sopenharmony_ci 29378c2ecf20Sopenharmony_ci u32 not_used; /* obsolete */ 29388c2ecf20Sopenharmony_ci u32 pfc_frames_tx_hi; 29398c2ecf20Sopenharmony_ci u32 pfc_frames_tx_lo; 29408c2ecf20Sopenharmony_ci u32 pfc_frames_rx_hi; 29418c2ecf20Sopenharmony_ci u32 pfc_frames_rx_lo; 29428c2ecf20Sopenharmony_ci 29438c2ecf20Sopenharmony_ci u32 eee_lpi_count_hi; 29448c2ecf20Sopenharmony_ci u32 eee_lpi_count_lo; 29458c2ecf20Sopenharmony_ci}; 29468c2ecf20Sopenharmony_ci 29478c2ecf20Sopenharmony_ci 29488c2ecf20Sopenharmony_cistruct host_func_stats { 29498c2ecf20Sopenharmony_ci u32 host_func_stats_start; 29508c2ecf20Sopenharmony_ci 29518c2ecf20Sopenharmony_ci u32 total_bytes_received_hi; 29528c2ecf20Sopenharmony_ci u32 total_bytes_received_lo; 29538c2ecf20Sopenharmony_ci 29548c2ecf20Sopenharmony_ci u32 total_bytes_transmitted_hi; 29558c2ecf20Sopenharmony_ci u32 total_bytes_transmitted_lo; 29568c2ecf20Sopenharmony_ci 29578c2ecf20Sopenharmony_ci u32 total_unicast_packets_received_hi; 29588c2ecf20Sopenharmony_ci u32 total_unicast_packets_received_lo; 29598c2ecf20Sopenharmony_ci 29608c2ecf20Sopenharmony_ci u32 total_multicast_packets_received_hi; 29618c2ecf20Sopenharmony_ci u32 total_multicast_packets_received_lo; 29628c2ecf20Sopenharmony_ci 29638c2ecf20Sopenharmony_ci u32 total_broadcast_packets_received_hi; 29648c2ecf20Sopenharmony_ci u32 total_broadcast_packets_received_lo; 29658c2ecf20Sopenharmony_ci 29668c2ecf20Sopenharmony_ci u32 total_unicast_packets_transmitted_hi; 29678c2ecf20Sopenharmony_ci u32 total_unicast_packets_transmitted_lo; 29688c2ecf20Sopenharmony_ci 29698c2ecf20Sopenharmony_ci u32 total_multicast_packets_transmitted_hi; 29708c2ecf20Sopenharmony_ci u32 total_multicast_packets_transmitted_lo; 29718c2ecf20Sopenharmony_ci 29728c2ecf20Sopenharmony_ci u32 total_broadcast_packets_transmitted_hi; 29738c2ecf20Sopenharmony_ci u32 total_broadcast_packets_transmitted_lo; 29748c2ecf20Sopenharmony_ci 29758c2ecf20Sopenharmony_ci u32 valid_bytes_received_hi; 29768c2ecf20Sopenharmony_ci u32 valid_bytes_received_lo; 29778c2ecf20Sopenharmony_ci 29788c2ecf20Sopenharmony_ci u32 host_func_stats_end; 29798c2ecf20Sopenharmony_ci}; 29808c2ecf20Sopenharmony_ci 29818c2ecf20Sopenharmony_ci/* VIC definitions */ 29828c2ecf20Sopenharmony_ci#define VICSTATST_UIF_INDEX 2 29838c2ecf20Sopenharmony_ci 29848c2ecf20Sopenharmony_ci 29858c2ecf20Sopenharmony_ci/* stats collected for afex. 29868c2ecf20Sopenharmony_ci * NOTE: structure is exactly as expected to be received by the switch. 29878c2ecf20Sopenharmony_ci * order must remain exactly as is unless protocol changes ! 29888c2ecf20Sopenharmony_ci */ 29898c2ecf20Sopenharmony_cistruct afex_stats { 29908c2ecf20Sopenharmony_ci u32 tx_unicast_frames_hi; 29918c2ecf20Sopenharmony_ci u32 tx_unicast_frames_lo; 29928c2ecf20Sopenharmony_ci u32 tx_unicast_bytes_hi; 29938c2ecf20Sopenharmony_ci u32 tx_unicast_bytes_lo; 29948c2ecf20Sopenharmony_ci u32 tx_multicast_frames_hi; 29958c2ecf20Sopenharmony_ci u32 tx_multicast_frames_lo; 29968c2ecf20Sopenharmony_ci u32 tx_multicast_bytes_hi; 29978c2ecf20Sopenharmony_ci u32 tx_multicast_bytes_lo; 29988c2ecf20Sopenharmony_ci u32 tx_broadcast_frames_hi; 29998c2ecf20Sopenharmony_ci u32 tx_broadcast_frames_lo; 30008c2ecf20Sopenharmony_ci u32 tx_broadcast_bytes_hi; 30018c2ecf20Sopenharmony_ci u32 tx_broadcast_bytes_lo; 30028c2ecf20Sopenharmony_ci u32 tx_frames_discarded_hi; 30038c2ecf20Sopenharmony_ci u32 tx_frames_discarded_lo; 30048c2ecf20Sopenharmony_ci u32 tx_frames_dropped_hi; 30058c2ecf20Sopenharmony_ci u32 tx_frames_dropped_lo; 30068c2ecf20Sopenharmony_ci 30078c2ecf20Sopenharmony_ci u32 rx_unicast_frames_hi; 30088c2ecf20Sopenharmony_ci u32 rx_unicast_frames_lo; 30098c2ecf20Sopenharmony_ci u32 rx_unicast_bytes_hi; 30108c2ecf20Sopenharmony_ci u32 rx_unicast_bytes_lo; 30118c2ecf20Sopenharmony_ci u32 rx_multicast_frames_hi; 30128c2ecf20Sopenharmony_ci u32 rx_multicast_frames_lo; 30138c2ecf20Sopenharmony_ci u32 rx_multicast_bytes_hi; 30148c2ecf20Sopenharmony_ci u32 rx_multicast_bytes_lo; 30158c2ecf20Sopenharmony_ci u32 rx_broadcast_frames_hi; 30168c2ecf20Sopenharmony_ci u32 rx_broadcast_frames_lo; 30178c2ecf20Sopenharmony_ci u32 rx_broadcast_bytes_hi; 30188c2ecf20Sopenharmony_ci u32 rx_broadcast_bytes_lo; 30198c2ecf20Sopenharmony_ci u32 rx_frames_discarded_hi; 30208c2ecf20Sopenharmony_ci u32 rx_frames_discarded_lo; 30218c2ecf20Sopenharmony_ci u32 rx_frames_dropped_hi; 30228c2ecf20Sopenharmony_ci u32 rx_frames_dropped_lo; 30238c2ecf20Sopenharmony_ci}; 30248c2ecf20Sopenharmony_ci 30258c2ecf20Sopenharmony_ci#define BCM_5710_FW_MAJOR_VERSION 7 30268c2ecf20Sopenharmony_ci#define BCM_5710_FW_MINOR_VERSION 13 30278c2ecf20Sopenharmony_ci#define BCM_5710_FW_REVISION_VERSION 21 30288c2ecf20Sopenharmony_ci#define BCM_5710_FW_REVISION_VERSION_V15 15 30298c2ecf20Sopenharmony_ci#define BCM_5710_FW_ENGINEERING_VERSION 0 30308c2ecf20Sopenharmony_ci#define BCM_5710_FW_COMPILE_FLAGS 1 30318c2ecf20Sopenharmony_ci 30328c2ecf20Sopenharmony_ci 30338c2ecf20Sopenharmony_ci/* 30348c2ecf20Sopenharmony_ci * attention bits 30358c2ecf20Sopenharmony_ci */ 30368c2ecf20Sopenharmony_cistruct atten_sp_status_block { 30378c2ecf20Sopenharmony_ci __le32 attn_bits; 30388c2ecf20Sopenharmony_ci __le32 attn_bits_ack; 30398c2ecf20Sopenharmony_ci u8 status_block_id; 30408c2ecf20Sopenharmony_ci u8 reserved0; 30418c2ecf20Sopenharmony_ci __le16 attn_bits_index; 30428c2ecf20Sopenharmony_ci __le32 reserved1; 30438c2ecf20Sopenharmony_ci}; 30448c2ecf20Sopenharmony_ci 30458c2ecf20Sopenharmony_ci 30468c2ecf20Sopenharmony_ci/* 30478c2ecf20Sopenharmony_ci * The eth aggregative context of Cstorm 30488c2ecf20Sopenharmony_ci */ 30498c2ecf20Sopenharmony_cistruct cstorm_eth_ag_context { 30508c2ecf20Sopenharmony_ci u32 __reserved0[10]; 30518c2ecf20Sopenharmony_ci}; 30528c2ecf20Sopenharmony_ci 30538c2ecf20Sopenharmony_ci 30548c2ecf20Sopenharmony_ci/* 30558c2ecf20Sopenharmony_ci * dmae command structure 30568c2ecf20Sopenharmony_ci */ 30578c2ecf20Sopenharmony_cistruct dmae_command { 30588c2ecf20Sopenharmony_ci u32 opcode; 30598c2ecf20Sopenharmony_ci#define DMAE_COMMAND_SRC (0x1<<0) 30608c2ecf20Sopenharmony_ci#define DMAE_COMMAND_SRC_SHIFT 0 30618c2ecf20Sopenharmony_ci#define DMAE_COMMAND_DST (0x3<<1) 30628c2ecf20Sopenharmony_ci#define DMAE_COMMAND_DST_SHIFT 1 30638c2ecf20Sopenharmony_ci#define DMAE_COMMAND_C_DST (0x1<<3) 30648c2ecf20Sopenharmony_ci#define DMAE_COMMAND_C_DST_SHIFT 3 30658c2ecf20Sopenharmony_ci#define DMAE_COMMAND_C_TYPE_ENABLE (0x1<<4) 30668c2ecf20Sopenharmony_ci#define DMAE_COMMAND_C_TYPE_ENABLE_SHIFT 4 30678c2ecf20Sopenharmony_ci#define DMAE_COMMAND_C_TYPE_CRC_ENABLE (0x1<<5) 30688c2ecf20Sopenharmony_ci#define DMAE_COMMAND_C_TYPE_CRC_ENABLE_SHIFT 5 30698c2ecf20Sopenharmony_ci#define DMAE_COMMAND_C_TYPE_CRC_OFFSET (0x7<<6) 30708c2ecf20Sopenharmony_ci#define DMAE_COMMAND_C_TYPE_CRC_OFFSET_SHIFT 6 30718c2ecf20Sopenharmony_ci#define DMAE_COMMAND_ENDIANITY (0x3<<9) 30728c2ecf20Sopenharmony_ci#define DMAE_COMMAND_ENDIANITY_SHIFT 9 30738c2ecf20Sopenharmony_ci#define DMAE_COMMAND_PORT (0x1<<11) 30748c2ecf20Sopenharmony_ci#define DMAE_COMMAND_PORT_SHIFT 11 30758c2ecf20Sopenharmony_ci#define DMAE_COMMAND_CRC_RESET (0x1<<12) 30768c2ecf20Sopenharmony_ci#define DMAE_COMMAND_CRC_RESET_SHIFT 12 30778c2ecf20Sopenharmony_ci#define DMAE_COMMAND_SRC_RESET (0x1<<13) 30788c2ecf20Sopenharmony_ci#define DMAE_COMMAND_SRC_RESET_SHIFT 13 30798c2ecf20Sopenharmony_ci#define DMAE_COMMAND_DST_RESET (0x1<<14) 30808c2ecf20Sopenharmony_ci#define DMAE_COMMAND_DST_RESET_SHIFT 14 30818c2ecf20Sopenharmony_ci#define DMAE_COMMAND_E1HVN (0x3<<15) 30828c2ecf20Sopenharmony_ci#define DMAE_COMMAND_E1HVN_SHIFT 15 30838c2ecf20Sopenharmony_ci#define DMAE_COMMAND_DST_VN (0x3<<17) 30848c2ecf20Sopenharmony_ci#define DMAE_COMMAND_DST_VN_SHIFT 17 30858c2ecf20Sopenharmony_ci#define DMAE_COMMAND_C_FUNC (0x1<<19) 30868c2ecf20Sopenharmony_ci#define DMAE_COMMAND_C_FUNC_SHIFT 19 30878c2ecf20Sopenharmony_ci#define DMAE_COMMAND_ERR_POLICY (0x3<<20) 30888c2ecf20Sopenharmony_ci#define DMAE_COMMAND_ERR_POLICY_SHIFT 20 30898c2ecf20Sopenharmony_ci#define DMAE_COMMAND_RESERVED0 (0x3FF<<22) 30908c2ecf20Sopenharmony_ci#define DMAE_COMMAND_RESERVED0_SHIFT 22 30918c2ecf20Sopenharmony_ci u32 src_addr_lo; 30928c2ecf20Sopenharmony_ci u32 src_addr_hi; 30938c2ecf20Sopenharmony_ci u32 dst_addr_lo; 30948c2ecf20Sopenharmony_ci u32 dst_addr_hi; 30958c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 30968c2ecf20Sopenharmony_ci u16 opcode_iov; 30978c2ecf20Sopenharmony_ci#define DMAE_COMMAND_SRC_VFID (0x3F<<0) 30988c2ecf20Sopenharmony_ci#define DMAE_COMMAND_SRC_VFID_SHIFT 0 30998c2ecf20Sopenharmony_ci#define DMAE_COMMAND_SRC_VFPF (0x1<<6) 31008c2ecf20Sopenharmony_ci#define DMAE_COMMAND_SRC_VFPF_SHIFT 6 31018c2ecf20Sopenharmony_ci#define DMAE_COMMAND_RESERVED1 (0x1<<7) 31028c2ecf20Sopenharmony_ci#define DMAE_COMMAND_RESERVED1_SHIFT 7 31038c2ecf20Sopenharmony_ci#define DMAE_COMMAND_DST_VFID (0x3F<<8) 31048c2ecf20Sopenharmony_ci#define DMAE_COMMAND_DST_VFID_SHIFT 8 31058c2ecf20Sopenharmony_ci#define DMAE_COMMAND_DST_VFPF (0x1<<14) 31068c2ecf20Sopenharmony_ci#define DMAE_COMMAND_DST_VFPF_SHIFT 14 31078c2ecf20Sopenharmony_ci#define DMAE_COMMAND_RESERVED2 (0x1<<15) 31088c2ecf20Sopenharmony_ci#define DMAE_COMMAND_RESERVED2_SHIFT 15 31098c2ecf20Sopenharmony_ci u16 len; 31108c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 31118c2ecf20Sopenharmony_ci u16 len; 31128c2ecf20Sopenharmony_ci u16 opcode_iov; 31138c2ecf20Sopenharmony_ci#define DMAE_COMMAND_SRC_VFID (0x3F<<0) 31148c2ecf20Sopenharmony_ci#define DMAE_COMMAND_SRC_VFID_SHIFT 0 31158c2ecf20Sopenharmony_ci#define DMAE_COMMAND_SRC_VFPF (0x1<<6) 31168c2ecf20Sopenharmony_ci#define DMAE_COMMAND_SRC_VFPF_SHIFT 6 31178c2ecf20Sopenharmony_ci#define DMAE_COMMAND_RESERVED1 (0x1<<7) 31188c2ecf20Sopenharmony_ci#define DMAE_COMMAND_RESERVED1_SHIFT 7 31198c2ecf20Sopenharmony_ci#define DMAE_COMMAND_DST_VFID (0x3F<<8) 31208c2ecf20Sopenharmony_ci#define DMAE_COMMAND_DST_VFID_SHIFT 8 31218c2ecf20Sopenharmony_ci#define DMAE_COMMAND_DST_VFPF (0x1<<14) 31228c2ecf20Sopenharmony_ci#define DMAE_COMMAND_DST_VFPF_SHIFT 14 31238c2ecf20Sopenharmony_ci#define DMAE_COMMAND_RESERVED2 (0x1<<15) 31248c2ecf20Sopenharmony_ci#define DMAE_COMMAND_RESERVED2_SHIFT 15 31258c2ecf20Sopenharmony_ci#endif 31268c2ecf20Sopenharmony_ci u32 comp_addr_lo; 31278c2ecf20Sopenharmony_ci u32 comp_addr_hi; 31288c2ecf20Sopenharmony_ci u32 comp_val; 31298c2ecf20Sopenharmony_ci u32 crc32; 31308c2ecf20Sopenharmony_ci u32 crc32_c; 31318c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 31328c2ecf20Sopenharmony_ci u16 crc16_c; 31338c2ecf20Sopenharmony_ci u16 crc16; 31348c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 31358c2ecf20Sopenharmony_ci u16 crc16; 31368c2ecf20Sopenharmony_ci u16 crc16_c; 31378c2ecf20Sopenharmony_ci#endif 31388c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 31398c2ecf20Sopenharmony_ci u16 reserved3; 31408c2ecf20Sopenharmony_ci u16 crc_t10; 31418c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 31428c2ecf20Sopenharmony_ci u16 crc_t10; 31438c2ecf20Sopenharmony_ci u16 reserved3; 31448c2ecf20Sopenharmony_ci#endif 31458c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 31468c2ecf20Sopenharmony_ci u16 xsum8; 31478c2ecf20Sopenharmony_ci u16 xsum16; 31488c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 31498c2ecf20Sopenharmony_ci u16 xsum16; 31508c2ecf20Sopenharmony_ci u16 xsum8; 31518c2ecf20Sopenharmony_ci#endif 31528c2ecf20Sopenharmony_ci}; 31538c2ecf20Sopenharmony_ci 31548c2ecf20Sopenharmony_ci 31558c2ecf20Sopenharmony_ci/* 31568c2ecf20Sopenharmony_ci * common data for all protocols 31578c2ecf20Sopenharmony_ci */ 31588c2ecf20Sopenharmony_cistruct doorbell_hdr { 31598c2ecf20Sopenharmony_ci u8 header; 31608c2ecf20Sopenharmony_ci#define DOORBELL_HDR_RX (0x1<<0) 31618c2ecf20Sopenharmony_ci#define DOORBELL_HDR_RX_SHIFT 0 31628c2ecf20Sopenharmony_ci#define DOORBELL_HDR_DB_TYPE (0x1<<1) 31638c2ecf20Sopenharmony_ci#define DOORBELL_HDR_DB_TYPE_SHIFT 1 31648c2ecf20Sopenharmony_ci#define DOORBELL_HDR_DPM_SIZE (0x3<<2) 31658c2ecf20Sopenharmony_ci#define DOORBELL_HDR_DPM_SIZE_SHIFT 2 31668c2ecf20Sopenharmony_ci#define DOORBELL_HDR_CONN_TYPE (0xF<<4) 31678c2ecf20Sopenharmony_ci#define DOORBELL_HDR_CONN_TYPE_SHIFT 4 31688c2ecf20Sopenharmony_ci}; 31698c2ecf20Sopenharmony_ci 31708c2ecf20Sopenharmony_ci/* 31718c2ecf20Sopenharmony_ci * Ethernet doorbell 31728c2ecf20Sopenharmony_ci */ 31738c2ecf20Sopenharmony_cistruct eth_tx_doorbell { 31748c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 31758c2ecf20Sopenharmony_ci u16 npackets; 31768c2ecf20Sopenharmony_ci u8 params; 31778c2ecf20Sopenharmony_ci#define ETH_TX_DOORBELL_NUM_BDS (0x3F<<0) 31788c2ecf20Sopenharmony_ci#define ETH_TX_DOORBELL_NUM_BDS_SHIFT 0 31798c2ecf20Sopenharmony_ci#define ETH_TX_DOORBELL_RESERVED_TX_FIN_FLAG (0x1<<6) 31808c2ecf20Sopenharmony_ci#define ETH_TX_DOORBELL_RESERVED_TX_FIN_FLAG_SHIFT 6 31818c2ecf20Sopenharmony_ci#define ETH_TX_DOORBELL_SPARE (0x1<<7) 31828c2ecf20Sopenharmony_ci#define ETH_TX_DOORBELL_SPARE_SHIFT 7 31838c2ecf20Sopenharmony_ci struct doorbell_hdr hdr; 31848c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 31858c2ecf20Sopenharmony_ci struct doorbell_hdr hdr; 31868c2ecf20Sopenharmony_ci u8 params; 31878c2ecf20Sopenharmony_ci#define ETH_TX_DOORBELL_NUM_BDS (0x3F<<0) 31888c2ecf20Sopenharmony_ci#define ETH_TX_DOORBELL_NUM_BDS_SHIFT 0 31898c2ecf20Sopenharmony_ci#define ETH_TX_DOORBELL_RESERVED_TX_FIN_FLAG (0x1<<6) 31908c2ecf20Sopenharmony_ci#define ETH_TX_DOORBELL_RESERVED_TX_FIN_FLAG_SHIFT 6 31918c2ecf20Sopenharmony_ci#define ETH_TX_DOORBELL_SPARE (0x1<<7) 31928c2ecf20Sopenharmony_ci#define ETH_TX_DOORBELL_SPARE_SHIFT 7 31938c2ecf20Sopenharmony_ci u16 npackets; 31948c2ecf20Sopenharmony_ci#endif 31958c2ecf20Sopenharmony_ci}; 31968c2ecf20Sopenharmony_ci 31978c2ecf20Sopenharmony_ci 31988c2ecf20Sopenharmony_ci/* 31998c2ecf20Sopenharmony_ci * 3 lines. status block 32008c2ecf20Sopenharmony_ci */ 32018c2ecf20Sopenharmony_cistruct hc_status_block_e1x { 32028c2ecf20Sopenharmony_ci __le16 index_values[HC_SB_MAX_INDICES_E1X]; 32038c2ecf20Sopenharmony_ci __le16 running_index[HC_SB_MAX_SM]; 32048c2ecf20Sopenharmony_ci __le32 rsrv[11]; 32058c2ecf20Sopenharmony_ci}; 32068c2ecf20Sopenharmony_ci 32078c2ecf20Sopenharmony_ci/* 32088c2ecf20Sopenharmony_ci * host status block 32098c2ecf20Sopenharmony_ci */ 32108c2ecf20Sopenharmony_cistruct host_hc_status_block_e1x { 32118c2ecf20Sopenharmony_ci struct hc_status_block_e1x sb; 32128c2ecf20Sopenharmony_ci}; 32138c2ecf20Sopenharmony_ci 32148c2ecf20Sopenharmony_ci 32158c2ecf20Sopenharmony_ci/* 32168c2ecf20Sopenharmony_ci * 3 lines. status block 32178c2ecf20Sopenharmony_ci */ 32188c2ecf20Sopenharmony_cistruct hc_status_block_e2 { 32198c2ecf20Sopenharmony_ci __le16 index_values[HC_SB_MAX_INDICES_E2]; 32208c2ecf20Sopenharmony_ci __le16 running_index[HC_SB_MAX_SM]; 32218c2ecf20Sopenharmony_ci __le32 reserved[11]; 32228c2ecf20Sopenharmony_ci}; 32238c2ecf20Sopenharmony_ci 32248c2ecf20Sopenharmony_ci/* 32258c2ecf20Sopenharmony_ci * host status block 32268c2ecf20Sopenharmony_ci */ 32278c2ecf20Sopenharmony_cistruct host_hc_status_block_e2 { 32288c2ecf20Sopenharmony_ci struct hc_status_block_e2 sb; 32298c2ecf20Sopenharmony_ci}; 32308c2ecf20Sopenharmony_ci 32318c2ecf20Sopenharmony_ci 32328c2ecf20Sopenharmony_ci/* 32338c2ecf20Sopenharmony_ci * 5 lines. slow-path status block 32348c2ecf20Sopenharmony_ci */ 32358c2ecf20Sopenharmony_cistruct hc_sp_status_block { 32368c2ecf20Sopenharmony_ci __le16 index_values[HC_SP_SB_MAX_INDICES]; 32378c2ecf20Sopenharmony_ci __le16 running_index; 32388c2ecf20Sopenharmony_ci __le16 rsrv; 32398c2ecf20Sopenharmony_ci u32 rsrv1; 32408c2ecf20Sopenharmony_ci}; 32418c2ecf20Sopenharmony_ci 32428c2ecf20Sopenharmony_ci/* 32438c2ecf20Sopenharmony_ci * host status block 32448c2ecf20Sopenharmony_ci */ 32458c2ecf20Sopenharmony_cistruct host_sp_status_block { 32468c2ecf20Sopenharmony_ci struct atten_sp_status_block atten_status_block; 32478c2ecf20Sopenharmony_ci struct hc_sp_status_block sp_sb; 32488c2ecf20Sopenharmony_ci}; 32498c2ecf20Sopenharmony_ci 32508c2ecf20Sopenharmony_ci 32518c2ecf20Sopenharmony_ci/* 32528c2ecf20Sopenharmony_ci * IGU driver acknowledgment register 32538c2ecf20Sopenharmony_ci */ 32548c2ecf20Sopenharmony_cistruct igu_ack_register { 32558c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 32568c2ecf20Sopenharmony_ci u16 sb_id_and_flags; 32578c2ecf20Sopenharmony_ci#define IGU_ACK_REGISTER_STATUS_BLOCK_ID (0x1F<<0) 32588c2ecf20Sopenharmony_ci#define IGU_ACK_REGISTER_STATUS_BLOCK_ID_SHIFT 0 32598c2ecf20Sopenharmony_ci#define IGU_ACK_REGISTER_STORM_ID (0x7<<5) 32608c2ecf20Sopenharmony_ci#define IGU_ACK_REGISTER_STORM_ID_SHIFT 5 32618c2ecf20Sopenharmony_ci#define IGU_ACK_REGISTER_UPDATE_INDEX (0x1<<8) 32628c2ecf20Sopenharmony_ci#define IGU_ACK_REGISTER_UPDATE_INDEX_SHIFT 8 32638c2ecf20Sopenharmony_ci#define IGU_ACK_REGISTER_INTERRUPT_MODE (0x3<<9) 32648c2ecf20Sopenharmony_ci#define IGU_ACK_REGISTER_INTERRUPT_MODE_SHIFT 9 32658c2ecf20Sopenharmony_ci#define IGU_ACK_REGISTER_RESERVED (0x1F<<11) 32668c2ecf20Sopenharmony_ci#define IGU_ACK_REGISTER_RESERVED_SHIFT 11 32678c2ecf20Sopenharmony_ci u16 status_block_index; 32688c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 32698c2ecf20Sopenharmony_ci u16 status_block_index; 32708c2ecf20Sopenharmony_ci u16 sb_id_and_flags; 32718c2ecf20Sopenharmony_ci#define IGU_ACK_REGISTER_STATUS_BLOCK_ID (0x1F<<0) 32728c2ecf20Sopenharmony_ci#define IGU_ACK_REGISTER_STATUS_BLOCK_ID_SHIFT 0 32738c2ecf20Sopenharmony_ci#define IGU_ACK_REGISTER_STORM_ID (0x7<<5) 32748c2ecf20Sopenharmony_ci#define IGU_ACK_REGISTER_STORM_ID_SHIFT 5 32758c2ecf20Sopenharmony_ci#define IGU_ACK_REGISTER_UPDATE_INDEX (0x1<<8) 32768c2ecf20Sopenharmony_ci#define IGU_ACK_REGISTER_UPDATE_INDEX_SHIFT 8 32778c2ecf20Sopenharmony_ci#define IGU_ACK_REGISTER_INTERRUPT_MODE (0x3<<9) 32788c2ecf20Sopenharmony_ci#define IGU_ACK_REGISTER_INTERRUPT_MODE_SHIFT 9 32798c2ecf20Sopenharmony_ci#define IGU_ACK_REGISTER_RESERVED (0x1F<<11) 32808c2ecf20Sopenharmony_ci#define IGU_ACK_REGISTER_RESERVED_SHIFT 11 32818c2ecf20Sopenharmony_ci#endif 32828c2ecf20Sopenharmony_ci}; 32838c2ecf20Sopenharmony_ci 32848c2ecf20Sopenharmony_ci 32858c2ecf20Sopenharmony_ci/* 32868c2ecf20Sopenharmony_ci * IGU driver acknowledgement register 32878c2ecf20Sopenharmony_ci */ 32888c2ecf20Sopenharmony_cistruct igu_backward_compatible { 32898c2ecf20Sopenharmony_ci u32 sb_id_and_flags; 32908c2ecf20Sopenharmony_ci#define IGU_BACKWARD_COMPATIBLE_SB_INDEX (0xFFFF<<0) 32918c2ecf20Sopenharmony_ci#define IGU_BACKWARD_COMPATIBLE_SB_INDEX_SHIFT 0 32928c2ecf20Sopenharmony_ci#define IGU_BACKWARD_COMPATIBLE_SB_SELECT (0x1F<<16) 32938c2ecf20Sopenharmony_ci#define IGU_BACKWARD_COMPATIBLE_SB_SELECT_SHIFT 16 32948c2ecf20Sopenharmony_ci#define IGU_BACKWARD_COMPATIBLE_SEGMENT_ACCESS (0x7<<21) 32958c2ecf20Sopenharmony_ci#define IGU_BACKWARD_COMPATIBLE_SEGMENT_ACCESS_SHIFT 21 32968c2ecf20Sopenharmony_ci#define IGU_BACKWARD_COMPATIBLE_BUPDATE (0x1<<24) 32978c2ecf20Sopenharmony_ci#define IGU_BACKWARD_COMPATIBLE_BUPDATE_SHIFT 24 32988c2ecf20Sopenharmony_ci#define IGU_BACKWARD_COMPATIBLE_ENABLE_INT (0x3<<25) 32998c2ecf20Sopenharmony_ci#define IGU_BACKWARD_COMPATIBLE_ENABLE_INT_SHIFT 25 33008c2ecf20Sopenharmony_ci#define IGU_BACKWARD_COMPATIBLE_RESERVED_0 (0x1F<<27) 33018c2ecf20Sopenharmony_ci#define IGU_BACKWARD_COMPATIBLE_RESERVED_0_SHIFT 27 33028c2ecf20Sopenharmony_ci u32 reserved_2; 33038c2ecf20Sopenharmony_ci}; 33048c2ecf20Sopenharmony_ci 33058c2ecf20Sopenharmony_ci 33068c2ecf20Sopenharmony_ci/* 33078c2ecf20Sopenharmony_ci * IGU driver acknowledgement register 33088c2ecf20Sopenharmony_ci */ 33098c2ecf20Sopenharmony_cistruct igu_regular { 33108c2ecf20Sopenharmony_ci u32 sb_id_and_flags; 33118c2ecf20Sopenharmony_ci#define IGU_REGULAR_SB_INDEX (0xFFFFF<<0) 33128c2ecf20Sopenharmony_ci#define IGU_REGULAR_SB_INDEX_SHIFT 0 33138c2ecf20Sopenharmony_ci#define IGU_REGULAR_RESERVED0 (0x1<<20) 33148c2ecf20Sopenharmony_ci#define IGU_REGULAR_RESERVED0_SHIFT 20 33158c2ecf20Sopenharmony_ci#define IGU_REGULAR_SEGMENT_ACCESS (0x7<<21) 33168c2ecf20Sopenharmony_ci#define IGU_REGULAR_SEGMENT_ACCESS_SHIFT 21 33178c2ecf20Sopenharmony_ci#define IGU_REGULAR_BUPDATE (0x1<<24) 33188c2ecf20Sopenharmony_ci#define IGU_REGULAR_BUPDATE_SHIFT 24 33198c2ecf20Sopenharmony_ci#define IGU_REGULAR_ENABLE_INT (0x3<<25) 33208c2ecf20Sopenharmony_ci#define IGU_REGULAR_ENABLE_INT_SHIFT 25 33218c2ecf20Sopenharmony_ci#define IGU_REGULAR_RESERVED_1 (0x1<<27) 33228c2ecf20Sopenharmony_ci#define IGU_REGULAR_RESERVED_1_SHIFT 27 33238c2ecf20Sopenharmony_ci#define IGU_REGULAR_CLEANUP_TYPE (0x3<<28) 33248c2ecf20Sopenharmony_ci#define IGU_REGULAR_CLEANUP_TYPE_SHIFT 28 33258c2ecf20Sopenharmony_ci#define IGU_REGULAR_CLEANUP_SET (0x1<<30) 33268c2ecf20Sopenharmony_ci#define IGU_REGULAR_CLEANUP_SET_SHIFT 30 33278c2ecf20Sopenharmony_ci#define IGU_REGULAR_BCLEANUP (0x1<<31) 33288c2ecf20Sopenharmony_ci#define IGU_REGULAR_BCLEANUP_SHIFT 31 33298c2ecf20Sopenharmony_ci u32 reserved_2; 33308c2ecf20Sopenharmony_ci}; 33318c2ecf20Sopenharmony_ci 33328c2ecf20Sopenharmony_ci/* 33338c2ecf20Sopenharmony_ci * IGU driver acknowledgement register 33348c2ecf20Sopenharmony_ci */ 33358c2ecf20Sopenharmony_ciunion igu_consprod_reg { 33368c2ecf20Sopenharmony_ci struct igu_regular regular; 33378c2ecf20Sopenharmony_ci struct igu_backward_compatible backward_compatible; 33388c2ecf20Sopenharmony_ci}; 33398c2ecf20Sopenharmony_ci 33408c2ecf20Sopenharmony_ci 33418c2ecf20Sopenharmony_ci/* 33428c2ecf20Sopenharmony_ci * Igu control commands 33438c2ecf20Sopenharmony_ci */ 33448c2ecf20Sopenharmony_cienum igu_ctrl_cmd { 33458c2ecf20Sopenharmony_ci IGU_CTRL_CMD_TYPE_RD, 33468c2ecf20Sopenharmony_ci IGU_CTRL_CMD_TYPE_WR, 33478c2ecf20Sopenharmony_ci MAX_IGU_CTRL_CMD 33488c2ecf20Sopenharmony_ci}; 33498c2ecf20Sopenharmony_ci 33508c2ecf20Sopenharmony_ci 33518c2ecf20Sopenharmony_ci/* 33528c2ecf20Sopenharmony_ci * Control register for the IGU command register 33538c2ecf20Sopenharmony_ci */ 33548c2ecf20Sopenharmony_cistruct igu_ctrl_reg { 33558c2ecf20Sopenharmony_ci u32 ctrl_data; 33568c2ecf20Sopenharmony_ci#define IGU_CTRL_REG_ADDRESS (0xFFF<<0) 33578c2ecf20Sopenharmony_ci#define IGU_CTRL_REG_ADDRESS_SHIFT 0 33588c2ecf20Sopenharmony_ci#define IGU_CTRL_REG_FID (0x7F<<12) 33598c2ecf20Sopenharmony_ci#define IGU_CTRL_REG_FID_SHIFT 12 33608c2ecf20Sopenharmony_ci#define IGU_CTRL_REG_RESERVED (0x1<<19) 33618c2ecf20Sopenharmony_ci#define IGU_CTRL_REG_RESERVED_SHIFT 19 33628c2ecf20Sopenharmony_ci#define IGU_CTRL_REG_TYPE (0x1<<20) 33638c2ecf20Sopenharmony_ci#define IGU_CTRL_REG_TYPE_SHIFT 20 33648c2ecf20Sopenharmony_ci#define IGU_CTRL_REG_UNUSED (0x7FF<<21) 33658c2ecf20Sopenharmony_ci#define IGU_CTRL_REG_UNUSED_SHIFT 21 33668c2ecf20Sopenharmony_ci}; 33678c2ecf20Sopenharmony_ci 33688c2ecf20Sopenharmony_ci 33698c2ecf20Sopenharmony_ci/* 33708c2ecf20Sopenharmony_ci * Igu interrupt command 33718c2ecf20Sopenharmony_ci */ 33728c2ecf20Sopenharmony_cienum igu_int_cmd { 33738c2ecf20Sopenharmony_ci IGU_INT_ENABLE, 33748c2ecf20Sopenharmony_ci IGU_INT_DISABLE, 33758c2ecf20Sopenharmony_ci IGU_INT_NOP, 33768c2ecf20Sopenharmony_ci IGU_INT_NOP2, 33778c2ecf20Sopenharmony_ci MAX_IGU_INT_CMD 33788c2ecf20Sopenharmony_ci}; 33798c2ecf20Sopenharmony_ci 33808c2ecf20Sopenharmony_ci 33818c2ecf20Sopenharmony_ci/* 33828c2ecf20Sopenharmony_ci * Igu segments 33838c2ecf20Sopenharmony_ci */ 33848c2ecf20Sopenharmony_cienum igu_seg_access { 33858c2ecf20Sopenharmony_ci IGU_SEG_ACCESS_NORM, 33868c2ecf20Sopenharmony_ci IGU_SEG_ACCESS_DEF, 33878c2ecf20Sopenharmony_ci IGU_SEG_ACCESS_ATTN, 33888c2ecf20Sopenharmony_ci MAX_IGU_SEG_ACCESS 33898c2ecf20Sopenharmony_ci}; 33908c2ecf20Sopenharmony_ci 33918c2ecf20Sopenharmony_ci 33928c2ecf20Sopenharmony_ci/* 33938c2ecf20Sopenharmony_ci * Parser parsing flags field 33948c2ecf20Sopenharmony_ci */ 33958c2ecf20Sopenharmony_cistruct parsing_flags { 33968c2ecf20Sopenharmony_ci __le16 flags; 33978c2ecf20Sopenharmony_ci#define PARSING_FLAGS_ETHERNET_ADDRESS_TYPE (0x1<<0) 33988c2ecf20Sopenharmony_ci#define PARSING_FLAGS_ETHERNET_ADDRESS_TYPE_SHIFT 0 33998c2ecf20Sopenharmony_ci#define PARSING_FLAGS_VLAN (0x1<<1) 34008c2ecf20Sopenharmony_ci#define PARSING_FLAGS_VLAN_SHIFT 1 34018c2ecf20Sopenharmony_ci#define PARSING_FLAGS_EXTRA_VLAN (0x1<<2) 34028c2ecf20Sopenharmony_ci#define PARSING_FLAGS_EXTRA_VLAN_SHIFT 2 34038c2ecf20Sopenharmony_ci#define PARSING_FLAGS_OVER_ETHERNET_PROTOCOL (0x3<<3) 34048c2ecf20Sopenharmony_ci#define PARSING_FLAGS_OVER_ETHERNET_PROTOCOL_SHIFT 3 34058c2ecf20Sopenharmony_ci#define PARSING_FLAGS_IP_OPTIONS (0x1<<5) 34068c2ecf20Sopenharmony_ci#define PARSING_FLAGS_IP_OPTIONS_SHIFT 5 34078c2ecf20Sopenharmony_ci#define PARSING_FLAGS_FRAGMENTATION_STATUS (0x1<<6) 34088c2ecf20Sopenharmony_ci#define PARSING_FLAGS_FRAGMENTATION_STATUS_SHIFT 6 34098c2ecf20Sopenharmony_ci#define PARSING_FLAGS_OVER_IP_PROTOCOL (0x3<<7) 34108c2ecf20Sopenharmony_ci#define PARSING_FLAGS_OVER_IP_PROTOCOL_SHIFT 7 34118c2ecf20Sopenharmony_ci#define PARSING_FLAGS_PURE_ACK_INDICATION (0x1<<9) 34128c2ecf20Sopenharmony_ci#define PARSING_FLAGS_PURE_ACK_INDICATION_SHIFT 9 34138c2ecf20Sopenharmony_ci#define PARSING_FLAGS_TCP_OPTIONS_EXIST (0x1<<10) 34148c2ecf20Sopenharmony_ci#define PARSING_FLAGS_TCP_OPTIONS_EXIST_SHIFT 10 34158c2ecf20Sopenharmony_ci#define PARSING_FLAGS_TIME_STAMP_EXIST_FLAG (0x1<<11) 34168c2ecf20Sopenharmony_ci#define PARSING_FLAGS_TIME_STAMP_EXIST_FLAG_SHIFT 11 34178c2ecf20Sopenharmony_ci#define PARSING_FLAGS_CONNECTION_MATCH (0x1<<12) 34188c2ecf20Sopenharmony_ci#define PARSING_FLAGS_CONNECTION_MATCH_SHIFT 12 34198c2ecf20Sopenharmony_ci#define PARSING_FLAGS_LLC_SNAP (0x1<<13) 34208c2ecf20Sopenharmony_ci#define PARSING_FLAGS_LLC_SNAP_SHIFT 13 34218c2ecf20Sopenharmony_ci#define PARSING_FLAGS_RESERVED0 (0x3<<14) 34228c2ecf20Sopenharmony_ci#define PARSING_FLAGS_RESERVED0_SHIFT 14 34238c2ecf20Sopenharmony_ci}; 34248c2ecf20Sopenharmony_ci 34258c2ecf20Sopenharmony_ci 34268c2ecf20Sopenharmony_ci/* 34278c2ecf20Sopenharmony_ci * Parsing flags for TCP ACK type 34288c2ecf20Sopenharmony_ci */ 34298c2ecf20Sopenharmony_cienum prs_flags_ack_type { 34308c2ecf20Sopenharmony_ci PRS_FLAG_PUREACK_PIGGY, 34318c2ecf20Sopenharmony_ci PRS_FLAG_PUREACK_PURE, 34328c2ecf20Sopenharmony_ci MAX_PRS_FLAGS_ACK_TYPE 34338c2ecf20Sopenharmony_ci}; 34348c2ecf20Sopenharmony_ci 34358c2ecf20Sopenharmony_ci 34368c2ecf20Sopenharmony_ci/* 34378c2ecf20Sopenharmony_ci * Parsing flags for Ethernet address type 34388c2ecf20Sopenharmony_ci */ 34398c2ecf20Sopenharmony_cienum prs_flags_eth_addr_type { 34408c2ecf20Sopenharmony_ci PRS_FLAG_ETHTYPE_NON_UNICAST, 34418c2ecf20Sopenharmony_ci PRS_FLAG_ETHTYPE_UNICAST, 34428c2ecf20Sopenharmony_ci MAX_PRS_FLAGS_ETH_ADDR_TYPE 34438c2ecf20Sopenharmony_ci}; 34448c2ecf20Sopenharmony_ci 34458c2ecf20Sopenharmony_ci 34468c2ecf20Sopenharmony_ci/* 34478c2ecf20Sopenharmony_ci * Parsing flags for over-ethernet protocol 34488c2ecf20Sopenharmony_ci */ 34498c2ecf20Sopenharmony_cienum prs_flags_over_eth { 34508c2ecf20Sopenharmony_ci PRS_FLAG_OVERETH_UNKNOWN, 34518c2ecf20Sopenharmony_ci PRS_FLAG_OVERETH_IPV4, 34528c2ecf20Sopenharmony_ci PRS_FLAG_OVERETH_IPV6, 34538c2ecf20Sopenharmony_ci PRS_FLAG_OVERETH_LLCSNAP_UNKNOWN, 34548c2ecf20Sopenharmony_ci MAX_PRS_FLAGS_OVER_ETH 34558c2ecf20Sopenharmony_ci}; 34568c2ecf20Sopenharmony_ci 34578c2ecf20Sopenharmony_ci 34588c2ecf20Sopenharmony_ci/* 34598c2ecf20Sopenharmony_ci * Parsing flags for over-IP protocol 34608c2ecf20Sopenharmony_ci */ 34618c2ecf20Sopenharmony_cienum prs_flags_over_ip { 34628c2ecf20Sopenharmony_ci PRS_FLAG_OVERIP_UNKNOWN, 34638c2ecf20Sopenharmony_ci PRS_FLAG_OVERIP_TCP, 34648c2ecf20Sopenharmony_ci PRS_FLAG_OVERIP_UDP, 34658c2ecf20Sopenharmony_ci MAX_PRS_FLAGS_OVER_IP 34668c2ecf20Sopenharmony_ci}; 34678c2ecf20Sopenharmony_ci 34688c2ecf20Sopenharmony_ci 34698c2ecf20Sopenharmony_ci/* 34708c2ecf20Sopenharmony_ci * SDM operation gen command (generate aggregative interrupt) 34718c2ecf20Sopenharmony_ci */ 34728c2ecf20Sopenharmony_cistruct sdm_op_gen { 34738c2ecf20Sopenharmony_ci __le32 command; 34748c2ecf20Sopenharmony_ci#define SDM_OP_GEN_COMP_PARAM (0x1F<<0) 34758c2ecf20Sopenharmony_ci#define SDM_OP_GEN_COMP_PARAM_SHIFT 0 34768c2ecf20Sopenharmony_ci#define SDM_OP_GEN_COMP_TYPE (0x7<<5) 34778c2ecf20Sopenharmony_ci#define SDM_OP_GEN_COMP_TYPE_SHIFT 5 34788c2ecf20Sopenharmony_ci#define SDM_OP_GEN_AGG_VECT_IDX (0xFF<<8) 34798c2ecf20Sopenharmony_ci#define SDM_OP_GEN_AGG_VECT_IDX_SHIFT 8 34808c2ecf20Sopenharmony_ci#define SDM_OP_GEN_AGG_VECT_IDX_VALID (0x1<<16) 34818c2ecf20Sopenharmony_ci#define SDM_OP_GEN_AGG_VECT_IDX_VALID_SHIFT 16 34828c2ecf20Sopenharmony_ci#define SDM_OP_GEN_RESERVED (0x7FFF<<17) 34838c2ecf20Sopenharmony_ci#define SDM_OP_GEN_RESERVED_SHIFT 17 34848c2ecf20Sopenharmony_ci}; 34858c2ecf20Sopenharmony_ci 34868c2ecf20Sopenharmony_ci 34878c2ecf20Sopenharmony_ci/* 34888c2ecf20Sopenharmony_ci * Timers connection context 34898c2ecf20Sopenharmony_ci */ 34908c2ecf20Sopenharmony_cistruct timers_block_context { 34918c2ecf20Sopenharmony_ci u32 __reserved_0; 34928c2ecf20Sopenharmony_ci u32 __reserved_1; 34938c2ecf20Sopenharmony_ci u32 __reserved_2; 34948c2ecf20Sopenharmony_ci u32 flags; 34958c2ecf20Sopenharmony_ci#define __TIMERS_BLOCK_CONTEXT_NUM_OF_ACTIVE_TIMERS (0x3<<0) 34968c2ecf20Sopenharmony_ci#define __TIMERS_BLOCK_CONTEXT_NUM_OF_ACTIVE_TIMERS_SHIFT 0 34978c2ecf20Sopenharmony_ci#define TIMERS_BLOCK_CONTEXT_CONN_VALID_FLG (0x1<<2) 34988c2ecf20Sopenharmony_ci#define TIMERS_BLOCK_CONTEXT_CONN_VALID_FLG_SHIFT 2 34998c2ecf20Sopenharmony_ci#define __TIMERS_BLOCK_CONTEXT_RESERVED0 (0x1FFFFFFF<<3) 35008c2ecf20Sopenharmony_ci#define __TIMERS_BLOCK_CONTEXT_RESERVED0_SHIFT 3 35018c2ecf20Sopenharmony_ci}; 35028c2ecf20Sopenharmony_ci 35038c2ecf20Sopenharmony_ci 35048c2ecf20Sopenharmony_ci/* 35058c2ecf20Sopenharmony_ci * The eth aggregative context of Tstorm 35068c2ecf20Sopenharmony_ci */ 35078c2ecf20Sopenharmony_cistruct tstorm_eth_ag_context { 35088c2ecf20Sopenharmony_ci u32 __reserved0[14]; 35098c2ecf20Sopenharmony_ci}; 35108c2ecf20Sopenharmony_ci 35118c2ecf20Sopenharmony_ci 35128c2ecf20Sopenharmony_ci/* 35138c2ecf20Sopenharmony_ci * The eth aggregative context of Ustorm 35148c2ecf20Sopenharmony_ci */ 35158c2ecf20Sopenharmony_cistruct ustorm_eth_ag_context { 35168c2ecf20Sopenharmony_ci u32 __reserved0; 35178c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 35188c2ecf20Sopenharmony_ci u8 cdu_usage; 35198c2ecf20Sopenharmony_ci u8 __reserved2; 35208c2ecf20Sopenharmony_ci u16 __reserved1; 35218c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 35228c2ecf20Sopenharmony_ci u16 __reserved1; 35238c2ecf20Sopenharmony_ci u8 __reserved2; 35248c2ecf20Sopenharmony_ci u8 cdu_usage; 35258c2ecf20Sopenharmony_ci#endif 35268c2ecf20Sopenharmony_ci u32 __reserved3[6]; 35278c2ecf20Sopenharmony_ci}; 35288c2ecf20Sopenharmony_ci 35298c2ecf20Sopenharmony_ci 35308c2ecf20Sopenharmony_ci/* 35318c2ecf20Sopenharmony_ci * The eth aggregative context of Xstorm 35328c2ecf20Sopenharmony_ci */ 35338c2ecf20Sopenharmony_cistruct xstorm_eth_ag_context { 35348c2ecf20Sopenharmony_ci u32 reserved0; 35358c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 35368c2ecf20Sopenharmony_ci u8 cdu_reserved; 35378c2ecf20Sopenharmony_ci u8 reserved2; 35388c2ecf20Sopenharmony_ci u16 reserved1; 35398c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 35408c2ecf20Sopenharmony_ci u16 reserved1; 35418c2ecf20Sopenharmony_ci u8 reserved2; 35428c2ecf20Sopenharmony_ci u8 cdu_reserved; 35438c2ecf20Sopenharmony_ci#endif 35448c2ecf20Sopenharmony_ci u32 reserved3[30]; 35458c2ecf20Sopenharmony_ci}; 35468c2ecf20Sopenharmony_ci 35478c2ecf20Sopenharmony_ci 35488c2ecf20Sopenharmony_ci/* 35498c2ecf20Sopenharmony_ci * doorbell message sent to the chip 35508c2ecf20Sopenharmony_ci */ 35518c2ecf20Sopenharmony_cistruct doorbell { 35528c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 35538c2ecf20Sopenharmony_ci u16 zero_fill2; 35548c2ecf20Sopenharmony_ci u8 zero_fill1; 35558c2ecf20Sopenharmony_ci struct doorbell_hdr header; 35568c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 35578c2ecf20Sopenharmony_ci struct doorbell_hdr header; 35588c2ecf20Sopenharmony_ci u8 zero_fill1; 35598c2ecf20Sopenharmony_ci u16 zero_fill2; 35608c2ecf20Sopenharmony_ci#endif 35618c2ecf20Sopenharmony_ci}; 35628c2ecf20Sopenharmony_ci 35638c2ecf20Sopenharmony_ci 35648c2ecf20Sopenharmony_ci/* 35658c2ecf20Sopenharmony_ci * doorbell message sent to the chip 35668c2ecf20Sopenharmony_ci */ 35678c2ecf20Sopenharmony_cistruct doorbell_set_prod { 35688c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 35698c2ecf20Sopenharmony_ci u16 prod; 35708c2ecf20Sopenharmony_ci u8 zero_fill1; 35718c2ecf20Sopenharmony_ci struct doorbell_hdr header; 35728c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 35738c2ecf20Sopenharmony_ci struct doorbell_hdr header; 35748c2ecf20Sopenharmony_ci u8 zero_fill1; 35758c2ecf20Sopenharmony_ci u16 prod; 35768c2ecf20Sopenharmony_ci#endif 35778c2ecf20Sopenharmony_ci}; 35788c2ecf20Sopenharmony_ci 35798c2ecf20Sopenharmony_ci 35808c2ecf20Sopenharmony_cistruct regpair { 35818c2ecf20Sopenharmony_ci __le32 lo; 35828c2ecf20Sopenharmony_ci __le32 hi; 35838c2ecf20Sopenharmony_ci}; 35848c2ecf20Sopenharmony_ci 35858c2ecf20Sopenharmony_cistruct regpair_native { 35868c2ecf20Sopenharmony_ci u32 lo; 35878c2ecf20Sopenharmony_ci u32 hi; 35888c2ecf20Sopenharmony_ci}; 35898c2ecf20Sopenharmony_ci 35908c2ecf20Sopenharmony_ci/* 35918c2ecf20Sopenharmony_ci * Classify rule opcodes in E2/E3 35928c2ecf20Sopenharmony_ci */ 35938c2ecf20Sopenharmony_cienum classify_rule { 35948c2ecf20Sopenharmony_ci CLASSIFY_RULE_OPCODE_MAC, 35958c2ecf20Sopenharmony_ci CLASSIFY_RULE_OPCODE_VLAN, 35968c2ecf20Sopenharmony_ci CLASSIFY_RULE_OPCODE_PAIR, 35978c2ecf20Sopenharmony_ci CLASSIFY_RULE_OPCODE_IMAC_VNI, 35988c2ecf20Sopenharmony_ci MAX_CLASSIFY_RULE 35998c2ecf20Sopenharmony_ci}; 36008c2ecf20Sopenharmony_ci 36018c2ecf20Sopenharmony_ci 36028c2ecf20Sopenharmony_ci/* 36038c2ecf20Sopenharmony_ci * Classify rule types in E2/E3 36048c2ecf20Sopenharmony_ci */ 36058c2ecf20Sopenharmony_cienum classify_rule_action_type { 36068c2ecf20Sopenharmony_ci CLASSIFY_RULE_REMOVE, 36078c2ecf20Sopenharmony_ci CLASSIFY_RULE_ADD, 36088c2ecf20Sopenharmony_ci MAX_CLASSIFY_RULE_ACTION_TYPE 36098c2ecf20Sopenharmony_ci}; 36108c2ecf20Sopenharmony_ci 36118c2ecf20Sopenharmony_ci 36128c2ecf20Sopenharmony_ci/* 36138c2ecf20Sopenharmony_ci * client init ramrod data 36148c2ecf20Sopenharmony_ci */ 36158c2ecf20Sopenharmony_cistruct client_init_general_data { 36168c2ecf20Sopenharmony_ci u8 client_id; 36178c2ecf20Sopenharmony_ci u8 statistics_counter_id; 36188c2ecf20Sopenharmony_ci u8 statistics_en_flg; 36198c2ecf20Sopenharmony_ci u8 is_fcoe_flg; 36208c2ecf20Sopenharmony_ci u8 activate_flg; 36218c2ecf20Sopenharmony_ci u8 sp_client_id; 36228c2ecf20Sopenharmony_ci __le16 mtu; 36238c2ecf20Sopenharmony_ci u8 statistics_zero_flg; 36248c2ecf20Sopenharmony_ci u8 func_id; 36258c2ecf20Sopenharmony_ci u8 cos; 36268c2ecf20Sopenharmony_ci u8 traffic_type; 36278c2ecf20Sopenharmony_ci u8 fp_hsi_ver; 36288c2ecf20Sopenharmony_ci u8 reserved0[3]; 36298c2ecf20Sopenharmony_ci}; 36308c2ecf20Sopenharmony_ci 36318c2ecf20Sopenharmony_ci 36328c2ecf20Sopenharmony_ci/* 36338c2ecf20Sopenharmony_ci * client init rx data 36348c2ecf20Sopenharmony_ci */ 36358c2ecf20Sopenharmony_cistruct client_init_rx_data { 36368c2ecf20Sopenharmony_ci u8 tpa_en; 36378c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_TPA_EN_IPV4 (0x1<<0) 36388c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_TPA_EN_IPV4_SHIFT 0 36398c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_TPA_EN_IPV6 (0x1<<1) 36408c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_TPA_EN_IPV6_SHIFT 1 36418c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_TPA_MODE (0x1<<2) 36428c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_TPA_MODE_SHIFT 2 36438c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_TPA_OVER_VLAN_DISABLE (0x1<<3) 36448c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_TPA_OVER_VLAN_DISABLE_SHIFT 3 36458c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_RESERVED5 (0xF<<4) 36468c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_RESERVED5_SHIFT 4 36478c2ecf20Sopenharmony_ci u8 vmqueue_mode_en_flg; 36488c2ecf20Sopenharmony_ci u8 extra_data_over_sgl_en_flg; 36498c2ecf20Sopenharmony_ci u8 cache_line_alignment_log_size; 36508c2ecf20Sopenharmony_ci u8 enable_dynamic_hc; 36518c2ecf20Sopenharmony_ci u8 max_sges_for_packet; 36528c2ecf20Sopenharmony_ci u8 client_qzone_id; 36538c2ecf20Sopenharmony_ci u8 drop_ip_cs_err_flg; 36548c2ecf20Sopenharmony_ci u8 drop_tcp_cs_err_flg; 36558c2ecf20Sopenharmony_ci u8 drop_ttl0_flg; 36568c2ecf20Sopenharmony_ci u8 drop_udp_cs_err_flg; 36578c2ecf20Sopenharmony_ci u8 inner_vlan_removal_enable_flg; 36588c2ecf20Sopenharmony_ci u8 outer_vlan_removal_enable_flg; 36598c2ecf20Sopenharmony_ci u8 status_block_id; 36608c2ecf20Sopenharmony_ci u8 rx_sb_index_number; 36618c2ecf20Sopenharmony_ci u8 dont_verify_rings_pause_thr_flg; 36628c2ecf20Sopenharmony_ci u8 max_tpa_queues; 36638c2ecf20Sopenharmony_ci u8 silent_vlan_removal_flg; 36648c2ecf20Sopenharmony_ci __le16 max_bytes_on_bd; 36658c2ecf20Sopenharmony_ci __le16 sge_buff_size; 36668c2ecf20Sopenharmony_ci u8 approx_mcast_engine_id; 36678c2ecf20Sopenharmony_ci u8 rss_engine_id; 36688c2ecf20Sopenharmony_ci struct regpair bd_page_base; 36698c2ecf20Sopenharmony_ci struct regpair sge_page_base; 36708c2ecf20Sopenharmony_ci struct regpair cqe_page_base; 36718c2ecf20Sopenharmony_ci u8 is_leading_rss; 36728c2ecf20Sopenharmony_ci u8 is_approx_mcast; 36738c2ecf20Sopenharmony_ci __le16 max_agg_size; 36748c2ecf20Sopenharmony_ci __le16 state; 36758c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_UCAST_DROP_ALL (0x1<<0) 36768c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_UCAST_DROP_ALL_SHIFT 0 36778c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_UCAST_ACCEPT_ALL (0x1<<1) 36788c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_UCAST_ACCEPT_ALL_SHIFT 1 36798c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_UCAST_ACCEPT_UNMATCHED (0x1<<2) 36808c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_UCAST_ACCEPT_UNMATCHED_SHIFT 2 36818c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_MCAST_DROP_ALL (0x1<<3) 36828c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_MCAST_DROP_ALL_SHIFT 3 36838c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_MCAST_ACCEPT_ALL (0x1<<4) 36848c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_MCAST_ACCEPT_ALL_SHIFT 4 36858c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_BCAST_ACCEPT_ALL (0x1<<5) 36868c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_BCAST_ACCEPT_ALL_SHIFT 5 36878c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_ACCEPT_ANY_VLAN (0x1<<6) 36888c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_ACCEPT_ANY_VLAN_SHIFT 6 36898c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_RESERVED2 (0x1FF<<7) 36908c2ecf20Sopenharmony_ci#define CLIENT_INIT_RX_DATA_RESERVED2_SHIFT 7 36918c2ecf20Sopenharmony_ci __le16 cqe_pause_thr_low; 36928c2ecf20Sopenharmony_ci __le16 cqe_pause_thr_high; 36938c2ecf20Sopenharmony_ci __le16 bd_pause_thr_low; 36948c2ecf20Sopenharmony_ci __le16 bd_pause_thr_high; 36958c2ecf20Sopenharmony_ci __le16 sge_pause_thr_low; 36968c2ecf20Sopenharmony_ci __le16 sge_pause_thr_high; 36978c2ecf20Sopenharmony_ci __le16 rx_cos_mask; 36988c2ecf20Sopenharmony_ci __le16 silent_vlan_value; 36998c2ecf20Sopenharmony_ci __le16 silent_vlan_mask; 37008c2ecf20Sopenharmony_ci u8 handle_ptp_pkts_flg; 37018c2ecf20Sopenharmony_ci u8 reserved6[3]; 37028c2ecf20Sopenharmony_ci __le32 reserved7; 37038c2ecf20Sopenharmony_ci}; 37048c2ecf20Sopenharmony_ci 37058c2ecf20Sopenharmony_ci/* 37068c2ecf20Sopenharmony_ci * client init tx data 37078c2ecf20Sopenharmony_ci */ 37088c2ecf20Sopenharmony_cistruct client_init_tx_data { 37098c2ecf20Sopenharmony_ci u8 enforce_security_flg; 37108c2ecf20Sopenharmony_ci u8 tx_status_block_id; 37118c2ecf20Sopenharmony_ci u8 tx_sb_index_number; 37128c2ecf20Sopenharmony_ci u8 tss_leading_client_id; 37138c2ecf20Sopenharmony_ci u8 tx_switching_flg; 37148c2ecf20Sopenharmony_ci u8 anti_spoofing_flg; 37158c2ecf20Sopenharmony_ci __le16 default_vlan; 37168c2ecf20Sopenharmony_ci struct regpair tx_bd_page_base; 37178c2ecf20Sopenharmony_ci __le16 state; 37188c2ecf20Sopenharmony_ci#define CLIENT_INIT_TX_DATA_UCAST_ACCEPT_ALL (0x1<<0) 37198c2ecf20Sopenharmony_ci#define CLIENT_INIT_TX_DATA_UCAST_ACCEPT_ALL_SHIFT 0 37208c2ecf20Sopenharmony_ci#define CLIENT_INIT_TX_DATA_MCAST_ACCEPT_ALL (0x1<<1) 37218c2ecf20Sopenharmony_ci#define CLIENT_INIT_TX_DATA_MCAST_ACCEPT_ALL_SHIFT 1 37228c2ecf20Sopenharmony_ci#define CLIENT_INIT_TX_DATA_BCAST_ACCEPT_ALL (0x1<<2) 37238c2ecf20Sopenharmony_ci#define CLIENT_INIT_TX_DATA_BCAST_ACCEPT_ALL_SHIFT 2 37248c2ecf20Sopenharmony_ci#define CLIENT_INIT_TX_DATA_ACCEPT_ANY_VLAN (0x1<<3) 37258c2ecf20Sopenharmony_ci#define CLIENT_INIT_TX_DATA_ACCEPT_ANY_VLAN_SHIFT 3 37268c2ecf20Sopenharmony_ci#define CLIENT_INIT_TX_DATA_RESERVED0 (0xFFF<<4) 37278c2ecf20Sopenharmony_ci#define CLIENT_INIT_TX_DATA_RESERVED0_SHIFT 4 37288c2ecf20Sopenharmony_ci u8 default_vlan_flg; 37298c2ecf20Sopenharmony_ci u8 force_default_pri_flg; 37308c2ecf20Sopenharmony_ci u8 tunnel_lso_inc_ip_id; 37318c2ecf20Sopenharmony_ci u8 refuse_outband_vlan_flg; 37328c2ecf20Sopenharmony_ci u8 tunnel_non_lso_pcsum_location; 37338c2ecf20Sopenharmony_ci u8 tunnel_non_lso_outer_ip_csum_location; 37348c2ecf20Sopenharmony_ci}; 37358c2ecf20Sopenharmony_ci 37368c2ecf20Sopenharmony_ci/* 37378c2ecf20Sopenharmony_ci * client init ramrod data 37388c2ecf20Sopenharmony_ci */ 37398c2ecf20Sopenharmony_cistruct client_init_ramrod_data { 37408c2ecf20Sopenharmony_ci struct client_init_general_data general; 37418c2ecf20Sopenharmony_ci struct client_init_rx_data rx; 37428c2ecf20Sopenharmony_ci struct client_init_tx_data tx; 37438c2ecf20Sopenharmony_ci}; 37448c2ecf20Sopenharmony_ci 37458c2ecf20Sopenharmony_ci 37468c2ecf20Sopenharmony_ci/* 37478c2ecf20Sopenharmony_ci * client update ramrod data 37488c2ecf20Sopenharmony_ci */ 37498c2ecf20Sopenharmony_cistruct client_update_ramrod_data { 37508c2ecf20Sopenharmony_ci u8 client_id; 37518c2ecf20Sopenharmony_ci u8 func_id; 37528c2ecf20Sopenharmony_ci u8 inner_vlan_removal_enable_flg; 37538c2ecf20Sopenharmony_ci u8 inner_vlan_removal_change_flg; 37548c2ecf20Sopenharmony_ci u8 outer_vlan_removal_enable_flg; 37558c2ecf20Sopenharmony_ci u8 outer_vlan_removal_change_flg; 37568c2ecf20Sopenharmony_ci u8 anti_spoofing_enable_flg; 37578c2ecf20Sopenharmony_ci u8 anti_spoofing_change_flg; 37588c2ecf20Sopenharmony_ci u8 activate_flg; 37598c2ecf20Sopenharmony_ci u8 activate_change_flg; 37608c2ecf20Sopenharmony_ci __le16 default_vlan; 37618c2ecf20Sopenharmony_ci u8 default_vlan_enable_flg; 37628c2ecf20Sopenharmony_ci u8 default_vlan_change_flg; 37638c2ecf20Sopenharmony_ci __le16 silent_vlan_value; 37648c2ecf20Sopenharmony_ci __le16 silent_vlan_mask; 37658c2ecf20Sopenharmony_ci u8 silent_vlan_removal_flg; 37668c2ecf20Sopenharmony_ci u8 silent_vlan_change_flg; 37678c2ecf20Sopenharmony_ci u8 refuse_outband_vlan_flg; 37688c2ecf20Sopenharmony_ci u8 refuse_outband_vlan_change_flg; 37698c2ecf20Sopenharmony_ci u8 tx_switching_flg; 37708c2ecf20Sopenharmony_ci u8 tx_switching_change_flg; 37718c2ecf20Sopenharmony_ci u8 handle_ptp_pkts_flg; 37728c2ecf20Sopenharmony_ci u8 handle_ptp_pkts_change_flg; 37738c2ecf20Sopenharmony_ci __le16 reserved1; 37748c2ecf20Sopenharmony_ci __le32 echo; 37758c2ecf20Sopenharmony_ci}; 37768c2ecf20Sopenharmony_ci 37778c2ecf20Sopenharmony_ci 37788c2ecf20Sopenharmony_ci/* 37798c2ecf20Sopenharmony_ci * The eth storm context of Cstorm 37808c2ecf20Sopenharmony_ci */ 37818c2ecf20Sopenharmony_cistruct cstorm_eth_st_context { 37828c2ecf20Sopenharmony_ci u32 __reserved0[4]; 37838c2ecf20Sopenharmony_ci}; 37848c2ecf20Sopenharmony_ci 37858c2ecf20Sopenharmony_ci 37868c2ecf20Sopenharmony_cistruct double_regpair { 37878c2ecf20Sopenharmony_ci u32 regpair0_lo; 37888c2ecf20Sopenharmony_ci u32 regpair0_hi; 37898c2ecf20Sopenharmony_ci u32 regpair1_lo; 37908c2ecf20Sopenharmony_ci u32 regpair1_hi; 37918c2ecf20Sopenharmony_ci}; 37928c2ecf20Sopenharmony_ci 37938c2ecf20Sopenharmony_ci/* 2nd parse bd type used in ethernet tx BDs */ 37948c2ecf20Sopenharmony_cienum eth_2nd_parse_bd_type { 37958c2ecf20Sopenharmony_ci ETH_2ND_PARSE_BD_TYPE_LSO_TUNNEL, 37968c2ecf20Sopenharmony_ci MAX_ETH_2ND_PARSE_BD_TYPE 37978c2ecf20Sopenharmony_ci}; 37988c2ecf20Sopenharmony_ci 37998c2ecf20Sopenharmony_ci/* 38008c2ecf20Sopenharmony_ci * Ethernet address typesm used in ethernet tx BDs 38018c2ecf20Sopenharmony_ci */ 38028c2ecf20Sopenharmony_cienum eth_addr_type { 38038c2ecf20Sopenharmony_ci UNKNOWN_ADDRESS, 38048c2ecf20Sopenharmony_ci UNICAST_ADDRESS, 38058c2ecf20Sopenharmony_ci MULTICAST_ADDRESS, 38068c2ecf20Sopenharmony_ci BROADCAST_ADDRESS, 38078c2ecf20Sopenharmony_ci MAX_ETH_ADDR_TYPE 38088c2ecf20Sopenharmony_ci}; 38098c2ecf20Sopenharmony_ci 38108c2ecf20Sopenharmony_ci 38118c2ecf20Sopenharmony_ci/* 38128c2ecf20Sopenharmony_ci * 38138c2ecf20Sopenharmony_ci */ 38148c2ecf20Sopenharmony_cistruct eth_classify_cmd_header { 38158c2ecf20Sopenharmony_ci u8 cmd_general_data; 38168c2ecf20Sopenharmony_ci#define ETH_CLASSIFY_CMD_HEADER_RX_CMD (0x1<<0) 38178c2ecf20Sopenharmony_ci#define ETH_CLASSIFY_CMD_HEADER_RX_CMD_SHIFT 0 38188c2ecf20Sopenharmony_ci#define ETH_CLASSIFY_CMD_HEADER_TX_CMD (0x1<<1) 38198c2ecf20Sopenharmony_ci#define ETH_CLASSIFY_CMD_HEADER_TX_CMD_SHIFT 1 38208c2ecf20Sopenharmony_ci#define ETH_CLASSIFY_CMD_HEADER_OPCODE (0x3<<2) 38218c2ecf20Sopenharmony_ci#define ETH_CLASSIFY_CMD_HEADER_OPCODE_SHIFT 2 38228c2ecf20Sopenharmony_ci#define ETH_CLASSIFY_CMD_HEADER_IS_ADD (0x1<<4) 38238c2ecf20Sopenharmony_ci#define ETH_CLASSIFY_CMD_HEADER_IS_ADD_SHIFT 4 38248c2ecf20Sopenharmony_ci#define ETH_CLASSIFY_CMD_HEADER_RESERVED0 (0x7<<5) 38258c2ecf20Sopenharmony_ci#define ETH_CLASSIFY_CMD_HEADER_RESERVED0_SHIFT 5 38268c2ecf20Sopenharmony_ci u8 func_id; 38278c2ecf20Sopenharmony_ci u8 client_id; 38288c2ecf20Sopenharmony_ci u8 reserved1; 38298c2ecf20Sopenharmony_ci}; 38308c2ecf20Sopenharmony_ci 38318c2ecf20Sopenharmony_ci 38328c2ecf20Sopenharmony_ci/* 38338c2ecf20Sopenharmony_ci * header for eth classification config ramrod 38348c2ecf20Sopenharmony_ci */ 38358c2ecf20Sopenharmony_cistruct eth_classify_header { 38368c2ecf20Sopenharmony_ci u8 rule_cnt; 38378c2ecf20Sopenharmony_ci u8 warning_on_error; 38388c2ecf20Sopenharmony_ci __le16 reserved1; 38398c2ecf20Sopenharmony_ci __le32 echo; 38408c2ecf20Sopenharmony_ci}; 38418c2ecf20Sopenharmony_ci 38428c2ecf20Sopenharmony_ci/* 38438c2ecf20Sopenharmony_ci * Command for adding/removing a Inner-MAC/VNI classification rule 38448c2ecf20Sopenharmony_ci */ 38458c2ecf20Sopenharmony_cistruct eth_classify_imac_vni_cmd { 38468c2ecf20Sopenharmony_ci struct eth_classify_cmd_header header; 38478c2ecf20Sopenharmony_ci __le32 vni; 38488c2ecf20Sopenharmony_ci __le16 imac_lsb; 38498c2ecf20Sopenharmony_ci __le16 imac_mid; 38508c2ecf20Sopenharmony_ci __le16 imac_msb; 38518c2ecf20Sopenharmony_ci __le16 reserved1; 38528c2ecf20Sopenharmony_ci}; 38538c2ecf20Sopenharmony_ci 38548c2ecf20Sopenharmony_ci/* 38558c2ecf20Sopenharmony_ci * Command for adding/removing a MAC classification rule 38568c2ecf20Sopenharmony_ci */ 38578c2ecf20Sopenharmony_cistruct eth_classify_mac_cmd { 38588c2ecf20Sopenharmony_ci struct eth_classify_cmd_header header; 38598c2ecf20Sopenharmony_ci __le16 reserved0; 38608c2ecf20Sopenharmony_ci __le16 inner_mac; 38618c2ecf20Sopenharmony_ci __le16 mac_lsb; 38628c2ecf20Sopenharmony_ci __le16 mac_mid; 38638c2ecf20Sopenharmony_ci __le16 mac_msb; 38648c2ecf20Sopenharmony_ci __le16 reserved1; 38658c2ecf20Sopenharmony_ci}; 38668c2ecf20Sopenharmony_ci 38678c2ecf20Sopenharmony_ci 38688c2ecf20Sopenharmony_ci/* 38698c2ecf20Sopenharmony_ci * Command for adding/removing a MAC-VLAN pair classification rule 38708c2ecf20Sopenharmony_ci */ 38718c2ecf20Sopenharmony_cistruct eth_classify_pair_cmd { 38728c2ecf20Sopenharmony_ci struct eth_classify_cmd_header header; 38738c2ecf20Sopenharmony_ci __le16 reserved0; 38748c2ecf20Sopenharmony_ci __le16 inner_mac; 38758c2ecf20Sopenharmony_ci __le16 mac_lsb; 38768c2ecf20Sopenharmony_ci __le16 mac_mid; 38778c2ecf20Sopenharmony_ci __le16 mac_msb; 38788c2ecf20Sopenharmony_ci __le16 vlan; 38798c2ecf20Sopenharmony_ci}; 38808c2ecf20Sopenharmony_ci 38818c2ecf20Sopenharmony_ci 38828c2ecf20Sopenharmony_ci/* 38838c2ecf20Sopenharmony_ci * Command for adding/removing a VLAN classification rule 38848c2ecf20Sopenharmony_ci */ 38858c2ecf20Sopenharmony_cistruct eth_classify_vlan_cmd { 38868c2ecf20Sopenharmony_ci struct eth_classify_cmd_header header; 38878c2ecf20Sopenharmony_ci __le32 reserved0; 38888c2ecf20Sopenharmony_ci __le32 reserved1; 38898c2ecf20Sopenharmony_ci __le16 reserved2; 38908c2ecf20Sopenharmony_ci __le16 vlan; 38918c2ecf20Sopenharmony_ci}; 38928c2ecf20Sopenharmony_ci 38938c2ecf20Sopenharmony_ci/* 38948c2ecf20Sopenharmony_ci * Command for adding/removing a VXLAN classification rule 38958c2ecf20Sopenharmony_ci */ 38968c2ecf20Sopenharmony_ci 38978c2ecf20Sopenharmony_ci/* 38988c2ecf20Sopenharmony_ci * union for eth classification rule 38998c2ecf20Sopenharmony_ci */ 39008c2ecf20Sopenharmony_ciunion eth_classify_rule_cmd { 39018c2ecf20Sopenharmony_ci struct eth_classify_mac_cmd mac; 39028c2ecf20Sopenharmony_ci struct eth_classify_vlan_cmd vlan; 39038c2ecf20Sopenharmony_ci struct eth_classify_pair_cmd pair; 39048c2ecf20Sopenharmony_ci struct eth_classify_imac_vni_cmd imac_vni; 39058c2ecf20Sopenharmony_ci}; 39068c2ecf20Sopenharmony_ci 39078c2ecf20Sopenharmony_ci/* 39088c2ecf20Sopenharmony_ci * parameters for eth classification configuration ramrod 39098c2ecf20Sopenharmony_ci */ 39108c2ecf20Sopenharmony_cistruct eth_classify_rules_ramrod_data { 39118c2ecf20Sopenharmony_ci struct eth_classify_header header; 39128c2ecf20Sopenharmony_ci union eth_classify_rule_cmd rules[CLASSIFY_RULES_COUNT]; 39138c2ecf20Sopenharmony_ci}; 39148c2ecf20Sopenharmony_ci 39158c2ecf20Sopenharmony_ci 39168c2ecf20Sopenharmony_ci/* 39178c2ecf20Sopenharmony_ci * The data contain client ID need to the ramrod 39188c2ecf20Sopenharmony_ci */ 39198c2ecf20Sopenharmony_cistruct eth_common_ramrod_data { 39208c2ecf20Sopenharmony_ci __le32 client_id; 39218c2ecf20Sopenharmony_ci __le32 reserved1; 39228c2ecf20Sopenharmony_ci}; 39238c2ecf20Sopenharmony_ci 39248c2ecf20Sopenharmony_ci 39258c2ecf20Sopenharmony_ci/* 39268c2ecf20Sopenharmony_ci * The eth storm context of Ustorm 39278c2ecf20Sopenharmony_ci */ 39288c2ecf20Sopenharmony_cistruct ustorm_eth_st_context { 39298c2ecf20Sopenharmony_ci u32 reserved0[52]; 39308c2ecf20Sopenharmony_ci}; 39318c2ecf20Sopenharmony_ci 39328c2ecf20Sopenharmony_ci/* 39338c2ecf20Sopenharmony_ci * The eth storm context of Tstorm 39348c2ecf20Sopenharmony_ci */ 39358c2ecf20Sopenharmony_cistruct tstorm_eth_st_context { 39368c2ecf20Sopenharmony_ci u32 __reserved0[28]; 39378c2ecf20Sopenharmony_ci}; 39388c2ecf20Sopenharmony_ci 39398c2ecf20Sopenharmony_ci/* 39408c2ecf20Sopenharmony_ci * The eth storm context of Xstorm 39418c2ecf20Sopenharmony_ci */ 39428c2ecf20Sopenharmony_cistruct xstorm_eth_st_context { 39438c2ecf20Sopenharmony_ci u32 reserved0[60]; 39448c2ecf20Sopenharmony_ci}; 39458c2ecf20Sopenharmony_ci 39468c2ecf20Sopenharmony_ci/* 39478c2ecf20Sopenharmony_ci * Ethernet connection context 39488c2ecf20Sopenharmony_ci */ 39498c2ecf20Sopenharmony_cistruct eth_context { 39508c2ecf20Sopenharmony_ci struct ustorm_eth_st_context ustorm_st_context; 39518c2ecf20Sopenharmony_ci struct tstorm_eth_st_context tstorm_st_context; 39528c2ecf20Sopenharmony_ci struct xstorm_eth_ag_context xstorm_ag_context; 39538c2ecf20Sopenharmony_ci struct tstorm_eth_ag_context tstorm_ag_context; 39548c2ecf20Sopenharmony_ci struct cstorm_eth_ag_context cstorm_ag_context; 39558c2ecf20Sopenharmony_ci struct ustorm_eth_ag_context ustorm_ag_context; 39568c2ecf20Sopenharmony_ci struct timers_block_context timers_context; 39578c2ecf20Sopenharmony_ci struct xstorm_eth_st_context xstorm_st_context; 39588c2ecf20Sopenharmony_ci struct cstorm_eth_st_context cstorm_st_context; 39598c2ecf20Sopenharmony_ci}; 39608c2ecf20Sopenharmony_ci 39618c2ecf20Sopenharmony_ci 39628c2ecf20Sopenharmony_ci/* 39638c2ecf20Sopenharmony_ci * union for sgl and raw data. 39648c2ecf20Sopenharmony_ci */ 39658c2ecf20Sopenharmony_ciunion eth_sgl_or_raw_data { 39668c2ecf20Sopenharmony_ci __le16 sgl[8]; 39678c2ecf20Sopenharmony_ci u32 raw_data[4]; 39688c2ecf20Sopenharmony_ci}; 39698c2ecf20Sopenharmony_ci 39708c2ecf20Sopenharmony_ci/* 39718c2ecf20Sopenharmony_ci * eth FP end aggregation CQE parameters struct 39728c2ecf20Sopenharmony_ci */ 39738c2ecf20Sopenharmony_cistruct eth_end_agg_rx_cqe { 39748c2ecf20Sopenharmony_ci u8 type_error_flags; 39758c2ecf20Sopenharmony_ci#define ETH_END_AGG_RX_CQE_TYPE (0x3<<0) 39768c2ecf20Sopenharmony_ci#define ETH_END_AGG_RX_CQE_TYPE_SHIFT 0 39778c2ecf20Sopenharmony_ci#define ETH_END_AGG_RX_CQE_SGL_RAW_SEL (0x1<<2) 39788c2ecf20Sopenharmony_ci#define ETH_END_AGG_RX_CQE_SGL_RAW_SEL_SHIFT 2 39798c2ecf20Sopenharmony_ci#define ETH_END_AGG_RX_CQE_RESERVED0 (0x1F<<3) 39808c2ecf20Sopenharmony_ci#define ETH_END_AGG_RX_CQE_RESERVED0_SHIFT 3 39818c2ecf20Sopenharmony_ci u8 reserved1; 39828c2ecf20Sopenharmony_ci u8 queue_index; 39838c2ecf20Sopenharmony_ci u8 reserved2; 39848c2ecf20Sopenharmony_ci __le32 timestamp_delta; 39858c2ecf20Sopenharmony_ci __le16 num_of_coalesced_segs; 39868c2ecf20Sopenharmony_ci __le16 pkt_len; 39878c2ecf20Sopenharmony_ci u8 pure_ack_count; 39888c2ecf20Sopenharmony_ci u8 reserved3; 39898c2ecf20Sopenharmony_ci __le16 reserved4; 39908c2ecf20Sopenharmony_ci union eth_sgl_or_raw_data sgl_or_raw_data; 39918c2ecf20Sopenharmony_ci __le32 reserved5[8]; 39928c2ecf20Sopenharmony_ci}; 39938c2ecf20Sopenharmony_ci 39948c2ecf20Sopenharmony_ci 39958c2ecf20Sopenharmony_ci/* 39968c2ecf20Sopenharmony_ci * regular eth FP CQE parameters struct 39978c2ecf20Sopenharmony_ci */ 39988c2ecf20Sopenharmony_cistruct eth_fast_path_rx_cqe { 39998c2ecf20Sopenharmony_ci u8 type_error_flags; 40008c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_TYPE (0x3<<0) 40018c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_TYPE_SHIFT 0 40028c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_SGL_RAW_SEL (0x1<<2) 40038c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_SGL_RAW_SEL_SHIFT 2 40048c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_PHY_DECODE_ERR_FLG (0x1<<3) 40058c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_PHY_DECODE_ERR_FLG_SHIFT 3 40068c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_IP_BAD_XSUM_FLG (0x1<<4) 40078c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_IP_BAD_XSUM_FLG_SHIFT 4 40088c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_L4_BAD_XSUM_FLG (0x1<<5) 40098c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_L4_BAD_XSUM_FLG_SHIFT 5 40108c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_PTP_PKT (0x1<<6) 40118c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_PTP_PKT_SHIFT 6 40128c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_RESERVED0 (0x1<<7) 40138c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_RESERVED0_SHIFT 7 40148c2ecf20Sopenharmony_ci u8 status_flags; 40158c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_RSS_HASH_TYPE (0x7<<0) 40168c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_RSS_HASH_TYPE_SHIFT 0 40178c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_RSS_HASH_FLG (0x1<<3) 40188c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_RSS_HASH_FLG_SHIFT 3 40198c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_BROADCAST_FLG (0x1<<4) 40208c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_BROADCAST_FLG_SHIFT 4 40218c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_MAC_MATCH_FLG (0x1<<5) 40228c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_MAC_MATCH_FLG_SHIFT 5 40238c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_IP_XSUM_NO_VALIDATION_FLG (0x1<<6) 40248c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_IP_XSUM_NO_VALIDATION_FLG_SHIFT 6 40258c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_L4_XSUM_NO_VALIDATION_FLG (0x1<<7) 40268c2ecf20Sopenharmony_ci#define ETH_FAST_PATH_RX_CQE_L4_XSUM_NO_VALIDATION_FLG_SHIFT 7 40278c2ecf20Sopenharmony_ci u8 queue_index; 40288c2ecf20Sopenharmony_ci u8 placement_offset; 40298c2ecf20Sopenharmony_ci __le32 rss_hash_result; 40308c2ecf20Sopenharmony_ci __le16 vlan_tag; 40318c2ecf20Sopenharmony_ci __le16 pkt_len_or_gro_seg_len; 40328c2ecf20Sopenharmony_ci __le16 len_on_bd; 40338c2ecf20Sopenharmony_ci struct parsing_flags pars_flags; 40348c2ecf20Sopenharmony_ci union eth_sgl_or_raw_data sgl_or_raw_data; 40358c2ecf20Sopenharmony_ci u8 tunn_type; 40368c2ecf20Sopenharmony_ci u8 tunn_inner_hdrs_offset; 40378c2ecf20Sopenharmony_ci __le16 reserved1; 40388c2ecf20Sopenharmony_ci __le32 tunn_tenant_id; 40398c2ecf20Sopenharmony_ci __le32 padding[5]; 40408c2ecf20Sopenharmony_ci u32 marker; 40418c2ecf20Sopenharmony_ci}; 40428c2ecf20Sopenharmony_ci 40438c2ecf20Sopenharmony_ci 40448c2ecf20Sopenharmony_ci/* 40458c2ecf20Sopenharmony_ci * Command for setting classification flags for a client 40468c2ecf20Sopenharmony_ci */ 40478c2ecf20Sopenharmony_cistruct eth_filter_rules_cmd { 40488c2ecf20Sopenharmony_ci u8 cmd_general_data; 40498c2ecf20Sopenharmony_ci#define ETH_FILTER_RULES_CMD_RX_CMD (0x1<<0) 40508c2ecf20Sopenharmony_ci#define ETH_FILTER_RULES_CMD_RX_CMD_SHIFT 0 40518c2ecf20Sopenharmony_ci#define ETH_FILTER_RULES_CMD_TX_CMD (0x1<<1) 40528c2ecf20Sopenharmony_ci#define ETH_FILTER_RULES_CMD_TX_CMD_SHIFT 1 40538c2ecf20Sopenharmony_ci#define ETH_FILTER_RULES_CMD_RESERVED0 (0x3F<<2) 40548c2ecf20Sopenharmony_ci#define ETH_FILTER_RULES_CMD_RESERVED0_SHIFT 2 40558c2ecf20Sopenharmony_ci u8 func_id; 40568c2ecf20Sopenharmony_ci u8 client_id; 40578c2ecf20Sopenharmony_ci u8 reserved1; 40588c2ecf20Sopenharmony_ci __le16 state; 40598c2ecf20Sopenharmony_ci#define ETH_FILTER_RULES_CMD_UCAST_DROP_ALL (0x1<<0) 40608c2ecf20Sopenharmony_ci#define ETH_FILTER_RULES_CMD_UCAST_DROP_ALL_SHIFT 0 40618c2ecf20Sopenharmony_ci#define ETH_FILTER_RULES_CMD_UCAST_ACCEPT_ALL (0x1<<1) 40628c2ecf20Sopenharmony_ci#define ETH_FILTER_RULES_CMD_UCAST_ACCEPT_ALL_SHIFT 1 40638c2ecf20Sopenharmony_ci#define ETH_FILTER_RULES_CMD_UCAST_ACCEPT_UNMATCHED (0x1<<2) 40648c2ecf20Sopenharmony_ci#define ETH_FILTER_RULES_CMD_UCAST_ACCEPT_UNMATCHED_SHIFT 2 40658c2ecf20Sopenharmony_ci#define ETH_FILTER_RULES_CMD_MCAST_DROP_ALL (0x1<<3) 40668c2ecf20Sopenharmony_ci#define ETH_FILTER_RULES_CMD_MCAST_DROP_ALL_SHIFT 3 40678c2ecf20Sopenharmony_ci#define ETH_FILTER_RULES_CMD_MCAST_ACCEPT_ALL (0x1<<4) 40688c2ecf20Sopenharmony_ci#define ETH_FILTER_RULES_CMD_MCAST_ACCEPT_ALL_SHIFT 4 40698c2ecf20Sopenharmony_ci#define ETH_FILTER_RULES_CMD_BCAST_ACCEPT_ALL (0x1<<5) 40708c2ecf20Sopenharmony_ci#define ETH_FILTER_RULES_CMD_BCAST_ACCEPT_ALL_SHIFT 5 40718c2ecf20Sopenharmony_ci#define ETH_FILTER_RULES_CMD_ACCEPT_ANY_VLAN (0x1<<6) 40728c2ecf20Sopenharmony_ci#define ETH_FILTER_RULES_CMD_ACCEPT_ANY_VLAN_SHIFT 6 40738c2ecf20Sopenharmony_ci#define ETH_FILTER_RULES_CMD_RESERVED2 (0x1FF<<7) 40748c2ecf20Sopenharmony_ci#define ETH_FILTER_RULES_CMD_RESERVED2_SHIFT 7 40758c2ecf20Sopenharmony_ci __le16 reserved3; 40768c2ecf20Sopenharmony_ci struct regpair reserved4; 40778c2ecf20Sopenharmony_ci}; 40788c2ecf20Sopenharmony_ci 40798c2ecf20Sopenharmony_ci 40808c2ecf20Sopenharmony_ci/* 40818c2ecf20Sopenharmony_ci * parameters for eth classification filters ramrod 40828c2ecf20Sopenharmony_ci */ 40838c2ecf20Sopenharmony_cistruct eth_filter_rules_ramrod_data { 40848c2ecf20Sopenharmony_ci struct eth_classify_header header; 40858c2ecf20Sopenharmony_ci struct eth_filter_rules_cmd rules[FILTER_RULES_COUNT]; 40868c2ecf20Sopenharmony_ci}; 40878c2ecf20Sopenharmony_ci 40888c2ecf20Sopenharmony_ci/* Hsi version */ 40898c2ecf20Sopenharmony_cienum eth_fp_hsi_ver { 40908c2ecf20Sopenharmony_ci ETH_FP_HSI_VER_0, 40918c2ecf20Sopenharmony_ci ETH_FP_HSI_VER_1, 40928c2ecf20Sopenharmony_ci ETH_FP_HSI_VER_2, 40938c2ecf20Sopenharmony_ci MAX_ETH_FP_HSI_VER 40948c2ecf20Sopenharmony_ci}; 40958c2ecf20Sopenharmony_ci 40968c2ecf20Sopenharmony_ci/* 40978c2ecf20Sopenharmony_ci * parameters for eth classification configuration ramrod 40988c2ecf20Sopenharmony_ci */ 40998c2ecf20Sopenharmony_cistruct eth_general_rules_ramrod_data { 41008c2ecf20Sopenharmony_ci struct eth_classify_header header; 41018c2ecf20Sopenharmony_ci union eth_classify_rule_cmd rules[CLASSIFY_RULES_COUNT]; 41028c2ecf20Sopenharmony_ci}; 41038c2ecf20Sopenharmony_ci 41048c2ecf20Sopenharmony_ci 41058c2ecf20Sopenharmony_ci/* 41068c2ecf20Sopenharmony_ci * The data for Halt ramrod 41078c2ecf20Sopenharmony_ci */ 41088c2ecf20Sopenharmony_cistruct eth_halt_ramrod_data { 41098c2ecf20Sopenharmony_ci __le32 client_id; 41108c2ecf20Sopenharmony_ci __le32 reserved0; 41118c2ecf20Sopenharmony_ci}; 41128c2ecf20Sopenharmony_ci 41138c2ecf20Sopenharmony_ci 41148c2ecf20Sopenharmony_ci/* 41158c2ecf20Sopenharmony_ci * destination and source mac address. 41168c2ecf20Sopenharmony_ci */ 41178c2ecf20Sopenharmony_cistruct eth_mac_addresses { 41188c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 41198c2ecf20Sopenharmony_ci __le16 dst_mid; 41208c2ecf20Sopenharmony_ci __le16 dst_lo; 41218c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 41228c2ecf20Sopenharmony_ci __le16 dst_lo; 41238c2ecf20Sopenharmony_ci __le16 dst_mid; 41248c2ecf20Sopenharmony_ci#endif 41258c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 41268c2ecf20Sopenharmony_ci __le16 src_lo; 41278c2ecf20Sopenharmony_ci __le16 dst_hi; 41288c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 41298c2ecf20Sopenharmony_ci __le16 dst_hi; 41308c2ecf20Sopenharmony_ci __le16 src_lo; 41318c2ecf20Sopenharmony_ci#endif 41328c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 41338c2ecf20Sopenharmony_ci __le16 src_hi; 41348c2ecf20Sopenharmony_ci __le16 src_mid; 41358c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 41368c2ecf20Sopenharmony_ci __le16 src_mid; 41378c2ecf20Sopenharmony_ci __le16 src_hi; 41388c2ecf20Sopenharmony_ci#endif 41398c2ecf20Sopenharmony_ci}; 41408c2ecf20Sopenharmony_ci 41418c2ecf20Sopenharmony_ci/* tunneling related data */ 41428c2ecf20Sopenharmony_cistruct eth_tunnel_data { 41438c2ecf20Sopenharmony_ci __le16 dst_lo; 41448c2ecf20Sopenharmony_ci __le16 dst_mid; 41458c2ecf20Sopenharmony_ci __le16 dst_hi; 41468c2ecf20Sopenharmony_ci __le16 fw_ip_hdr_csum; 41478c2ecf20Sopenharmony_ci __le16 pseudo_csum; 41488c2ecf20Sopenharmony_ci u8 ip_hdr_start_inner_w; 41498c2ecf20Sopenharmony_ci u8 flags; 41508c2ecf20Sopenharmony_ci#define ETH_TUNNEL_DATA_IPV6_OUTER (0x1<<0) 41518c2ecf20Sopenharmony_ci#define ETH_TUNNEL_DATA_IPV6_OUTER_SHIFT 0 41528c2ecf20Sopenharmony_ci#define ETH_TUNNEL_DATA_RESERVED (0x7F<<1) 41538c2ecf20Sopenharmony_ci#define ETH_TUNNEL_DATA_RESERVED_SHIFT 1 41548c2ecf20Sopenharmony_ci}; 41558c2ecf20Sopenharmony_ci 41568c2ecf20Sopenharmony_ci/* union for mac addresses and for tunneling data. 41578c2ecf20Sopenharmony_ci * considered as tunneling data only if (tunnel_exist == 1). 41588c2ecf20Sopenharmony_ci */ 41598c2ecf20Sopenharmony_ciunion eth_mac_addr_or_tunnel_data { 41608c2ecf20Sopenharmony_ci struct eth_mac_addresses mac_addr; 41618c2ecf20Sopenharmony_ci struct eth_tunnel_data tunnel_data; 41628c2ecf20Sopenharmony_ci}; 41638c2ecf20Sopenharmony_ci 41648c2ecf20Sopenharmony_ci/*Command for setting multicast classification for a client */ 41658c2ecf20Sopenharmony_cistruct eth_multicast_rules_cmd { 41668c2ecf20Sopenharmony_ci u8 cmd_general_data; 41678c2ecf20Sopenharmony_ci#define ETH_MULTICAST_RULES_CMD_RX_CMD (0x1<<0) 41688c2ecf20Sopenharmony_ci#define ETH_MULTICAST_RULES_CMD_RX_CMD_SHIFT 0 41698c2ecf20Sopenharmony_ci#define ETH_MULTICAST_RULES_CMD_TX_CMD (0x1<<1) 41708c2ecf20Sopenharmony_ci#define ETH_MULTICAST_RULES_CMD_TX_CMD_SHIFT 1 41718c2ecf20Sopenharmony_ci#define ETH_MULTICAST_RULES_CMD_IS_ADD (0x1<<2) 41728c2ecf20Sopenharmony_ci#define ETH_MULTICAST_RULES_CMD_IS_ADD_SHIFT 2 41738c2ecf20Sopenharmony_ci#define ETH_MULTICAST_RULES_CMD_RESERVED0 (0x1F<<3) 41748c2ecf20Sopenharmony_ci#define ETH_MULTICAST_RULES_CMD_RESERVED0_SHIFT 3 41758c2ecf20Sopenharmony_ci u8 func_id; 41768c2ecf20Sopenharmony_ci u8 bin_id; 41778c2ecf20Sopenharmony_ci u8 engine_id; 41788c2ecf20Sopenharmony_ci __le32 reserved2; 41798c2ecf20Sopenharmony_ci struct regpair reserved3; 41808c2ecf20Sopenharmony_ci}; 41818c2ecf20Sopenharmony_ci 41828c2ecf20Sopenharmony_ci/* 41838c2ecf20Sopenharmony_ci * parameters for multicast classification ramrod 41848c2ecf20Sopenharmony_ci */ 41858c2ecf20Sopenharmony_cistruct eth_multicast_rules_ramrod_data { 41868c2ecf20Sopenharmony_ci struct eth_classify_header header; 41878c2ecf20Sopenharmony_ci struct eth_multicast_rules_cmd rules[MULTICAST_RULES_COUNT]; 41888c2ecf20Sopenharmony_ci}; 41898c2ecf20Sopenharmony_ci 41908c2ecf20Sopenharmony_ci/* 41918c2ecf20Sopenharmony_ci * Place holder for ramrods protocol specific data 41928c2ecf20Sopenharmony_ci */ 41938c2ecf20Sopenharmony_cistruct ramrod_data { 41948c2ecf20Sopenharmony_ci __le32 data_lo; 41958c2ecf20Sopenharmony_ci __le32 data_hi; 41968c2ecf20Sopenharmony_ci}; 41978c2ecf20Sopenharmony_ci 41988c2ecf20Sopenharmony_ci/* 41998c2ecf20Sopenharmony_ci * union for ramrod data for Ethernet protocol (CQE) (force size of 16 bits) 42008c2ecf20Sopenharmony_ci */ 42018c2ecf20Sopenharmony_ciunion eth_ramrod_data { 42028c2ecf20Sopenharmony_ci struct ramrod_data general; 42038c2ecf20Sopenharmony_ci}; 42048c2ecf20Sopenharmony_ci 42058c2ecf20Sopenharmony_ci 42068c2ecf20Sopenharmony_ci/* 42078c2ecf20Sopenharmony_ci * RSS toeplitz hash type, as reported in CQE 42088c2ecf20Sopenharmony_ci */ 42098c2ecf20Sopenharmony_cienum eth_rss_hash_type { 42108c2ecf20Sopenharmony_ci DEFAULT_HASH_TYPE, 42118c2ecf20Sopenharmony_ci IPV4_HASH_TYPE, 42128c2ecf20Sopenharmony_ci TCP_IPV4_HASH_TYPE, 42138c2ecf20Sopenharmony_ci IPV6_HASH_TYPE, 42148c2ecf20Sopenharmony_ci TCP_IPV6_HASH_TYPE, 42158c2ecf20Sopenharmony_ci VLAN_PRI_HASH_TYPE, 42168c2ecf20Sopenharmony_ci E1HOV_PRI_HASH_TYPE, 42178c2ecf20Sopenharmony_ci DSCP_HASH_TYPE, 42188c2ecf20Sopenharmony_ci MAX_ETH_RSS_HASH_TYPE 42198c2ecf20Sopenharmony_ci}; 42208c2ecf20Sopenharmony_ci 42218c2ecf20Sopenharmony_ci 42228c2ecf20Sopenharmony_ci/* 42238c2ecf20Sopenharmony_ci * Ethernet RSS mode 42248c2ecf20Sopenharmony_ci */ 42258c2ecf20Sopenharmony_cienum eth_rss_mode { 42268c2ecf20Sopenharmony_ci ETH_RSS_MODE_DISABLED, 42278c2ecf20Sopenharmony_ci ETH_RSS_MODE_REGULAR, 42288c2ecf20Sopenharmony_ci ETH_RSS_MODE_VLAN_PRI, 42298c2ecf20Sopenharmony_ci ETH_RSS_MODE_E1HOV_PRI, 42308c2ecf20Sopenharmony_ci ETH_RSS_MODE_IP_DSCP, 42318c2ecf20Sopenharmony_ci MAX_ETH_RSS_MODE 42328c2ecf20Sopenharmony_ci}; 42338c2ecf20Sopenharmony_ci 42348c2ecf20Sopenharmony_ci 42358c2ecf20Sopenharmony_ci/* 42368c2ecf20Sopenharmony_ci * parameters for RSS update ramrod (E2) 42378c2ecf20Sopenharmony_ci */ 42388c2ecf20Sopenharmony_cistruct eth_rss_update_ramrod_data { 42398c2ecf20Sopenharmony_ci u8 rss_engine_id; 42408c2ecf20Sopenharmony_ci u8 rss_mode; 42418c2ecf20Sopenharmony_ci __le16 capabilities; 42428c2ecf20Sopenharmony_ci#define ETH_RSS_UPDATE_RAMROD_DATA_IPV4_CAPABILITY (0x1<<0) 42438c2ecf20Sopenharmony_ci#define ETH_RSS_UPDATE_RAMROD_DATA_IPV4_CAPABILITY_SHIFT 0 42448c2ecf20Sopenharmony_ci#define ETH_RSS_UPDATE_RAMROD_DATA_IPV4_TCP_CAPABILITY (0x1<<1) 42458c2ecf20Sopenharmony_ci#define ETH_RSS_UPDATE_RAMROD_DATA_IPV4_TCP_CAPABILITY_SHIFT 1 42468c2ecf20Sopenharmony_ci#define ETH_RSS_UPDATE_RAMROD_DATA_IPV4_UDP_CAPABILITY (0x1<<2) 42478c2ecf20Sopenharmony_ci#define ETH_RSS_UPDATE_RAMROD_DATA_IPV4_UDP_CAPABILITY_SHIFT 2 42488c2ecf20Sopenharmony_ci#define ETH_RSS_UPDATE_RAMROD_DATA_IPV4_VXLAN_CAPABILITY (0x1<<3) 42498c2ecf20Sopenharmony_ci#define ETH_RSS_UPDATE_RAMROD_DATA_IPV4_VXLAN_CAPABILITY_SHIFT 3 42508c2ecf20Sopenharmony_ci#define ETH_RSS_UPDATE_RAMROD_DATA_IPV6_CAPABILITY (0x1<<4) 42518c2ecf20Sopenharmony_ci#define ETH_RSS_UPDATE_RAMROD_DATA_IPV6_CAPABILITY_SHIFT 4 42528c2ecf20Sopenharmony_ci#define ETH_RSS_UPDATE_RAMROD_DATA_IPV6_TCP_CAPABILITY (0x1<<5) 42538c2ecf20Sopenharmony_ci#define ETH_RSS_UPDATE_RAMROD_DATA_IPV6_TCP_CAPABILITY_SHIFT 5 42548c2ecf20Sopenharmony_ci#define ETH_RSS_UPDATE_RAMROD_DATA_IPV6_UDP_CAPABILITY (0x1<<6) 42558c2ecf20Sopenharmony_ci#define ETH_RSS_UPDATE_RAMROD_DATA_IPV6_UDP_CAPABILITY_SHIFT 6 42568c2ecf20Sopenharmony_ci#define ETH_RSS_UPDATE_RAMROD_DATA_IPV6_VXLAN_CAPABILITY (0x1<<7) 42578c2ecf20Sopenharmony_ci#define ETH_RSS_UPDATE_RAMROD_DATA_IPV6_VXLAN_CAPABILITY_SHIFT 7 42588c2ecf20Sopenharmony_ci#define ETH_RSS_UPDATE_RAMROD_DATA_TUNN_INNER_HDRS_CAPABILITY (0x1<<8) 42598c2ecf20Sopenharmony_ci#define ETH_RSS_UPDATE_RAMROD_DATA_TUNN_INNER_HDRS_CAPABILITY_SHIFT 8 42608c2ecf20Sopenharmony_ci#define ETH_RSS_UPDATE_RAMROD_DATA_UPDATE_RSS_KEY (0x1<<9) 42618c2ecf20Sopenharmony_ci#define ETH_RSS_UPDATE_RAMROD_DATA_UPDATE_RSS_KEY_SHIFT 9 42628c2ecf20Sopenharmony_ci#define ETH_RSS_UPDATE_RAMROD_DATA_RESERVED (0x3F<<10) 42638c2ecf20Sopenharmony_ci#define ETH_RSS_UPDATE_RAMROD_DATA_RESERVED_SHIFT 10 42648c2ecf20Sopenharmony_ci u8 rss_result_mask; 42658c2ecf20Sopenharmony_ci u8 reserved3; 42668c2ecf20Sopenharmony_ci __le16 reserved4; 42678c2ecf20Sopenharmony_ci u8 indirection_table[T_ETH_INDIRECTION_TABLE_SIZE]; 42688c2ecf20Sopenharmony_ci __le32 rss_key[T_ETH_RSS_KEY]; 42698c2ecf20Sopenharmony_ci __le32 echo; 42708c2ecf20Sopenharmony_ci __le32 reserved5; 42718c2ecf20Sopenharmony_ci}; 42728c2ecf20Sopenharmony_ci 42738c2ecf20Sopenharmony_ci 42748c2ecf20Sopenharmony_ci/* 42758c2ecf20Sopenharmony_ci * The eth Rx Buffer Descriptor 42768c2ecf20Sopenharmony_ci */ 42778c2ecf20Sopenharmony_cistruct eth_rx_bd { 42788c2ecf20Sopenharmony_ci __le32 addr_lo; 42798c2ecf20Sopenharmony_ci __le32 addr_hi; 42808c2ecf20Sopenharmony_ci}; 42818c2ecf20Sopenharmony_ci 42828c2ecf20Sopenharmony_ci 42838c2ecf20Sopenharmony_ci/* 42848c2ecf20Sopenharmony_ci * Eth Rx Cqe structure- general structure for ramrods 42858c2ecf20Sopenharmony_ci */ 42868c2ecf20Sopenharmony_cistruct common_ramrod_eth_rx_cqe { 42878c2ecf20Sopenharmony_ci u8 ramrod_type; 42888c2ecf20Sopenharmony_ci#define COMMON_RAMROD_ETH_RX_CQE_TYPE (0x3<<0) 42898c2ecf20Sopenharmony_ci#define COMMON_RAMROD_ETH_RX_CQE_TYPE_SHIFT 0 42908c2ecf20Sopenharmony_ci#define COMMON_RAMROD_ETH_RX_CQE_ERROR (0x1<<2) 42918c2ecf20Sopenharmony_ci#define COMMON_RAMROD_ETH_RX_CQE_ERROR_SHIFT 2 42928c2ecf20Sopenharmony_ci#define COMMON_RAMROD_ETH_RX_CQE_RESERVED0 (0x1F<<3) 42938c2ecf20Sopenharmony_ci#define COMMON_RAMROD_ETH_RX_CQE_RESERVED0_SHIFT 3 42948c2ecf20Sopenharmony_ci u8 conn_type; 42958c2ecf20Sopenharmony_ci __le16 reserved1; 42968c2ecf20Sopenharmony_ci __le32 conn_and_cmd_data; 42978c2ecf20Sopenharmony_ci#define COMMON_RAMROD_ETH_RX_CQE_CID (0xFFFFFF<<0) 42988c2ecf20Sopenharmony_ci#define COMMON_RAMROD_ETH_RX_CQE_CID_SHIFT 0 42998c2ecf20Sopenharmony_ci#define COMMON_RAMROD_ETH_RX_CQE_CMD_ID (0xFF<<24) 43008c2ecf20Sopenharmony_ci#define COMMON_RAMROD_ETH_RX_CQE_CMD_ID_SHIFT 24 43018c2ecf20Sopenharmony_ci struct ramrod_data protocol_data; 43028c2ecf20Sopenharmony_ci __le32 echo; 43038c2ecf20Sopenharmony_ci __le32 reserved2[11]; 43048c2ecf20Sopenharmony_ci}; 43058c2ecf20Sopenharmony_ci 43068c2ecf20Sopenharmony_ci/* 43078c2ecf20Sopenharmony_ci * Rx Last CQE in page (in ETH) 43088c2ecf20Sopenharmony_ci */ 43098c2ecf20Sopenharmony_cistruct eth_rx_cqe_next_page { 43108c2ecf20Sopenharmony_ci __le32 addr_lo; 43118c2ecf20Sopenharmony_ci __le32 addr_hi; 43128c2ecf20Sopenharmony_ci __le32 reserved[14]; 43138c2ecf20Sopenharmony_ci}; 43148c2ecf20Sopenharmony_ci 43158c2ecf20Sopenharmony_ci/* 43168c2ecf20Sopenharmony_ci * union for all eth rx cqe types (fix their sizes) 43178c2ecf20Sopenharmony_ci */ 43188c2ecf20Sopenharmony_ciunion eth_rx_cqe { 43198c2ecf20Sopenharmony_ci struct eth_fast_path_rx_cqe fast_path_cqe; 43208c2ecf20Sopenharmony_ci struct common_ramrod_eth_rx_cqe ramrod_cqe; 43218c2ecf20Sopenharmony_ci struct eth_rx_cqe_next_page next_page_cqe; 43228c2ecf20Sopenharmony_ci struct eth_end_agg_rx_cqe end_agg_cqe; 43238c2ecf20Sopenharmony_ci}; 43248c2ecf20Sopenharmony_ci 43258c2ecf20Sopenharmony_ci 43268c2ecf20Sopenharmony_ci/* 43278c2ecf20Sopenharmony_ci * Values for RX ETH CQE type field 43288c2ecf20Sopenharmony_ci */ 43298c2ecf20Sopenharmony_cienum eth_rx_cqe_type { 43308c2ecf20Sopenharmony_ci RX_ETH_CQE_TYPE_ETH_FASTPATH, 43318c2ecf20Sopenharmony_ci RX_ETH_CQE_TYPE_ETH_RAMROD, 43328c2ecf20Sopenharmony_ci RX_ETH_CQE_TYPE_ETH_START_AGG, 43338c2ecf20Sopenharmony_ci RX_ETH_CQE_TYPE_ETH_STOP_AGG, 43348c2ecf20Sopenharmony_ci MAX_ETH_RX_CQE_TYPE 43358c2ecf20Sopenharmony_ci}; 43368c2ecf20Sopenharmony_ci 43378c2ecf20Sopenharmony_ci 43388c2ecf20Sopenharmony_ci/* 43398c2ecf20Sopenharmony_ci * Type of SGL/Raw field in ETH RX fast path CQE 43408c2ecf20Sopenharmony_ci */ 43418c2ecf20Sopenharmony_cienum eth_rx_fp_sel { 43428c2ecf20Sopenharmony_ci ETH_FP_CQE_REGULAR, 43438c2ecf20Sopenharmony_ci ETH_FP_CQE_RAW, 43448c2ecf20Sopenharmony_ci MAX_ETH_RX_FP_SEL 43458c2ecf20Sopenharmony_ci}; 43468c2ecf20Sopenharmony_ci 43478c2ecf20Sopenharmony_ci 43488c2ecf20Sopenharmony_ci/* 43498c2ecf20Sopenharmony_ci * The eth Rx SGE Descriptor 43508c2ecf20Sopenharmony_ci */ 43518c2ecf20Sopenharmony_cistruct eth_rx_sge { 43528c2ecf20Sopenharmony_ci __le32 addr_lo; 43538c2ecf20Sopenharmony_ci __le32 addr_hi; 43548c2ecf20Sopenharmony_ci}; 43558c2ecf20Sopenharmony_ci 43568c2ecf20Sopenharmony_ci 43578c2ecf20Sopenharmony_ci/* 43588c2ecf20Sopenharmony_ci * common data for all protocols 43598c2ecf20Sopenharmony_ci */ 43608c2ecf20Sopenharmony_cistruct spe_hdr { 43618c2ecf20Sopenharmony_ci __le32 conn_and_cmd_data; 43628c2ecf20Sopenharmony_ci#define SPE_HDR_CID (0xFFFFFF<<0) 43638c2ecf20Sopenharmony_ci#define SPE_HDR_CID_SHIFT 0 43648c2ecf20Sopenharmony_ci#define SPE_HDR_CMD_ID (0xFF<<24) 43658c2ecf20Sopenharmony_ci#define SPE_HDR_CMD_ID_SHIFT 24 43668c2ecf20Sopenharmony_ci __le16 type; 43678c2ecf20Sopenharmony_ci#define SPE_HDR_CONN_TYPE (0xFF<<0) 43688c2ecf20Sopenharmony_ci#define SPE_HDR_CONN_TYPE_SHIFT 0 43698c2ecf20Sopenharmony_ci#define SPE_HDR_FUNCTION_ID (0xFF<<8) 43708c2ecf20Sopenharmony_ci#define SPE_HDR_FUNCTION_ID_SHIFT 8 43718c2ecf20Sopenharmony_ci __le16 reserved1; 43728c2ecf20Sopenharmony_ci}; 43738c2ecf20Sopenharmony_ci 43748c2ecf20Sopenharmony_ci/* 43758c2ecf20Sopenharmony_ci * specific data for ethernet slow path element 43768c2ecf20Sopenharmony_ci */ 43778c2ecf20Sopenharmony_ciunion eth_specific_data { 43788c2ecf20Sopenharmony_ci u8 protocol_data[8]; 43798c2ecf20Sopenharmony_ci struct regpair client_update_ramrod_data; 43808c2ecf20Sopenharmony_ci struct regpair client_init_ramrod_init_data; 43818c2ecf20Sopenharmony_ci struct eth_halt_ramrod_data halt_ramrod_data; 43828c2ecf20Sopenharmony_ci struct regpair update_data_addr; 43838c2ecf20Sopenharmony_ci struct eth_common_ramrod_data common_ramrod_data; 43848c2ecf20Sopenharmony_ci struct regpair classify_cfg_addr; 43858c2ecf20Sopenharmony_ci struct regpair filter_cfg_addr; 43868c2ecf20Sopenharmony_ci struct regpair mcast_cfg_addr; 43878c2ecf20Sopenharmony_ci}; 43888c2ecf20Sopenharmony_ci 43898c2ecf20Sopenharmony_ci/* 43908c2ecf20Sopenharmony_ci * Ethernet slow path element 43918c2ecf20Sopenharmony_ci */ 43928c2ecf20Sopenharmony_cistruct eth_spe { 43938c2ecf20Sopenharmony_ci struct spe_hdr hdr; 43948c2ecf20Sopenharmony_ci union eth_specific_data data; 43958c2ecf20Sopenharmony_ci}; 43968c2ecf20Sopenharmony_ci 43978c2ecf20Sopenharmony_ci 43988c2ecf20Sopenharmony_ci/* 43998c2ecf20Sopenharmony_ci * Ethernet command ID for slow path elements 44008c2ecf20Sopenharmony_ci */ 44018c2ecf20Sopenharmony_cienum eth_spqe_cmd_id { 44028c2ecf20Sopenharmony_ci RAMROD_CMD_ID_ETH_UNUSED, 44038c2ecf20Sopenharmony_ci RAMROD_CMD_ID_ETH_CLIENT_SETUP, 44048c2ecf20Sopenharmony_ci RAMROD_CMD_ID_ETH_HALT, 44058c2ecf20Sopenharmony_ci RAMROD_CMD_ID_ETH_FORWARD_SETUP, 44068c2ecf20Sopenharmony_ci RAMROD_CMD_ID_ETH_TX_QUEUE_SETUP, 44078c2ecf20Sopenharmony_ci RAMROD_CMD_ID_ETH_CLIENT_UPDATE, 44088c2ecf20Sopenharmony_ci RAMROD_CMD_ID_ETH_EMPTY, 44098c2ecf20Sopenharmony_ci RAMROD_CMD_ID_ETH_TERMINATE, 44108c2ecf20Sopenharmony_ci RAMROD_CMD_ID_ETH_TPA_UPDATE, 44118c2ecf20Sopenharmony_ci RAMROD_CMD_ID_ETH_CLASSIFICATION_RULES, 44128c2ecf20Sopenharmony_ci RAMROD_CMD_ID_ETH_FILTER_RULES, 44138c2ecf20Sopenharmony_ci RAMROD_CMD_ID_ETH_MULTICAST_RULES, 44148c2ecf20Sopenharmony_ci RAMROD_CMD_ID_ETH_RSS_UPDATE, 44158c2ecf20Sopenharmony_ci RAMROD_CMD_ID_ETH_SET_MAC, 44168c2ecf20Sopenharmony_ci MAX_ETH_SPQE_CMD_ID 44178c2ecf20Sopenharmony_ci}; 44188c2ecf20Sopenharmony_ci 44198c2ecf20Sopenharmony_ci 44208c2ecf20Sopenharmony_ci/* 44218c2ecf20Sopenharmony_ci * eth tpa update command 44228c2ecf20Sopenharmony_ci */ 44238c2ecf20Sopenharmony_cienum eth_tpa_update_command { 44248c2ecf20Sopenharmony_ci TPA_UPDATE_NONE_COMMAND, 44258c2ecf20Sopenharmony_ci TPA_UPDATE_ENABLE_COMMAND, 44268c2ecf20Sopenharmony_ci TPA_UPDATE_DISABLE_COMMAND, 44278c2ecf20Sopenharmony_ci MAX_ETH_TPA_UPDATE_COMMAND 44288c2ecf20Sopenharmony_ci}; 44298c2ecf20Sopenharmony_ci 44308c2ecf20Sopenharmony_ci/* In case of LSO over IPv4 tunnel, whether to increment 44318c2ecf20Sopenharmony_ci * IP ID on external IP header or internal IP header 44328c2ecf20Sopenharmony_ci */ 44338c2ecf20Sopenharmony_cienum eth_tunnel_lso_inc_ip_id { 44348c2ecf20Sopenharmony_ci EXT_HEADER, 44358c2ecf20Sopenharmony_ci INT_HEADER, 44368c2ecf20Sopenharmony_ci MAX_ETH_TUNNEL_LSO_INC_IP_ID 44378c2ecf20Sopenharmony_ci}; 44388c2ecf20Sopenharmony_ci 44398c2ecf20Sopenharmony_ci/* In case tunnel exist and L4 checksum offload, 44408c2ecf20Sopenharmony_ci * the pseudo checksum location, on packet or on BD. 44418c2ecf20Sopenharmony_ci */ 44428c2ecf20Sopenharmony_cienum eth_tunnel_non_lso_csum_location { 44438c2ecf20Sopenharmony_ci CSUM_ON_PKT, 44448c2ecf20Sopenharmony_ci CSUM_ON_BD, 44458c2ecf20Sopenharmony_ci MAX_ETH_TUNNEL_NON_LSO_CSUM_LOCATION 44468c2ecf20Sopenharmony_ci}; 44478c2ecf20Sopenharmony_ci 44488c2ecf20Sopenharmony_cienum eth_tunn_type { 44498c2ecf20Sopenharmony_ci TUNN_TYPE_NONE, 44508c2ecf20Sopenharmony_ci TUNN_TYPE_VXLAN, 44518c2ecf20Sopenharmony_ci TUNN_TYPE_L2_GRE, 44528c2ecf20Sopenharmony_ci TUNN_TYPE_IPV4_GRE, 44538c2ecf20Sopenharmony_ci TUNN_TYPE_IPV6_GRE, 44548c2ecf20Sopenharmony_ci TUNN_TYPE_L2_GENEVE, 44558c2ecf20Sopenharmony_ci TUNN_TYPE_IPV4_GENEVE, 44568c2ecf20Sopenharmony_ci TUNN_TYPE_IPV6_GENEVE, 44578c2ecf20Sopenharmony_ci MAX_ETH_TUNN_TYPE 44588c2ecf20Sopenharmony_ci}; 44598c2ecf20Sopenharmony_ci 44608c2ecf20Sopenharmony_ci/* 44618c2ecf20Sopenharmony_ci * Tx regular BD structure 44628c2ecf20Sopenharmony_ci */ 44638c2ecf20Sopenharmony_cistruct eth_tx_bd { 44648c2ecf20Sopenharmony_ci __le32 addr_lo; 44658c2ecf20Sopenharmony_ci __le32 addr_hi; 44668c2ecf20Sopenharmony_ci __le16 total_pkt_bytes; 44678c2ecf20Sopenharmony_ci __le16 nbytes; 44688c2ecf20Sopenharmony_ci u8 reserved[4]; 44698c2ecf20Sopenharmony_ci}; 44708c2ecf20Sopenharmony_ci 44718c2ecf20Sopenharmony_ci 44728c2ecf20Sopenharmony_ci/* 44738c2ecf20Sopenharmony_ci * structure for easy accessibility to assembler 44748c2ecf20Sopenharmony_ci */ 44758c2ecf20Sopenharmony_cistruct eth_tx_bd_flags { 44768c2ecf20Sopenharmony_ci u8 as_bitfield; 44778c2ecf20Sopenharmony_ci#define ETH_TX_BD_FLAGS_IP_CSUM (0x1<<0) 44788c2ecf20Sopenharmony_ci#define ETH_TX_BD_FLAGS_IP_CSUM_SHIFT 0 44798c2ecf20Sopenharmony_ci#define ETH_TX_BD_FLAGS_L4_CSUM (0x1<<1) 44808c2ecf20Sopenharmony_ci#define ETH_TX_BD_FLAGS_L4_CSUM_SHIFT 1 44818c2ecf20Sopenharmony_ci#define ETH_TX_BD_FLAGS_VLAN_MODE (0x3<<2) 44828c2ecf20Sopenharmony_ci#define ETH_TX_BD_FLAGS_VLAN_MODE_SHIFT 2 44838c2ecf20Sopenharmony_ci#define ETH_TX_BD_FLAGS_START_BD (0x1<<4) 44848c2ecf20Sopenharmony_ci#define ETH_TX_BD_FLAGS_START_BD_SHIFT 4 44858c2ecf20Sopenharmony_ci#define ETH_TX_BD_FLAGS_IS_UDP (0x1<<5) 44868c2ecf20Sopenharmony_ci#define ETH_TX_BD_FLAGS_IS_UDP_SHIFT 5 44878c2ecf20Sopenharmony_ci#define ETH_TX_BD_FLAGS_SW_LSO (0x1<<6) 44888c2ecf20Sopenharmony_ci#define ETH_TX_BD_FLAGS_SW_LSO_SHIFT 6 44898c2ecf20Sopenharmony_ci#define ETH_TX_BD_FLAGS_IPV6 (0x1<<7) 44908c2ecf20Sopenharmony_ci#define ETH_TX_BD_FLAGS_IPV6_SHIFT 7 44918c2ecf20Sopenharmony_ci}; 44928c2ecf20Sopenharmony_ci 44938c2ecf20Sopenharmony_ci/* 44948c2ecf20Sopenharmony_ci * The eth Tx Buffer Descriptor 44958c2ecf20Sopenharmony_ci */ 44968c2ecf20Sopenharmony_cistruct eth_tx_start_bd { 44978c2ecf20Sopenharmony_ci __le32 addr_lo; 44988c2ecf20Sopenharmony_ci __le32 addr_hi; 44998c2ecf20Sopenharmony_ci __le16 nbd; 45008c2ecf20Sopenharmony_ci __le16 nbytes; 45018c2ecf20Sopenharmony_ci __le16 vlan_or_ethertype; 45028c2ecf20Sopenharmony_ci struct eth_tx_bd_flags bd_flags; 45038c2ecf20Sopenharmony_ci u8 general_data; 45048c2ecf20Sopenharmony_ci#define ETH_TX_START_BD_HDR_NBDS (0x7<<0) 45058c2ecf20Sopenharmony_ci#define ETH_TX_START_BD_HDR_NBDS_SHIFT 0 45068c2ecf20Sopenharmony_ci#define ETH_TX_START_BD_NO_ADDED_TAGS (0x1<<3) 45078c2ecf20Sopenharmony_ci#define ETH_TX_START_BD_NO_ADDED_TAGS_SHIFT 3 45088c2ecf20Sopenharmony_ci#define ETH_TX_START_BD_FORCE_VLAN_MODE (0x1<<4) 45098c2ecf20Sopenharmony_ci#define ETH_TX_START_BD_FORCE_VLAN_MODE_SHIFT 4 45108c2ecf20Sopenharmony_ci#define ETH_TX_START_BD_PARSE_NBDS (0x3<<5) 45118c2ecf20Sopenharmony_ci#define ETH_TX_START_BD_PARSE_NBDS_SHIFT 5 45128c2ecf20Sopenharmony_ci#define ETH_TX_START_BD_TUNNEL_EXIST (0x1<<7) 45138c2ecf20Sopenharmony_ci#define ETH_TX_START_BD_TUNNEL_EXIST_SHIFT 7 45148c2ecf20Sopenharmony_ci}; 45158c2ecf20Sopenharmony_ci 45168c2ecf20Sopenharmony_ci/* 45178c2ecf20Sopenharmony_ci * Tx parsing BD structure for ETH E1/E1h 45188c2ecf20Sopenharmony_ci */ 45198c2ecf20Sopenharmony_cistruct eth_tx_parse_bd_e1x { 45208c2ecf20Sopenharmony_ci __le16 global_data; 45218c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_IP_HDR_START_OFFSET_W (0xF<<0) 45228c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_IP_HDR_START_OFFSET_W_SHIFT 0 45238c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_ETH_ADDR_TYPE (0x3<<4) 45248c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_ETH_ADDR_TYPE_SHIFT 4 45258c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_PSEUDO_CS_WITHOUT_LEN (0x1<<6) 45268c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_PSEUDO_CS_WITHOUT_LEN_SHIFT 6 45278c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_LLC_SNAP_EN (0x1<<7) 45288c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_LLC_SNAP_EN_SHIFT 7 45298c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_NS_FLG (0x1<<8) 45308c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_NS_FLG_SHIFT 8 45318c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_RESERVED0 (0x7F<<9) 45328c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_RESERVED0_SHIFT 9 45338c2ecf20Sopenharmony_ci u8 tcp_flags; 45348c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_FIN_FLG (0x1<<0) 45358c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_FIN_FLG_SHIFT 0 45368c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_SYN_FLG (0x1<<1) 45378c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_SYN_FLG_SHIFT 1 45388c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_RST_FLG (0x1<<2) 45398c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_RST_FLG_SHIFT 2 45408c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_PSH_FLG (0x1<<3) 45418c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_PSH_FLG_SHIFT 3 45428c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_ACK_FLG (0x1<<4) 45438c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_ACK_FLG_SHIFT 4 45448c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_URG_FLG (0x1<<5) 45458c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_URG_FLG_SHIFT 5 45468c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_ECE_FLG (0x1<<6) 45478c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_ECE_FLG_SHIFT 6 45488c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_CWR_FLG (0x1<<7) 45498c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E1X_CWR_FLG_SHIFT 7 45508c2ecf20Sopenharmony_ci u8 ip_hlen_w; 45518c2ecf20Sopenharmony_ci __le16 total_hlen_w; 45528c2ecf20Sopenharmony_ci __le16 tcp_pseudo_csum; 45538c2ecf20Sopenharmony_ci __le16 lso_mss; 45548c2ecf20Sopenharmony_ci __le16 ip_id; 45558c2ecf20Sopenharmony_ci __le32 tcp_send_seq; 45568c2ecf20Sopenharmony_ci}; 45578c2ecf20Sopenharmony_ci 45588c2ecf20Sopenharmony_ci/* 45598c2ecf20Sopenharmony_ci * Tx parsing BD structure for ETH E2 45608c2ecf20Sopenharmony_ci */ 45618c2ecf20Sopenharmony_cistruct eth_tx_parse_bd_e2 { 45628c2ecf20Sopenharmony_ci union eth_mac_addr_or_tunnel_data data; 45638c2ecf20Sopenharmony_ci __le32 parsing_data; 45648c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E2_L4_HDR_START_OFFSET_W (0x7FF<<0) 45658c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E2_L4_HDR_START_OFFSET_W_SHIFT 0 45668c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW (0xF<<11) 45678c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW_SHIFT 11 45688c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E2_IPV6_WITH_EXT_HDR (0x1<<15) 45698c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E2_IPV6_WITH_EXT_HDR_SHIFT 15 45708c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E2_LSO_MSS (0x3FFF<<16) 45718c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E2_LSO_MSS_SHIFT 16 45728c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E2_ETH_ADDR_TYPE (0x3<<30) 45738c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_BD_E2_ETH_ADDR_TYPE_SHIFT 30 45748c2ecf20Sopenharmony_ci}; 45758c2ecf20Sopenharmony_ci 45768c2ecf20Sopenharmony_ci/* 45778c2ecf20Sopenharmony_ci * Tx 2nd parsing BD structure for ETH packet 45788c2ecf20Sopenharmony_ci */ 45798c2ecf20Sopenharmony_cistruct eth_tx_parse_2nd_bd { 45808c2ecf20Sopenharmony_ci __le16 global_data; 45818c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_IP_HDR_START_OUTER_W (0xF<<0) 45828c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_IP_HDR_START_OUTER_W_SHIFT 0 45838c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_RESERVED0 (0x1<<4) 45848c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_RESERVED0_SHIFT 4 45858c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_LLC_SNAP_EN (0x1<<5) 45868c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_LLC_SNAP_EN_SHIFT 5 45878c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_NS_FLG (0x1<<6) 45888c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_NS_FLG_SHIFT 6 45898c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_TUNNEL_UDP_EXIST (0x1<<7) 45908c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_TUNNEL_UDP_EXIST_SHIFT 7 45918c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_IP_HDR_LEN_OUTER_W (0x1F<<8) 45928c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_IP_HDR_LEN_OUTER_W_SHIFT 8 45938c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_RESERVED1 (0x7<<13) 45948c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_RESERVED1_SHIFT 13 45958c2ecf20Sopenharmony_ci u8 bd_type; 45968c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_TYPE (0xF<<0) 45978c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_TYPE_SHIFT 0 45988c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_RESERVED2 (0xF<<4) 45998c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_RESERVED2_SHIFT 4 46008c2ecf20Sopenharmony_ci u8 reserved3; 46018c2ecf20Sopenharmony_ci u8 tcp_flags; 46028c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_FIN_FLG (0x1<<0) 46038c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_FIN_FLG_SHIFT 0 46048c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_SYN_FLG (0x1<<1) 46058c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_SYN_FLG_SHIFT 1 46068c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_RST_FLG (0x1<<2) 46078c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_RST_FLG_SHIFT 2 46088c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_PSH_FLG (0x1<<3) 46098c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_PSH_FLG_SHIFT 3 46108c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_ACK_FLG (0x1<<4) 46118c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_ACK_FLG_SHIFT 4 46128c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_URG_FLG (0x1<<5) 46138c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_URG_FLG_SHIFT 5 46148c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_ECE_FLG (0x1<<6) 46158c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_ECE_FLG_SHIFT 6 46168c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_CWR_FLG (0x1<<7) 46178c2ecf20Sopenharmony_ci#define ETH_TX_PARSE_2ND_BD_CWR_FLG_SHIFT 7 46188c2ecf20Sopenharmony_ci u8 reserved4; 46198c2ecf20Sopenharmony_ci u8 tunnel_udp_hdr_start_w; 46208c2ecf20Sopenharmony_ci u8 fw_ip_hdr_to_payload_w; 46218c2ecf20Sopenharmony_ci __le16 fw_ip_csum_wo_len_flags_frag; 46228c2ecf20Sopenharmony_ci __le16 hw_ip_id; 46238c2ecf20Sopenharmony_ci __le32 tcp_send_seq; 46248c2ecf20Sopenharmony_ci}; 46258c2ecf20Sopenharmony_ci 46268c2ecf20Sopenharmony_ci/* The last BD in the BD memory will hold a pointer to the next BD memory */ 46278c2ecf20Sopenharmony_cistruct eth_tx_next_bd { 46288c2ecf20Sopenharmony_ci __le32 addr_lo; 46298c2ecf20Sopenharmony_ci __le32 addr_hi; 46308c2ecf20Sopenharmony_ci u8 reserved[8]; 46318c2ecf20Sopenharmony_ci}; 46328c2ecf20Sopenharmony_ci 46338c2ecf20Sopenharmony_ci/* 46348c2ecf20Sopenharmony_ci * union for 4 Bd types 46358c2ecf20Sopenharmony_ci */ 46368c2ecf20Sopenharmony_ciunion eth_tx_bd_types { 46378c2ecf20Sopenharmony_ci struct eth_tx_start_bd start_bd; 46388c2ecf20Sopenharmony_ci struct eth_tx_bd reg_bd; 46398c2ecf20Sopenharmony_ci struct eth_tx_parse_bd_e1x parse_bd_e1x; 46408c2ecf20Sopenharmony_ci struct eth_tx_parse_bd_e2 parse_bd_e2; 46418c2ecf20Sopenharmony_ci struct eth_tx_parse_2nd_bd parse_2nd_bd; 46428c2ecf20Sopenharmony_ci struct eth_tx_next_bd next_bd; 46438c2ecf20Sopenharmony_ci}; 46448c2ecf20Sopenharmony_ci 46458c2ecf20Sopenharmony_ci/* 46468c2ecf20Sopenharmony_ci * array of 13 bds as appears in the eth xstorm context 46478c2ecf20Sopenharmony_ci */ 46488c2ecf20Sopenharmony_cistruct eth_tx_bds_array { 46498c2ecf20Sopenharmony_ci union eth_tx_bd_types bds[13]; 46508c2ecf20Sopenharmony_ci}; 46518c2ecf20Sopenharmony_ci 46528c2ecf20Sopenharmony_ci 46538c2ecf20Sopenharmony_ci/* 46548c2ecf20Sopenharmony_ci * VLAN mode on TX BDs 46558c2ecf20Sopenharmony_ci */ 46568c2ecf20Sopenharmony_cienum eth_tx_vlan_type { 46578c2ecf20Sopenharmony_ci X_ETH_NO_VLAN, 46588c2ecf20Sopenharmony_ci X_ETH_OUTBAND_VLAN, 46598c2ecf20Sopenharmony_ci X_ETH_INBAND_VLAN, 46608c2ecf20Sopenharmony_ci X_ETH_FW_ADDED_VLAN, 46618c2ecf20Sopenharmony_ci MAX_ETH_TX_VLAN_TYPE 46628c2ecf20Sopenharmony_ci}; 46638c2ecf20Sopenharmony_ci 46648c2ecf20Sopenharmony_ci 46658c2ecf20Sopenharmony_ci/* 46668c2ecf20Sopenharmony_ci * Ethernet VLAN filtering mode in E1x 46678c2ecf20Sopenharmony_ci */ 46688c2ecf20Sopenharmony_cienum eth_vlan_filter_mode { 46698c2ecf20Sopenharmony_ci ETH_VLAN_FILTER_ANY_VLAN, 46708c2ecf20Sopenharmony_ci ETH_VLAN_FILTER_SPECIFIC_VLAN, 46718c2ecf20Sopenharmony_ci ETH_VLAN_FILTER_CLASSIFY, 46728c2ecf20Sopenharmony_ci MAX_ETH_VLAN_FILTER_MODE 46738c2ecf20Sopenharmony_ci}; 46748c2ecf20Sopenharmony_ci 46758c2ecf20Sopenharmony_ci 46768c2ecf20Sopenharmony_ci/* 46778c2ecf20Sopenharmony_ci * MAC filtering configuration command header 46788c2ecf20Sopenharmony_ci */ 46798c2ecf20Sopenharmony_cistruct mac_configuration_hdr { 46808c2ecf20Sopenharmony_ci u8 length; 46818c2ecf20Sopenharmony_ci u8 offset; 46828c2ecf20Sopenharmony_ci __le16 client_id; 46838c2ecf20Sopenharmony_ci __le32 echo; 46848c2ecf20Sopenharmony_ci}; 46858c2ecf20Sopenharmony_ci 46868c2ecf20Sopenharmony_ci/* 46878c2ecf20Sopenharmony_ci * MAC address in list for ramrod 46888c2ecf20Sopenharmony_ci */ 46898c2ecf20Sopenharmony_cistruct mac_configuration_entry { 46908c2ecf20Sopenharmony_ci __le16 lsb_mac_addr; 46918c2ecf20Sopenharmony_ci __le16 middle_mac_addr; 46928c2ecf20Sopenharmony_ci __le16 msb_mac_addr; 46938c2ecf20Sopenharmony_ci __le16 vlan_id; 46948c2ecf20Sopenharmony_ci u8 pf_id; 46958c2ecf20Sopenharmony_ci u8 flags; 46968c2ecf20Sopenharmony_ci#define MAC_CONFIGURATION_ENTRY_ACTION_TYPE (0x1<<0) 46978c2ecf20Sopenharmony_ci#define MAC_CONFIGURATION_ENTRY_ACTION_TYPE_SHIFT 0 46988c2ecf20Sopenharmony_ci#define MAC_CONFIGURATION_ENTRY_RDMA_MAC (0x1<<1) 46998c2ecf20Sopenharmony_ci#define MAC_CONFIGURATION_ENTRY_RDMA_MAC_SHIFT 1 47008c2ecf20Sopenharmony_ci#define MAC_CONFIGURATION_ENTRY_VLAN_FILTERING_MODE (0x3<<2) 47018c2ecf20Sopenharmony_ci#define MAC_CONFIGURATION_ENTRY_VLAN_FILTERING_MODE_SHIFT 2 47028c2ecf20Sopenharmony_ci#define MAC_CONFIGURATION_ENTRY_OVERRIDE_VLAN_REMOVAL (0x1<<4) 47038c2ecf20Sopenharmony_ci#define MAC_CONFIGURATION_ENTRY_OVERRIDE_VLAN_REMOVAL_SHIFT 4 47048c2ecf20Sopenharmony_ci#define MAC_CONFIGURATION_ENTRY_BROADCAST (0x1<<5) 47058c2ecf20Sopenharmony_ci#define MAC_CONFIGURATION_ENTRY_BROADCAST_SHIFT 5 47068c2ecf20Sopenharmony_ci#define MAC_CONFIGURATION_ENTRY_RESERVED1 (0x3<<6) 47078c2ecf20Sopenharmony_ci#define MAC_CONFIGURATION_ENTRY_RESERVED1_SHIFT 6 47088c2ecf20Sopenharmony_ci __le16 reserved0; 47098c2ecf20Sopenharmony_ci __le32 clients_bit_vector; 47108c2ecf20Sopenharmony_ci}; 47118c2ecf20Sopenharmony_ci 47128c2ecf20Sopenharmony_ci/* 47138c2ecf20Sopenharmony_ci * MAC filtering configuration command 47148c2ecf20Sopenharmony_ci */ 47158c2ecf20Sopenharmony_cistruct mac_configuration_cmd { 47168c2ecf20Sopenharmony_ci struct mac_configuration_hdr hdr; 47178c2ecf20Sopenharmony_ci struct mac_configuration_entry config_table[64]; 47188c2ecf20Sopenharmony_ci}; 47198c2ecf20Sopenharmony_ci 47208c2ecf20Sopenharmony_ci 47218c2ecf20Sopenharmony_ci/* 47228c2ecf20Sopenharmony_ci * Set-MAC command type (in E1x) 47238c2ecf20Sopenharmony_ci */ 47248c2ecf20Sopenharmony_cienum set_mac_action_type { 47258c2ecf20Sopenharmony_ci T_ETH_MAC_COMMAND_INVALIDATE, 47268c2ecf20Sopenharmony_ci T_ETH_MAC_COMMAND_SET, 47278c2ecf20Sopenharmony_ci MAX_SET_MAC_ACTION_TYPE 47288c2ecf20Sopenharmony_ci}; 47298c2ecf20Sopenharmony_ci 47308c2ecf20Sopenharmony_ci 47318c2ecf20Sopenharmony_ci/* 47328c2ecf20Sopenharmony_ci * Ethernet TPA Modes 47338c2ecf20Sopenharmony_ci */ 47348c2ecf20Sopenharmony_cienum tpa_mode { 47358c2ecf20Sopenharmony_ci TPA_LRO, 47368c2ecf20Sopenharmony_ci TPA_GRO, 47378c2ecf20Sopenharmony_ci MAX_TPA_MODE}; 47388c2ecf20Sopenharmony_ci 47398c2ecf20Sopenharmony_ci 47408c2ecf20Sopenharmony_ci/* 47418c2ecf20Sopenharmony_ci * tpa update ramrod data 47428c2ecf20Sopenharmony_ci */ 47438c2ecf20Sopenharmony_cistruct tpa_update_ramrod_data { 47448c2ecf20Sopenharmony_ci u8 update_ipv4; 47458c2ecf20Sopenharmony_ci u8 update_ipv6; 47468c2ecf20Sopenharmony_ci u8 client_id; 47478c2ecf20Sopenharmony_ci u8 max_tpa_queues; 47488c2ecf20Sopenharmony_ci u8 max_sges_for_packet; 47498c2ecf20Sopenharmony_ci u8 complete_on_both_clients; 47508c2ecf20Sopenharmony_ci u8 dont_verify_rings_pause_thr_flg; 47518c2ecf20Sopenharmony_ci u8 tpa_mode; 47528c2ecf20Sopenharmony_ci __le16 sge_buff_size; 47538c2ecf20Sopenharmony_ci __le16 max_agg_size; 47548c2ecf20Sopenharmony_ci __le32 sge_page_base_lo; 47558c2ecf20Sopenharmony_ci __le32 sge_page_base_hi; 47568c2ecf20Sopenharmony_ci __le16 sge_pause_thr_low; 47578c2ecf20Sopenharmony_ci __le16 sge_pause_thr_high; 47588c2ecf20Sopenharmony_ci u8 tpa_over_vlan_disable; 47598c2ecf20Sopenharmony_ci u8 reserved[7]; 47608c2ecf20Sopenharmony_ci}; 47618c2ecf20Sopenharmony_ci 47628c2ecf20Sopenharmony_ci 47638c2ecf20Sopenharmony_ci/* 47648c2ecf20Sopenharmony_ci * approximate-match multicast filtering for E1H per function in Tstorm 47658c2ecf20Sopenharmony_ci */ 47668c2ecf20Sopenharmony_cistruct tstorm_eth_approximate_match_multicast_filtering { 47678c2ecf20Sopenharmony_ci u32 mcast_add_hash_bit_array[8]; 47688c2ecf20Sopenharmony_ci}; 47698c2ecf20Sopenharmony_ci 47708c2ecf20Sopenharmony_ci 47718c2ecf20Sopenharmony_ci/* 47728c2ecf20Sopenharmony_ci * Common configuration parameters per function in Tstorm 47738c2ecf20Sopenharmony_ci */ 47748c2ecf20Sopenharmony_cistruct tstorm_eth_function_common_config { 47758c2ecf20Sopenharmony_ci __le16 config_flags; 47768c2ecf20Sopenharmony_ci#define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV4_CAPABILITY (0x1<<0) 47778c2ecf20Sopenharmony_ci#define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV4_CAPABILITY_SHIFT 0 47788c2ecf20Sopenharmony_ci#define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV4_TCP_CAPABILITY (0x1<<1) 47798c2ecf20Sopenharmony_ci#define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV4_TCP_CAPABILITY_SHIFT 1 47808c2ecf20Sopenharmony_ci#define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV6_CAPABILITY (0x1<<2) 47818c2ecf20Sopenharmony_ci#define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV6_CAPABILITY_SHIFT 2 47828c2ecf20Sopenharmony_ci#define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV6_TCP_CAPABILITY (0x1<<3) 47838c2ecf20Sopenharmony_ci#define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV6_TCP_CAPABILITY_SHIFT 3 47848c2ecf20Sopenharmony_ci#define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_MODE (0x7<<4) 47858c2ecf20Sopenharmony_ci#define TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_MODE_SHIFT 4 47868c2ecf20Sopenharmony_ci#define TSTORM_ETH_FUNCTION_COMMON_CONFIG_VLAN_FILTERING_ENABLE (0x1<<7) 47878c2ecf20Sopenharmony_ci#define TSTORM_ETH_FUNCTION_COMMON_CONFIG_VLAN_FILTERING_ENABLE_SHIFT 7 47888c2ecf20Sopenharmony_ci#define __TSTORM_ETH_FUNCTION_COMMON_CONFIG_RESERVED0 (0xFF<<8) 47898c2ecf20Sopenharmony_ci#define __TSTORM_ETH_FUNCTION_COMMON_CONFIG_RESERVED0_SHIFT 8 47908c2ecf20Sopenharmony_ci u8 rss_result_mask; 47918c2ecf20Sopenharmony_ci u8 reserved1; 47928c2ecf20Sopenharmony_ci __le16 vlan_id[2]; 47938c2ecf20Sopenharmony_ci}; 47948c2ecf20Sopenharmony_ci 47958c2ecf20Sopenharmony_ci 47968c2ecf20Sopenharmony_ci/* 47978c2ecf20Sopenharmony_ci * MAC filtering configuration parameters per port in Tstorm 47988c2ecf20Sopenharmony_ci */ 47998c2ecf20Sopenharmony_cistruct tstorm_eth_mac_filter_config { 48008c2ecf20Sopenharmony_ci u32 ucast_drop_all; 48018c2ecf20Sopenharmony_ci u32 ucast_accept_all; 48028c2ecf20Sopenharmony_ci u32 mcast_drop_all; 48038c2ecf20Sopenharmony_ci u32 mcast_accept_all; 48048c2ecf20Sopenharmony_ci u32 bcast_accept_all; 48058c2ecf20Sopenharmony_ci u32 vlan_filter[2]; 48068c2ecf20Sopenharmony_ci u32 unmatched_unicast; 48078c2ecf20Sopenharmony_ci}; 48088c2ecf20Sopenharmony_ci 48098c2ecf20Sopenharmony_ci 48108c2ecf20Sopenharmony_ci/* 48118c2ecf20Sopenharmony_ci * tx only queue init ramrod data 48128c2ecf20Sopenharmony_ci */ 48138c2ecf20Sopenharmony_cistruct tx_queue_init_ramrod_data { 48148c2ecf20Sopenharmony_ci struct client_init_general_data general; 48158c2ecf20Sopenharmony_ci struct client_init_tx_data tx; 48168c2ecf20Sopenharmony_ci}; 48178c2ecf20Sopenharmony_ci 48188c2ecf20Sopenharmony_ci 48198c2ecf20Sopenharmony_ci/* 48208c2ecf20Sopenharmony_ci * Three RX producers for ETH 48218c2ecf20Sopenharmony_ci */ 48228c2ecf20Sopenharmony_cistruct ustorm_eth_rx_producers { 48238c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 48248c2ecf20Sopenharmony_ci u16 bd_prod; 48258c2ecf20Sopenharmony_ci u16 cqe_prod; 48268c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 48278c2ecf20Sopenharmony_ci u16 cqe_prod; 48288c2ecf20Sopenharmony_ci u16 bd_prod; 48298c2ecf20Sopenharmony_ci#endif 48308c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 48318c2ecf20Sopenharmony_ci u16 reserved; 48328c2ecf20Sopenharmony_ci u16 sge_prod; 48338c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 48348c2ecf20Sopenharmony_ci u16 sge_prod; 48358c2ecf20Sopenharmony_ci u16 reserved; 48368c2ecf20Sopenharmony_ci#endif 48378c2ecf20Sopenharmony_ci}; 48388c2ecf20Sopenharmony_ci 48398c2ecf20Sopenharmony_ci 48408c2ecf20Sopenharmony_ci/* 48418c2ecf20Sopenharmony_ci * FCoE RX statistics parameters section#0 48428c2ecf20Sopenharmony_ci */ 48438c2ecf20Sopenharmony_cistruct fcoe_rx_stat_params_section0 { 48448c2ecf20Sopenharmony_ci __le32 fcoe_rx_pkt_cnt; 48458c2ecf20Sopenharmony_ci __le32 fcoe_rx_byte_cnt; 48468c2ecf20Sopenharmony_ci}; 48478c2ecf20Sopenharmony_ci 48488c2ecf20Sopenharmony_ci 48498c2ecf20Sopenharmony_ci/* 48508c2ecf20Sopenharmony_ci * FCoE RX statistics parameters section#1 48518c2ecf20Sopenharmony_ci */ 48528c2ecf20Sopenharmony_cistruct fcoe_rx_stat_params_section1 { 48538c2ecf20Sopenharmony_ci __le32 fcoe_ver_cnt; 48548c2ecf20Sopenharmony_ci __le32 fcoe_rx_drop_pkt_cnt; 48558c2ecf20Sopenharmony_ci}; 48568c2ecf20Sopenharmony_ci 48578c2ecf20Sopenharmony_ci 48588c2ecf20Sopenharmony_ci/* 48598c2ecf20Sopenharmony_ci * FCoE RX statistics parameters section#2 48608c2ecf20Sopenharmony_ci */ 48618c2ecf20Sopenharmony_cistruct fcoe_rx_stat_params_section2 { 48628c2ecf20Sopenharmony_ci __le32 fc_crc_cnt; 48638c2ecf20Sopenharmony_ci __le32 eofa_del_cnt; 48648c2ecf20Sopenharmony_ci __le32 miss_frame_cnt; 48658c2ecf20Sopenharmony_ci __le32 seq_timeout_cnt; 48668c2ecf20Sopenharmony_ci __le32 drop_seq_cnt; 48678c2ecf20Sopenharmony_ci __le32 fcoe_rx_drop_pkt_cnt; 48688c2ecf20Sopenharmony_ci __le32 fcp_rx_pkt_cnt; 48698c2ecf20Sopenharmony_ci __le32 reserved0; 48708c2ecf20Sopenharmony_ci}; 48718c2ecf20Sopenharmony_ci 48728c2ecf20Sopenharmony_ci 48738c2ecf20Sopenharmony_ci/* 48748c2ecf20Sopenharmony_ci * FCoE TX statistics parameters 48758c2ecf20Sopenharmony_ci */ 48768c2ecf20Sopenharmony_cistruct fcoe_tx_stat_params { 48778c2ecf20Sopenharmony_ci __le32 fcoe_tx_pkt_cnt; 48788c2ecf20Sopenharmony_ci __le32 fcoe_tx_byte_cnt; 48798c2ecf20Sopenharmony_ci __le32 fcp_tx_pkt_cnt; 48808c2ecf20Sopenharmony_ci __le32 reserved0; 48818c2ecf20Sopenharmony_ci}; 48828c2ecf20Sopenharmony_ci 48838c2ecf20Sopenharmony_ci/* 48848c2ecf20Sopenharmony_ci * FCoE statistics parameters 48858c2ecf20Sopenharmony_ci */ 48868c2ecf20Sopenharmony_cistruct fcoe_statistics_params { 48878c2ecf20Sopenharmony_ci struct fcoe_tx_stat_params tx_stat; 48888c2ecf20Sopenharmony_ci struct fcoe_rx_stat_params_section0 rx_stat0; 48898c2ecf20Sopenharmony_ci struct fcoe_rx_stat_params_section1 rx_stat1; 48908c2ecf20Sopenharmony_ci struct fcoe_rx_stat_params_section2 rx_stat2; 48918c2ecf20Sopenharmony_ci}; 48928c2ecf20Sopenharmony_ci 48938c2ecf20Sopenharmony_ci 48948c2ecf20Sopenharmony_ci/* 48958c2ecf20Sopenharmony_ci * The data afex vif list ramrod need 48968c2ecf20Sopenharmony_ci */ 48978c2ecf20Sopenharmony_cistruct afex_vif_list_ramrod_data { 48988c2ecf20Sopenharmony_ci u8 afex_vif_list_command; 48998c2ecf20Sopenharmony_ci u8 func_bit_map; 49008c2ecf20Sopenharmony_ci __le16 vif_list_index; 49018c2ecf20Sopenharmony_ci u8 func_to_clear; 49028c2ecf20Sopenharmony_ci u8 echo; 49038c2ecf20Sopenharmony_ci __le16 reserved1; 49048c2ecf20Sopenharmony_ci}; 49058c2ecf20Sopenharmony_ci 49068c2ecf20Sopenharmony_cistruct c2s_pri_trans_table_entry { 49078c2ecf20Sopenharmony_ci u8 val[MAX_VLAN_PRIORITIES]; 49088c2ecf20Sopenharmony_ci}; 49098c2ecf20Sopenharmony_ci 49108c2ecf20Sopenharmony_ci/* 49118c2ecf20Sopenharmony_ci * cfc delete event data 49128c2ecf20Sopenharmony_ci */ 49138c2ecf20Sopenharmony_cistruct cfc_del_event_data { 49148c2ecf20Sopenharmony_ci __le32 cid; 49158c2ecf20Sopenharmony_ci __le32 reserved0; 49168c2ecf20Sopenharmony_ci __le32 reserved1; 49178c2ecf20Sopenharmony_ci}; 49188c2ecf20Sopenharmony_ci 49198c2ecf20Sopenharmony_ci 49208c2ecf20Sopenharmony_ci/* 49218c2ecf20Sopenharmony_ci * per-port SAFC demo variables 49228c2ecf20Sopenharmony_ci */ 49238c2ecf20Sopenharmony_cistruct cmng_flags_per_port { 49248c2ecf20Sopenharmony_ci u32 cmng_enables; 49258c2ecf20Sopenharmony_ci#define CMNG_FLAGS_PER_PORT_FAIRNESS_VN (0x1<<0) 49268c2ecf20Sopenharmony_ci#define CMNG_FLAGS_PER_PORT_FAIRNESS_VN_SHIFT 0 49278c2ecf20Sopenharmony_ci#define CMNG_FLAGS_PER_PORT_RATE_SHAPING_VN (0x1<<1) 49288c2ecf20Sopenharmony_ci#define CMNG_FLAGS_PER_PORT_RATE_SHAPING_VN_SHIFT 1 49298c2ecf20Sopenharmony_ci#define CMNG_FLAGS_PER_PORT_FAIRNESS_COS (0x1<<2) 49308c2ecf20Sopenharmony_ci#define CMNG_FLAGS_PER_PORT_FAIRNESS_COS_SHIFT 2 49318c2ecf20Sopenharmony_ci#define CMNG_FLAGS_PER_PORT_FAIRNESS_COS_MODE (0x1<<3) 49328c2ecf20Sopenharmony_ci#define CMNG_FLAGS_PER_PORT_FAIRNESS_COS_MODE_SHIFT 3 49338c2ecf20Sopenharmony_ci#define __CMNG_FLAGS_PER_PORT_RESERVED0 (0xFFFFFFF<<4) 49348c2ecf20Sopenharmony_ci#define __CMNG_FLAGS_PER_PORT_RESERVED0_SHIFT 4 49358c2ecf20Sopenharmony_ci u32 __reserved1; 49368c2ecf20Sopenharmony_ci}; 49378c2ecf20Sopenharmony_ci 49388c2ecf20Sopenharmony_ci 49398c2ecf20Sopenharmony_ci/* 49408c2ecf20Sopenharmony_ci * per-port rate shaping variables 49418c2ecf20Sopenharmony_ci */ 49428c2ecf20Sopenharmony_cistruct rate_shaping_vars_per_port { 49438c2ecf20Sopenharmony_ci u32 rs_periodic_timeout; 49448c2ecf20Sopenharmony_ci u32 rs_threshold; 49458c2ecf20Sopenharmony_ci}; 49468c2ecf20Sopenharmony_ci 49478c2ecf20Sopenharmony_ci/* 49488c2ecf20Sopenharmony_ci * per-port fairness variables 49498c2ecf20Sopenharmony_ci */ 49508c2ecf20Sopenharmony_cistruct fairness_vars_per_port { 49518c2ecf20Sopenharmony_ci u32 upper_bound; 49528c2ecf20Sopenharmony_ci u32 fair_threshold; 49538c2ecf20Sopenharmony_ci u32 fairness_timeout; 49548c2ecf20Sopenharmony_ci u32 size_thr; 49558c2ecf20Sopenharmony_ci}; 49568c2ecf20Sopenharmony_ci 49578c2ecf20Sopenharmony_ci/* 49588c2ecf20Sopenharmony_ci * per-port SAFC variables 49598c2ecf20Sopenharmony_ci */ 49608c2ecf20Sopenharmony_cistruct safc_struct_per_port { 49618c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 49628c2ecf20Sopenharmony_ci u16 __reserved1; 49638c2ecf20Sopenharmony_ci u8 __reserved0; 49648c2ecf20Sopenharmony_ci u8 safc_timeout_usec; 49658c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 49668c2ecf20Sopenharmony_ci u8 safc_timeout_usec; 49678c2ecf20Sopenharmony_ci u8 __reserved0; 49688c2ecf20Sopenharmony_ci u16 __reserved1; 49698c2ecf20Sopenharmony_ci#endif 49708c2ecf20Sopenharmony_ci u8 cos_to_traffic_types[MAX_COS_NUMBER]; 49718c2ecf20Sopenharmony_ci u16 cos_to_pause_mask[NUM_OF_SAFC_BITS]; 49728c2ecf20Sopenharmony_ci}; 49738c2ecf20Sopenharmony_ci 49748c2ecf20Sopenharmony_ci/* 49758c2ecf20Sopenharmony_ci * Per-port congestion management variables 49768c2ecf20Sopenharmony_ci */ 49778c2ecf20Sopenharmony_cistruct cmng_struct_per_port { 49788c2ecf20Sopenharmony_ci struct rate_shaping_vars_per_port rs_vars; 49798c2ecf20Sopenharmony_ci struct fairness_vars_per_port fair_vars; 49808c2ecf20Sopenharmony_ci struct safc_struct_per_port safc_vars; 49818c2ecf20Sopenharmony_ci struct cmng_flags_per_port flags; 49828c2ecf20Sopenharmony_ci}; 49838c2ecf20Sopenharmony_ci 49848c2ecf20Sopenharmony_ci/* 49858c2ecf20Sopenharmony_ci * a single rate shaping counter. can be used as protocol or vnic counter 49868c2ecf20Sopenharmony_ci */ 49878c2ecf20Sopenharmony_cistruct rate_shaping_counter { 49888c2ecf20Sopenharmony_ci u32 quota; 49898c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 49908c2ecf20Sopenharmony_ci u16 __reserved0; 49918c2ecf20Sopenharmony_ci u16 rate; 49928c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 49938c2ecf20Sopenharmony_ci u16 rate; 49948c2ecf20Sopenharmony_ci u16 __reserved0; 49958c2ecf20Sopenharmony_ci#endif 49968c2ecf20Sopenharmony_ci}; 49978c2ecf20Sopenharmony_ci 49988c2ecf20Sopenharmony_ci/* 49998c2ecf20Sopenharmony_ci * per-vnic rate shaping variables 50008c2ecf20Sopenharmony_ci */ 50018c2ecf20Sopenharmony_cistruct rate_shaping_vars_per_vn { 50028c2ecf20Sopenharmony_ci struct rate_shaping_counter vn_counter; 50038c2ecf20Sopenharmony_ci}; 50048c2ecf20Sopenharmony_ci 50058c2ecf20Sopenharmony_ci/* 50068c2ecf20Sopenharmony_ci * per-vnic fairness variables 50078c2ecf20Sopenharmony_ci */ 50088c2ecf20Sopenharmony_cistruct fairness_vars_per_vn { 50098c2ecf20Sopenharmony_ci u32 cos_credit_delta[MAX_COS_NUMBER]; 50108c2ecf20Sopenharmony_ci u32 vn_credit_delta; 50118c2ecf20Sopenharmony_ci u32 __reserved0; 50128c2ecf20Sopenharmony_ci}; 50138c2ecf20Sopenharmony_ci 50148c2ecf20Sopenharmony_ci/* 50158c2ecf20Sopenharmony_ci * cmng port init state 50168c2ecf20Sopenharmony_ci */ 50178c2ecf20Sopenharmony_cistruct cmng_vnic { 50188c2ecf20Sopenharmony_ci struct rate_shaping_vars_per_vn vnic_max_rate[4]; 50198c2ecf20Sopenharmony_ci struct fairness_vars_per_vn vnic_min_rate[4]; 50208c2ecf20Sopenharmony_ci}; 50218c2ecf20Sopenharmony_ci 50228c2ecf20Sopenharmony_ci/* 50238c2ecf20Sopenharmony_ci * cmng port init state 50248c2ecf20Sopenharmony_ci */ 50258c2ecf20Sopenharmony_cistruct cmng_init { 50268c2ecf20Sopenharmony_ci struct cmng_struct_per_port port; 50278c2ecf20Sopenharmony_ci struct cmng_vnic vnic; 50288c2ecf20Sopenharmony_ci}; 50298c2ecf20Sopenharmony_ci 50308c2ecf20Sopenharmony_ci 50318c2ecf20Sopenharmony_ci/* 50328c2ecf20Sopenharmony_ci * driver parameters for congestion management init, all rates are in Mbps 50338c2ecf20Sopenharmony_ci */ 50348c2ecf20Sopenharmony_cistruct cmng_init_input { 50358c2ecf20Sopenharmony_ci u32 port_rate; 50368c2ecf20Sopenharmony_ci u16 vnic_min_rate[4]; 50378c2ecf20Sopenharmony_ci u16 vnic_max_rate[4]; 50388c2ecf20Sopenharmony_ci u16 cos_min_rate[MAX_COS_NUMBER]; 50398c2ecf20Sopenharmony_ci u16 cos_to_pause_mask[MAX_COS_NUMBER]; 50408c2ecf20Sopenharmony_ci struct cmng_flags_per_port flags; 50418c2ecf20Sopenharmony_ci}; 50428c2ecf20Sopenharmony_ci 50438c2ecf20Sopenharmony_ci 50448c2ecf20Sopenharmony_ci/* 50458c2ecf20Sopenharmony_ci * Protocol-common command ID for slow path elements 50468c2ecf20Sopenharmony_ci */ 50478c2ecf20Sopenharmony_cienum common_spqe_cmd_id { 50488c2ecf20Sopenharmony_ci RAMROD_CMD_ID_COMMON_UNUSED, 50498c2ecf20Sopenharmony_ci RAMROD_CMD_ID_COMMON_FUNCTION_START, 50508c2ecf20Sopenharmony_ci RAMROD_CMD_ID_COMMON_FUNCTION_STOP, 50518c2ecf20Sopenharmony_ci RAMROD_CMD_ID_COMMON_FUNCTION_UPDATE, 50528c2ecf20Sopenharmony_ci RAMROD_CMD_ID_COMMON_CFC_DEL, 50538c2ecf20Sopenharmony_ci RAMROD_CMD_ID_COMMON_CFC_DEL_WB, 50548c2ecf20Sopenharmony_ci RAMROD_CMD_ID_COMMON_STAT_QUERY, 50558c2ecf20Sopenharmony_ci RAMROD_CMD_ID_COMMON_STOP_TRAFFIC, 50568c2ecf20Sopenharmony_ci RAMROD_CMD_ID_COMMON_START_TRAFFIC, 50578c2ecf20Sopenharmony_ci RAMROD_CMD_ID_COMMON_AFEX_VIF_LISTS, 50588c2ecf20Sopenharmony_ci RAMROD_CMD_ID_COMMON_SET_TIMESYNC, 50598c2ecf20Sopenharmony_ci MAX_COMMON_SPQE_CMD_ID 50608c2ecf20Sopenharmony_ci}; 50618c2ecf20Sopenharmony_ci 50628c2ecf20Sopenharmony_ci/* 50638c2ecf20Sopenharmony_ci * Per-protocol connection types 50648c2ecf20Sopenharmony_ci */ 50658c2ecf20Sopenharmony_cienum connection_type { 50668c2ecf20Sopenharmony_ci ETH_CONNECTION_TYPE, 50678c2ecf20Sopenharmony_ci TOE_CONNECTION_TYPE, 50688c2ecf20Sopenharmony_ci RDMA_CONNECTION_TYPE, 50698c2ecf20Sopenharmony_ci ISCSI_CONNECTION_TYPE, 50708c2ecf20Sopenharmony_ci FCOE_CONNECTION_TYPE, 50718c2ecf20Sopenharmony_ci RESERVED_CONNECTION_TYPE_0, 50728c2ecf20Sopenharmony_ci RESERVED_CONNECTION_TYPE_1, 50738c2ecf20Sopenharmony_ci RESERVED_CONNECTION_TYPE_2, 50748c2ecf20Sopenharmony_ci NONE_CONNECTION_TYPE, 50758c2ecf20Sopenharmony_ci MAX_CONNECTION_TYPE 50768c2ecf20Sopenharmony_ci}; 50778c2ecf20Sopenharmony_ci 50788c2ecf20Sopenharmony_ci 50798c2ecf20Sopenharmony_ci/* 50808c2ecf20Sopenharmony_ci * Cos modes 50818c2ecf20Sopenharmony_ci */ 50828c2ecf20Sopenharmony_cienum cos_mode { 50838c2ecf20Sopenharmony_ci OVERRIDE_COS, 50848c2ecf20Sopenharmony_ci STATIC_COS, 50858c2ecf20Sopenharmony_ci FW_WRR, 50868c2ecf20Sopenharmony_ci MAX_COS_MODE 50878c2ecf20Sopenharmony_ci}; 50888c2ecf20Sopenharmony_ci 50898c2ecf20Sopenharmony_ci 50908c2ecf20Sopenharmony_ci/* 50918c2ecf20Sopenharmony_ci * Dynamic HC counters set by the driver 50928c2ecf20Sopenharmony_ci */ 50938c2ecf20Sopenharmony_cistruct hc_dynamic_drv_counter { 50948c2ecf20Sopenharmony_ci u32 val[HC_SB_MAX_DYNAMIC_INDICES]; 50958c2ecf20Sopenharmony_ci}; 50968c2ecf20Sopenharmony_ci 50978c2ecf20Sopenharmony_ci/* 50988c2ecf20Sopenharmony_ci * zone A per-queue data 50998c2ecf20Sopenharmony_ci */ 51008c2ecf20Sopenharmony_cistruct cstorm_queue_zone_data { 51018c2ecf20Sopenharmony_ci struct hc_dynamic_drv_counter hc_dyn_drv_cnt; 51028c2ecf20Sopenharmony_ci struct regpair reserved[2]; 51038c2ecf20Sopenharmony_ci}; 51048c2ecf20Sopenharmony_ci 51058c2ecf20Sopenharmony_ci 51068c2ecf20Sopenharmony_ci/* 51078c2ecf20Sopenharmony_ci * Vf-PF channel data in cstorm ram (non-triggered zone) 51088c2ecf20Sopenharmony_ci */ 51098c2ecf20Sopenharmony_cistruct vf_pf_channel_zone_data { 51108c2ecf20Sopenharmony_ci u32 msg_addr_lo; 51118c2ecf20Sopenharmony_ci u32 msg_addr_hi; 51128c2ecf20Sopenharmony_ci}; 51138c2ecf20Sopenharmony_ci 51148c2ecf20Sopenharmony_ci/* 51158c2ecf20Sopenharmony_ci * zone for VF non-triggered data 51168c2ecf20Sopenharmony_ci */ 51178c2ecf20Sopenharmony_cistruct non_trigger_vf_zone { 51188c2ecf20Sopenharmony_ci struct vf_pf_channel_zone_data vf_pf_channel; 51198c2ecf20Sopenharmony_ci}; 51208c2ecf20Sopenharmony_ci 51218c2ecf20Sopenharmony_ci/* 51228c2ecf20Sopenharmony_ci * Vf-PF channel trigger zone in cstorm ram 51238c2ecf20Sopenharmony_ci */ 51248c2ecf20Sopenharmony_cistruct vf_pf_channel_zone_trigger { 51258c2ecf20Sopenharmony_ci u8 addr_valid; 51268c2ecf20Sopenharmony_ci}; 51278c2ecf20Sopenharmony_ci 51288c2ecf20Sopenharmony_ci/* 51298c2ecf20Sopenharmony_ci * zone that triggers the in-bound interrupt 51308c2ecf20Sopenharmony_ci */ 51318c2ecf20Sopenharmony_cistruct trigger_vf_zone { 51328c2ecf20Sopenharmony_ci struct vf_pf_channel_zone_trigger vf_pf_channel; 51338c2ecf20Sopenharmony_ci u8 reserved0; 51348c2ecf20Sopenharmony_ci u16 reserved1; 51358c2ecf20Sopenharmony_ci u32 reserved2; 51368c2ecf20Sopenharmony_ci}; 51378c2ecf20Sopenharmony_ci 51388c2ecf20Sopenharmony_ci/* 51398c2ecf20Sopenharmony_ci * zone B per-VF data 51408c2ecf20Sopenharmony_ci */ 51418c2ecf20Sopenharmony_cistruct cstorm_vf_zone_data { 51428c2ecf20Sopenharmony_ci struct non_trigger_vf_zone non_trigger; 51438c2ecf20Sopenharmony_ci struct trigger_vf_zone trigger; 51448c2ecf20Sopenharmony_ci}; 51458c2ecf20Sopenharmony_ci 51468c2ecf20Sopenharmony_ci 51478c2ecf20Sopenharmony_ci/* 51488c2ecf20Sopenharmony_ci * Dynamic host coalescing init parameters, per state machine 51498c2ecf20Sopenharmony_ci */ 51508c2ecf20Sopenharmony_cistruct dynamic_hc_sm_config { 51518c2ecf20Sopenharmony_ci u32 threshold[3]; 51528c2ecf20Sopenharmony_ci u8 shift_per_protocol[HC_SB_MAX_DYNAMIC_INDICES]; 51538c2ecf20Sopenharmony_ci u8 hc_timeout0[HC_SB_MAX_DYNAMIC_INDICES]; 51548c2ecf20Sopenharmony_ci u8 hc_timeout1[HC_SB_MAX_DYNAMIC_INDICES]; 51558c2ecf20Sopenharmony_ci u8 hc_timeout2[HC_SB_MAX_DYNAMIC_INDICES]; 51568c2ecf20Sopenharmony_ci u8 hc_timeout3[HC_SB_MAX_DYNAMIC_INDICES]; 51578c2ecf20Sopenharmony_ci}; 51588c2ecf20Sopenharmony_ci 51598c2ecf20Sopenharmony_ci/* 51608c2ecf20Sopenharmony_ci * Dynamic host coalescing init parameters 51618c2ecf20Sopenharmony_ci */ 51628c2ecf20Sopenharmony_cistruct dynamic_hc_config { 51638c2ecf20Sopenharmony_ci struct dynamic_hc_sm_config sm_config[HC_SB_MAX_SM]; 51648c2ecf20Sopenharmony_ci}; 51658c2ecf20Sopenharmony_ci 51668c2ecf20Sopenharmony_ci 51678c2ecf20Sopenharmony_cistruct e2_integ_data { 51688c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 51698c2ecf20Sopenharmony_ci u8 flags; 51708c2ecf20Sopenharmony_ci#define E2_INTEG_DATA_TESTING_EN (0x1<<0) 51718c2ecf20Sopenharmony_ci#define E2_INTEG_DATA_TESTING_EN_SHIFT 0 51728c2ecf20Sopenharmony_ci#define E2_INTEG_DATA_LB_TX (0x1<<1) 51738c2ecf20Sopenharmony_ci#define E2_INTEG_DATA_LB_TX_SHIFT 1 51748c2ecf20Sopenharmony_ci#define E2_INTEG_DATA_COS_TX (0x1<<2) 51758c2ecf20Sopenharmony_ci#define E2_INTEG_DATA_COS_TX_SHIFT 2 51768c2ecf20Sopenharmony_ci#define E2_INTEG_DATA_OPPORTUNISTICQM (0x1<<3) 51778c2ecf20Sopenharmony_ci#define E2_INTEG_DATA_OPPORTUNISTICQM_SHIFT 3 51788c2ecf20Sopenharmony_ci#define E2_INTEG_DATA_DPMTESTRELEASEDQ (0x1<<4) 51798c2ecf20Sopenharmony_ci#define E2_INTEG_DATA_DPMTESTRELEASEDQ_SHIFT 4 51808c2ecf20Sopenharmony_ci#define E2_INTEG_DATA_RESERVED (0x7<<5) 51818c2ecf20Sopenharmony_ci#define E2_INTEG_DATA_RESERVED_SHIFT 5 51828c2ecf20Sopenharmony_ci u8 cos; 51838c2ecf20Sopenharmony_ci u8 voq; 51848c2ecf20Sopenharmony_ci u8 pbf_queue; 51858c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 51868c2ecf20Sopenharmony_ci u8 pbf_queue; 51878c2ecf20Sopenharmony_ci u8 voq; 51888c2ecf20Sopenharmony_ci u8 cos; 51898c2ecf20Sopenharmony_ci u8 flags; 51908c2ecf20Sopenharmony_ci#define E2_INTEG_DATA_TESTING_EN (0x1<<0) 51918c2ecf20Sopenharmony_ci#define E2_INTEG_DATA_TESTING_EN_SHIFT 0 51928c2ecf20Sopenharmony_ci#define E2_INTEG_DATA_LB_TX (0x1<<1) 51938c2ecf20Sopenharmony_ci#define E2_INTEG_DATA_LB_TX_SHIFT 1 51948c2ecf20Sopenharmony_ci#define E2_INTEG_DATA_COS_TX (0x1<<2) 51958c2ecf20Sopenharmony_ci#define E2_INTEG_DATA_COS_TX_SHIFT 2 51968c2ecf20Sopenharmony_ci#define E2_INTEG_DATA_OPPORTUNISTICQM (0x1<<3) 51978c2ecf20Sopenharmony_ci#define E2_INTEG_DATA_OPPORTUNISTICQM_SHIFT 3 51988c2ecf20Sopenharmony_ci#define E2_INTEG_DATA_DPMTESTRELEASEDQ (0x1<<4) 51998c2ecf20Sopenharmony_ci#define E2_INTEG_DATA_DPMTESTRELEASEDQ_SHIFT 4 52008c2ecf20Sopenharmony_ci#define E2_INTEG_DATA_RESERVED (0x7<<5) 52018c2ecf20Sopenharmony_ci#define E2_INTEG_DATA_RESERVED_SHIFT 5 52028c2ecf20Sopenharmony_ci#endif 52038c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 52048c2ecf20Sopenharmony_ci u16 reserved3; 52058c2ecf20Sopenharmony_ci u8 reserved2; 52068c2ecf20Sopenharmony_ci u8 ramEn; 52078c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 52088c2ecf20Sopenharmony_ci u8 ramEn; 52098c2ecf20Sopenharmony_ci u8 reserved2; 52108c2ecf20Sopenharmony_ci u16 reserved3; 52118c2ecf20Sopenharmony_ci#endif 52128c2ecf20Sopenharmony_ci}; 52138c2ecf20Sopenharmony_ci 52148c2ecf20Sopenharmony_ci 52158c2ecf20Sopenharmony_ci/* 52168c2ecf20Sopenharmony_ci * set mac event data 52178c2ecf20Sopenharmony_ci */ 52188c2ecf20Sopenharmony_cistruct eth_event_data { 52198c2ecf20Sopenharmony_ci __le32 echo; 52208c2ecf20Sopenharmony_ci __le32 reserved0; 52218c2ecf20Sopenharmony_ci __le32 reserved1; 52228c2ecf20Sopenharmony_ci}; 52238c2ecf20Sopenharmony_ci 52248c2ecf20Sopenharmony_ci 52258c2ecf20Sopenharmony_ci/* 52268c2ecf20Sopenharmony_ci * pf-vf event data 52278c2ecf20Sopenharmony_ci */ 52288c2ecf20Sopenharmony_cistruct vf_pf_event_data { 52298c2ecf20Sopenharmony_ci u8 vf_id; 52308c2ecf20Sopenharmony_ci u8 reserved0; 52318c2ecf20Sopenharmony_ci __le16 reserved1; 52328c2ecf20Sopenharmony_ci __le32 msg_addr_lo; 52338c2ecf20Sopenharmony_ci __le32 msg_addr_hi; 52348c2ecf20Sopenharmony_ci}; 52358c2ecf20Sopenharmony_ci 52368c2ecf20Sopenharmony_ci/* 52378c2ecf20Sopenharmony_ci * VF FLR event data 52388c2ecf20Sopenharmony_ci */ 52398c2ecf20Sopenharmony_cistruct vf_flr_event_data { 52408c2ecf20Sopenharmony_ci u8 vf_id; 52418c2ecf20Sopenharmony_ci u8 reserved0; 52428c2ecf20Sopenharmony_ci __le16 reserved1; 52438c2ecf20Sopenharmony_ci __le32 reserved2; 52448c2ecf20Sopenharmony_ci __le32 reserved3; 52458c2ecf20Sopenharmony_ci}; 52468c2ecf20Sopenharmony_ci 52478c2ecf20Sopenharmony_ci/* 52488c2ecf20Sopenharmony_ci * malicious VF event data 52498c2ecf20Sopenharmony_ci */ 52508c2ecf20Sopenharmony_cistruct malicious_vf_event_data { 52518c2ecf20Sopenharmony_ci u8 vf_id; 52528c2ecf20Sopenharmony_ci u8 err_id; 52538c2ecf20Sopenharmony_ci __le16 reserved1; 52548c2ecf20Sopenharmony_ci __le32 reserved2; 52558c2ecf20Sopenharmony_ci __le32 reserved3; 52568c2ecf20Sopenharmony_ci}; 52578c2ecf20Sopenharmony_ci 52588c2ecf20Sopenharmony_ci/* 52598c2ecf20Sopenharmony_ci * vif list event data 52608c2ecf20Sopenharmony_ci */ 52618c2ecf20Sopenharmony_cistruct vif_list_event_data { 52628c2ecf20Sopenharmony_ci u8 func_bit_map; 52638c2ecf20Sopenharmony_ci u8 echo; 52648c2ecf20Sopenharmony_ci __le16 reserved0; 52658c2ecf20Sopenharmony_ci __le32 reserved1; 52668c2ecf20Sopenharmony_ci __le32 reserved2; 52678c2ecf20Sopenharmony_ci}; 52688c2ecf20Sopenharmony_ci 52698c2ecf20Sopenharmony_ci/* function update event data */ 52708c2ecf20Sopenharmony_cistruct function_update_event_data { 52718c2ecf20Sopenharmony_ci u8 echo; 52728c2ecf20Sopenharmony_ci u8 reserved; 52738c2ecf20Sopenharmony_ci __le16 reserved0; 52748c2ecf20Sopenharmony_ci __le32 reserved1; 52758c2ecf20Sopenharmony_ci __le32 reserved2; 52768c2ecf20Sopenharmony_ci}; 52778c2ecf20Sopenharmony_ci 52788c2ecf20Sopenharmony_ci 52798c2ecf20Sopenharmony_ci/* union for all event ring message types */ 52808c2ecf20Sopenharmony_ciunion event_data { 52818c2ecf20Sopenharmony_ci struct vf_pf_event_data vf_pf_event; 52828c2ecf20Sopenharmony_ci struct eth_event_data eth_event; 52838c2ecf20Sopenharmony_ci struct cfc_del_event_data cfc_del_event; 52848c2ecf20Sopenharmony_ci struct vf_flr_event_data vf_flr_event; 52858c2ecf20Sopenharmony_ci struct malicious_vf_event_data malicious_vf_event; 52868c2ecf20Sopenharmony_ci struct vif_list_event_data vif_list_event; 52878c2ecf20Sopenharmony_ci struct function_update_event_data function_update_event; 52888c2ecf20Sopenharmony_ci}; 52898c2ecf20Sopenharmony_ci 52908c2ecf20Sopenharmony_ci 52918c2ecf20Sopenharmony_ci/* 52928c2ecf20Sopenharmony_ci * per PF event ring data 52938c2ecf20Sopenharmony_ci */ 52948c2ecf20Sopenharmony_cistruct event_ring_data { 52958c2ecf20Sopenharmony_ci struct regpair_native base_addr; 52968c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 52978c2ecf20Sopenharmony_ci u8 index_id; 52988c2ecf20Sopenharmony_ci u8 sb_id; 52998c2ecf20Sopenharmony_ci u16 producer; 53008c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 53018c2ecf20Sopenharmony_ci u16 producer; 53028c2ecf20Sopenharmony_ci u8 sb_id; 53038c2ecf20Sopenharmony_ci u8 index_id; 53048c2ecf20Sopenharmony_ci#endif 53058c2ecf20Sopenharmony_ci u32 reserved0; 53068c2ecf20Sopenharmony_ci}; 53078c2ecf20Sopenharmony_ci 53088c2ecf20Sopenharmony_ci 53098c2ecf20Sopenharmony_ci/* 53108c2ecf20Sopenharmony_ci * event ring message element (each element is 128 bits) 53118c2ecf20Sopenharmony_ci */ 53128c2ecf20Sopenharmony_cistruct event_ring_msg { 53138c2ecf20Sopenharmony_ci u8 opcode; 53148c2ecf20Sopenharmony_ci u8 error; 53158c2ecf20Sopenharmony_ci u16 reserved1; 53168c2ecf20Sopenharmony_ci union event_data data; 53178c2ecf20Sopenharmony_ci}; 53188c2ecf20Sopenharmony_ci 53198c2ecf20Sopenharmony_ci/* 53208c2ecf20Sopenharmony_ci * event ring next page element (128 bits) 53218c2ecf20Sopenharmony_ci */ 53228c2ecf20Sopenharmony_cistruct event_ring_next { 53238c2ecf20Sopenharmony_ci struct regpair addr; 53248c2ecf20Sopenharmony_ci u32 reserved[2]; 53258c2ecf20Sopenharmony_ci}; 53268c2ecf20Sopenharmony_ci 53278c2ecf20Sopenharmony_ci/* 53288c2ecf20Sopenharmony_ci * union for event ring element types (each element is 128 bits) 53298c2ecf20Sopenharmony_ci */ 53308c2ecf20Sopenharmony_ciunion event_ring_elem { 53318c2ecf20Sopenharmony_ci struct event_ring_msg message; 53328c2ecf20Sopenharmony_ci struct event_ring_next next_page; 53338c2ecf20Sopenharmony_ci}; 53348c2ecf20Sopenharmony_ci 53358c2ecf20Sopenharmony_ci 53368c2ecf20Sopenharmony_ci/* 53378c2ecf20Sopenharmony_ci * Common event ring opcodes 53388c2ecf20Sopenharmony_ci */ 53398c2ecf20Sopenharmony_cienum event_ring_opcode { 53408c2ecf20Sopenharmony_ci EVENT_RING_OPCODE_VF_PF_CHANNEL, 53418c2ecf20Sopenharmony_ci EVENT_RING_OPCODE_FUNCTION_START, 53428c2ecf20Sopenharmony_ci EVENT_RING_OPCODE_FUNCTION_STOP, 53438c2ecf20Sopenharmony_ci EVENT_RING_OPCODE_CFC_DEL, 53448c2ecf20Sopenharmony_ci EVENT_RING_OPCODE_CFC_DEL_WB, 53458c2ecf20Sopenharmony_ci EVENT_RING_OPCODE_STAT_QUERY, 53468c2ecf20Sopenharmony_ci EVENT_RING_OPCODE_STOP_TRAFFIC, 53478c2ecf20Sopenharmony_ci EVENT_RING_OPCODE_START_TRAFFIC, 53488c2ecf20Sopenharmony_ci EVENT_RING_OPCODE_VF_FLR, 53498c2ecf20Sopenharmony_ci EVENT_RING_OPCODE_MALICIOUS_VF, 53508c2ecf20Sopenharmony_ci EVENT_RING_OPCODE_FORWARD_SETUP, 53518c2ecf20Sopenharmony_ci EVENT_RING_OPCODE_RSS_UPDATE_RULES, 53528c2ecf20Sopenharmony_ci EVENT_RING_OPCODE_FUNCTION_UPDATE, 53538c2ecf20Sopenharmony_ci EVENT_RING_OPCODE_AFEX_VIF_LISTS, 53548c2ecf20Sopenharmony_ci EVENT_RING_OPCODE_SET_MAC, 53558c2ecf20Sopenharmony_ci EVENT_RING_OPCODE_CLASSIFICATION_RULES, 53568c2ecf20Sopenharmony_ci EVENT_RING_OPCODE_FILTERS_RULES, 53578c2ecf20Sopenharmony_ci EVENT_RING_OPCODE_MULTICAST_RULES, 53588c2ecf20Sopenharmony_ci EVENT_RING_OPCODE_SET_TIMESYNC, 53598c2ecf20Sopenharmony_ci MAX_EVENT_RING_OPCODE 53608c2ecf20Sopenharmony_ci}; 53618c2ecf20Sopenharmony_ci 53628c2ecf20Sopenharmony_ci/* 53638c2ecf20Sopenharmony_ci * Modes for fairness algorithm 53648c2ecf20Sopenharmony_ci */ 53658c2ecf20Sopenharmony_cienum fairness_mode { 53668c2ecf20Sopenharmony_ci FAIRNESS_COS_WRR_MODE, 53678c2ecf20Sopenharmony_ci FAIRNESS_COS_ETS_MODE, 53688c2ecf20Sopenharmony_ci MAX_FAIRNESS_MODE 53698c2ecf20Sopenharmony_ci}; 53708c2ecf20Sopenharmony_ci 53718c2ecf20Sopenharmony_ci 53728c2ecf20Sopenharmony_ci/* 53738c2ecf20Sopenharmony_ci * Priority and cos 53748c2ecf20Sopenharmony_ci */ 53758c2ecf20Sopenharmony_cistruct priority_cos { 53768c2ecf20Sopenharmony_ci u8 priority; 53778c2ecf20Sopenharmony_ci u8 cos; 53788c2ecf20Sopenharmony_ci __le16 reserved1; 53798c2ecf20Sopenharmony_ci}; 53808c2ecf20Sopenharmony_ci 53818c2ecf20Sopenharmony_ci/* 53828c2ecf20Sopenharmony_ci * The data for flow control configuration 53838c2ecf20Sopenharmony_ci */ 53848c2ecf20Sopenharmony_cistruct flow_control_configuration { 53858c2ecf20Sopenharmony_ci struct priority_cos traffic_type_to_priority_cos[MAX_TRAFFIC_TYPES]; 53868c2ecf20Sopenharmony_ci u8 dcb_enabled; 53878c2ecf20Sopenharmony_ci u8 dcb_version; 53888c2ecf20Sopenharmony_ci u8 dont_add_pri_0_en; 53898c2ecf20Sopenharmony_ci u8 reserved1; 53908c2ecf20Sopenharmony_ci __le32 reserved2; 53918c2ecf20Sopenharmony_ci u8 dcb_outer_pri[MAX_TRAFFIC_TYPES]; 53928c2ecf20Sopenharmony_ci}; 53938c2ecf20Sopenharmony_ci 53948c2ecf20Sopenharmony_ci 53958c2ecf20Sopenharmony_ci/* 53968c2ecf20Sopenharmony_ci * 53978c2ecf20Sopenharmony_ci */ 53988c2ecf20Sopenharmony_cistruct function_start_data { 53998c2ecf20Sopenharmony_ci u8 function_mode; 54008c2ecf20Sopenharmony_ci u8 allow_npar_tx_switching; 54018c2ecf20Sopenharmony_ci __le16 sd_vlan_tag; 54028c2ecf20Sopenharmony_ci __le16 vif_id; 54038c2ecf20Sopenharmony_ci u8 path_id; 54048c2ecf20Sopenharmony_ci u8 network_cos_mode; 54058c2ecf20Sopenharmony_ci u8 dmae_cmd_id; 54068c2ecf20Sopenharmony_ci u8 no_added_tags; 54078c2ecf20Sopenharmony_ci __le16 reserved0; 54088c2ecf20Sopenharmony_ci __le32 reserved1; 54098c2ecf20Sopenharmony_ci u8 inner_clss_vxlan; 54108c2ecf20Sopenharmony_ci u8 inner_clss_l2gre; 54118c2ecf20Sopenharmony_ci u8 inner_clss_l2geneve; 54128c2ecf20Sopenharmony_ci u8 inner_rss; 54138c2ecf20Sopenharmony_ci __le16 vxlan_dst_port; 54148c2ecf20Sopenharmony_ci __le16 geneve_dst_port; 54158c2ecf20Sopenharmony_ci u8 sd_accept_mf_clss_fail; 54168c2ecf20Sopenharmony_ci u8 sd_accept_mf_clss_fail_match_ethtype; 54178c2ecf20Sopenharmony_ci __le16 sd_accept_mf_clss_fail_ethtype; 54188c2ecf20Sopenharmony_ci __le16 sd_vlan_eth_type; 54198c2ecf20Sopenharmony_ci u8 sd_vlan_force_pri_flg; 54208c2ecf20Sopenharmony_ci u8 sd_vlan_force_pri_val; 54218c2ecf20Sopenharmony_ci u8 c2s_pri_tt_valid; 54228c2ecf20Sopenharmony_ci u8 c2s_pri_default; 54238c2ecf20Sopenharmony_ci u8 tx_vlan_filtering_enable; 54248c2ecf20Sopenharmony_ci u8 tx_vlan_filtering_use_pvid; 54258c2ecf20Sopenharmony_ci u8 reserved2[4]; 54268c2ecf20Sopenharmony_ci struct c2s_pri_trans_table_entry c2s_pri_trans_table; 54278c2ecf20Sopenharmony_ci}; 54288c2ecf20Sopenharmony_ci 54298c2ecf20Sopenharmony_cistruct function_update_data { 54308c2ecf20Sopenharmony_ci u8 vif_id_change_flg; 54318c2ecf20Sopenharmony_ci u8 afex_default_vlan_change_flg; 54328c2ecf20Sopenharmony_ci u8 allowed_priorities_change_flg; 54338c2ecf20Sopenharmony_ci u8 network_cos_mode_change_flg; 54348c2ecf20Sopenharmony_ci __le16 vif_id; 54358c2ecf20Sopenharmony_ci __le16 afex_default_vlan; 54368c2ecf20Sopenharmony_ci u8 allowed_priorities; 54378c2ecf20Sopenharmony_ci u8 network_cos_mode; 54388c2ecf20Sopenharmony_ci u8 lb_mode_en_change_flg; 54398c2ecf20Sopenharmony_ci u8 lb_mode_en; 54408c2ecf20Sopenharmony_ci u8 tx_switch_suspend_change_flg; 54418c2ecf20Sopenharmony_ci u8 tx_switch_suspend; 54428c2ecf20Sopenharmony_ci u8 echo; 54438c2ecf20Sopenharmony_ci u8 update_tunn_cfg_flg; 54448c2ecf20Sopenharmony_ci u8 inner_clss_vxlan; 54458c2ecf20Sopenharmony_ci u8 inner_clss_l2gre; 54468c2ecf20Sopenharmony_ci u8 inner_clss_l2geneve; 54478c2ecf20Sopenharmony_ci u8 inner_rss; 54488c2ecf20Sopenharmony_ci __le16 vxlan_dst_port; 54498c2ecf20Sopenharmony_ci __le16 geneve_dst_port; 54508c2ecf20Sopenharmony_ci u8 sd_vlan_force_pri_change_flg; 54518c2ecf20Sopenharmony_ci u8 sd_vlan_force_pri_flg; 54528c2ecf20Sopenharmony_ci u8 sd_vlan_force_pri_val; 54538c2ecf20Sopenharmony_ci u8 sd_vlan_tag_change_flg; 54548c2ecf20Sopenharmony_ci u8 sd_vlan_eth_type_change_flg; 54558c2ecf20Sopenharmony_ci u8 reserved1; 54568c2ecf20Sopenharmony_ci __le16 sd_vlan_tag; 54578c2ecf20Sopenharmony_ci __le16 sd_vlan_eth_type; 54588c2ecf20Sopenharmony_ci u8 tx_vlan_filtering_pvid_change_flg; 54598c2ecf20Sopenharmony_ci u8 reserved0; 54608c2ecf20Sopenharmony_ci __le32 reserved2; 54618c2ecf20Sopenharmony_ci}; 54628c2ecf20Sopenharmony_ci 54638c2ecf20Sopenharmony_ci/* 54648c2ecf20Sopenharmony_ci * FW version stored in the Xstorm RAM 54658c2ecf20Sopenharmony_ci */ 54668c2ecf20Sopenharmony_cistruct fw_version { 54678c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 54688c2ecf20Sopenharmony_ci u8 engineering; 54698c2ecf20Sopenharmony_ci u8 revision; 54708c2ecf20Sopenharmony_ci u8 minor; 54718c2ecf20Sopenharmony_ci u8 major; 54728c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 54738c2ecf20Sopenharmony_ci u8 major; 54748c2ecf20Sopenharmony_ci u8 minor; 54758c2ecf20Sopenharmony_ci u8 revision; 54768c2ecf20Sopenharmony_ci u8 engineering; 54778c2ecf20Sopenharmony_ci#endif 54788c2ecf20Sopenharmony_ci u32 flags; 54798c2ecf20Sopenharmony_ci#define FW_VERSION_OPTIMIZED (0x1<<0) 54808c2ecf20Sopenharmony_ci#define FW_VERSION_OPTIMIZED_SHIFT 0 54818c2ecf20Sopenharmony_ci#define FW_VERSION_BIG_ENDIEN (0x1<<1) 54828c2ecf20Sopenharmony_ci#define FW_VERSION_BIG_ENDIEN_SHIFT 1 54838c2ecf20Sopenharmony_ci#define FW_VERSION_CHIP_VERSION (0x3<<2) 54848c2ecf20Sopenharmony_ci#define FW_VERSION_CHIP_VERSION_SHIFT 2 54858c2ecf20Sopenharmony_ci#define __FW_VERSION_RESERVED (0xFFFFFFF<<4) 54868c2ecf20Sopenharmony_ci#define __FW_VERSION_RESERVED_SHIFT 4 54878c2ecf20Sopenharmony_ci}; 54888c2ecf20Sopenharmony_ci 54898c2ecf20Sopenharmony_ci/* 54908c2ecf20Sopenharmony_ci * Dynamic Host-Coalescing - Driver(host) counters 54918c2ecf20Sopenharmony_ci */ 54928c2ecf20Sopenharmony_cistruct hc_dynamic_sb_drv_counters { 54938c2ecf20Sopenharmony_ci u32 dynamic_hc_drv_counter[HC_SB_MAX_DYNAMIC_INDICES]; 54948c2ecf20Sopenharmony_ci}; 54958c2ecf20Sopenharmony_ci 54968c2ecf20Sopenharmony_ci 54978c2ecf20Sopenharmony_ci/* 54988c2ecf20Sopenharmony_ci * 2 bytes. configuration/state parameters for a single protocol index 54998c2ecf20Sopenharmony_ci */ 55008c2ecf20Sopenharmony_cistruct hc_index_data { 55018c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 55028c2ecf20Sopenharmony_ci u8 flags; 55038c2ecf20Sopenharmony_ci#define HC_INDEX_DATA_SM_ID (0x1<<0) 55048c2ecf20Sopenharmony_ci#define HC_INDEX_DATA_SM_ID_SHIFT 0 55058c2ecf20Sopenharmony_ci#define HC_INDEX_DATA_HC_ENABLED (0x1<<1) 55068c2ecf20Sopenharmony_ci#define HC_INDEX_DATA_HC_ENABLED_SHIFT 1 55078c2ecf20Sopenharmony_ci#define HC_INDEX_DATA_DYNAMIC_HC_ENABLED (0x1<<2) 55088c2ecf20Sopenharmony_ci#define HC_INDEX_DATA_DYNAMIC_HC_ENABLED_SHIFT 2 55098c2ecf20Sopenharmony_ci#define HC_INDEX_DATA_RESERVE (0x1F<<3) 55108c2ecf20Sopenharmony_ci#define HC_INDEX_DATA_RESERVE_SHIFT 3 55118c2ecf20Sopenharmony_ci u8 timeout; 55128c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 55138c2ecf20Sopenharmony_ci u8 timeout; 55148c2ecf20Sopenharmony_ci u8 flags; 55158c2ecf20Sopenharmony_ci#define HC_INDEX_DATA_SM_ID (0x1<<0) 55168c2ecf20Sopenharmony_ci#define HC_INDEX_DATA_SM_ID_SHIFT 0 55178c2ecf20Sopenharmony_ci#define HC_INDEX_DATA_HC_ENABLED (0x1<<1) 55188c2ecf20Sopenharmony_ci#define HC_INDEX_DATA_HC_ENABLED_SHIFT 1 55198c2ecf20Sopenharmony_ci#define HC_INDEX_DATA_DYNAMIC_HC_ENABLED (0x1<<2) 55208c2ecf20Sopenharmony_ci#define HC_INDEX_DATA_DYNAMIC_HC_ENABLED_SHIFT 2 55218c2ecf20Sopenharmony_ci#define HC_INDEX_DATA_RESERVE (0x1F<<3) 55228c2ecf20Sopenharmony_ci#define HC_INDEX_DATA_RESERVE_SHIFT 3 55238c2ecf20Sopenharmony_ci#endif 55248c2ecf20Sopenharmony_ci}; 55258c2ecf20Sopenharmony_ci 55268c2ecf20Sopenharmony_ci 55278c2ecf20Sopenharmony_ci/* 55288c2ecf20Sopenharmony_ci * HC state-machine 55298c2ecf20Sopenharmony_ci */ 55308c2ecf20Sopenharmony_cistruct hc_status_block_sm { 55318c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 55328c2ecf20Sopenharmony_ci u8 igu_seg_id; 55338c2ecf20Sopenharmony_ci u8 igu_sb_id; 55348c2ecf20Sopenharmony_ci u8 timer_value; 55358c2ecf20Sopenharmony_ci u8 __flags; 55368c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 55378c2ecf20Sopenharmony_ci u8 __flags; 55388c2ecf20Sopenharmony_ci u8 timer_value; 55398c2ecf20Sopenharmony_ci u8 igu_sb_id; 55408c2ecf20Sopenharmony_ci u8 igu_seg_id; 55418c2ecf20Sopenharmony_ci#endif 55428c2ecf20Sopenharmony_ci u32 time_to_expire; 55438c2ecf20Sopenharmony_ci}; 55448c2ecf20Sopenharmony_ci 55458c2ecf20Sopenharmony_ci/* 55468c2ecf20Sopenharmony_ci * hold PCI identification variables- used in various places in firmware 55478c2ecf20Sopenharmony_ci */ 55488c2ecf20Sopenharmony_cistruct pci_entity { 55498c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 55508c2ecf20Sopenharmony_ci u8 vf_valid; 55518c2ecf20Sopenharmony_ci u8 vf_id; 55528c2ecf20Sopenharmony_ci u8 vnic_id; 55538c2ecf20Sopenharmony_ci u8 pf_id; 55548c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 55558c2ecf20Sopenharmony_ci u8 pf_id; 55568c2ecf20Sopenharmony_ci u8 vnic_id; 55578c2ecf20Sopenharmony_ci u8 vf_id; 55588c2ecf20Sopenharmony_ci u8 vf_valid; 55598c2ecf20Sopenharmony_ci#endif 55608c2ecf20Sopenharmony_ci}; 55618c2ecf20Sopenharmony_ci 55628c2ecf20Sopenharmony_ci/* 55638c2ecf20Sopenharmony_ci * The fast-path status block meta-data, common to all chips 55648c2ecf20Sopenharmony_ci */ 55658c2ecf20Sopenharmony_cistruct hc_sb_data { 55668c2ecf20Sopenharmony_ci struct regpair_native host_sb_addr; 55678c2ecf20Sopenharmony_ci struct hc_status_block_sm state_machine[HC_SB_MAX_SM]; 55688c2ecf20Sopenharmony_ci struct pci_entity p_func; 55698c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 55708c2ecf20Sopenharmony_ci u8 rsrv0; 55718c2ecf20Sopenharmony_ci u8 state; 55728c2ecf20Sopenharmony_ci u8 dhc_qzone_id; 55738c2ecf20Sopenharmony_ci u8 same_igu_sb_1b; 55748c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 55758c2ecf20Sopenharmony_ci u8 same_igu_sb_1b; 55768c2ecf20Sopenharmony_ci u8 dhc_qzone_id; 55778c2ecf20Sopenharmony_ci u8 state; 55788c2ecf20Sopenharmony_ci u8 rsrv0; 55798c2ecf20Sopenharmony_ci#endif 55808c2ecf20Sopenharmony_ci struct regpair_native rsrv1[2]; 55818c2ecf20Sopenharmony_ci}; 55828c2ecf20Sopenharmony_ci 55838c2ecf20Sopenharmony_ci 55848c2ecf20Sopenharmony_ci/* 55858c2ecf20Sopenharmony_ci * Segment types for host coaslescing 55868c2ecf20Sopenharmony_ci */ 55878c2ecf20Sopenharmony_cienum hc_segment { 55888c2ecf20Sopenharmony_ci HC_REGULAR_SEGMENT, 55898c2ecf20Sopenharmony_ci HC_DEFAULT_SEGMENT, 55908c2ecf20Sopenharmony_ci MAX_HC_SEGMENT 55918c2ecf20Sopenharmony_ci}; 55928c2ecf20Sopenharmony_ci 55938c2ecf20Sopenharmony_ci 55948c2ecf20Sopenharmony_ci/* 55958c2ecf20Sopenharmony_ci * The fast-path status block meta-data 55968c2ecf20Sopenharmony_ci */ 55978c2ecf20Sopenharmony_cistruct hc_sp_status_block_data { 55988c2ecf20Sopenharmony_ci struct regpair_native host_sb_addr; 55998c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 56008c2ecf20Sopenharmony_ci u8 rsrv1; 56018c2ecf20Sopenharmony_ci u8 state; 56028c2ecf20Sopenharmony_ci u8 igu_seg_id; 56038c2ecf20Sopenharmony_ci u8 igu_sb_id; 56048c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 56058c2ecf20Sopenharmony_ci u8 igu_sb_id; 56068c2ecf20Sopenharmony_ci u8 igu_seg_id; 56078c2ecf20Sopenharmony_ci u8 state; 56088c2ecf20Sopenharmony_ci u8 rsrv1; 56098c2ecf20Sopenharmony_ci#endif 56108c2ecf20Sopenharmony_ci struct pci_entity p_func; 56118c2ecf20Sopenharmony_ci}; 56128c2ecf20Sopenharmony_ci 56138c2ecf20Sopenharmony_ci 56148c2ecf20Sopenharmony_ci/* 56158c2ecf20Sopenharmony_ci * The fast-path status block meta-data 56168c2ecf20Sopenharmony_ci */ 56178c2ecf20Sopenharmony_cistruct hc_status_block_data_e1x { 56188c2ecf20Sopenharmony_ci struct hc_index_data index_data[HC_SB_MAX_INDICES_E1X]; 56198c2ecf20Sopenharmony_ci struct hc_sb_data common; 56208c2ecf20Sopenharmony_ci}; 56218c2ecf20Sopenharmony_ci 56228c2ecf20Sopenharmony_ci 56238c2ecf20Sopenharmony_ci/* 56248c2ecf20Sopenharmony_ci * The fast-path status block meta-data 56258c2ecf20Sopenharmony_ci */ 56268c2ecf20Sopenharmony_cistruct hc_status_block_data_e2 { 56278c2ecf20Sopenharmony_ci struct hc_index_data index_data[HC_SB_MAX_INDICES_E2]; 56288c2ecf20Sopenharmony_ci struct hc_sb_data common; 56298c2ecf20Sopenharmony_ci}; 56308c2ecf20Sopenharmony_ci 56318c2ecf20Sopenharmony_ci 56328c2ecf20Sopenharmony_ci/* 56338c2ecf20Sopenharmony_ci * IGU block operartion modes (in Everest2) 56348c2ecf20Sopenharmony_ci */ 56358c2ecf20Sopenharmony_cienum igu_mode { 56368c2ecf20Sopenharmony_ci HC_IGU_BC_MODE, 56378c2ecf20Sopenharmony_ci HC_IGU_NBC_MODE, 56388c2ecf20Sopenharmony_ci MAX_IGU_MODE 56398c2ecf20Sopenharmony_ci}; 56408c2ecf20Sopenharmony_ci 56418c2ecf20Sopenharmony_ci/* 56428c2ecf20Sopenharmony_ci * Inner Headers Classification Type 56438c2ecf20Sopenharmony_ci */ 56448c2ecf20Sopenharmony_cienum inner_clss_type { 56458c2ecf20Sopenharmony_ci INNER_CLSS_DISABLED, 56468c2ecf20Sopenharmony_ci INNER_CLSS_USE_VLAN, 56478c2ecf20Sopenharmony_ci INNER_CLSS_USE_VNI, 56488c2ecf20Sopenharmony_ci MAX_INNER_CLSS_TYPE}; 56498c2ecf20Sopenharmony_ci 56508c2ecf20Sopenharmony_ci/* 56518c2ecf20Sopenharmony_ci * IP versions 56528c2ecf20Sopenharmony_ci */ 56538c2ecf20Sopenharmony_cienum ip_ver { 56548c2ecf20Sopenharmony_ci IP_V4, 56558c2ecf20Sopenharmony_ci IP_V6, 56568c2ecf20Sopenharmony_ci MAX_IP_VER 56578c2ecf20Sopenharmony_ci}; 56588c2ecf20Sopenharmony_ci 56598c2ecf20Sopenharmony_ci/* 56608c2ecf20Sopenharmony_ci * Malicious VF error ID 56618c2ecf20Sopenharmony_ci */ 56628c2ecf20Sopenharmony_cienum malicious_vf_error_id { 56638c2ecf20Sopenharmony_ci MALICIOUS_VF_NO_ERROR, 56648c2ecf20Sopenharmony_ci VF_PF_CHANNEL_NOT_READY, 56658c2ecf20Sopenharmony_ci ETH_ILLEGAL_BD_LENGTHS, 56668c2ecf20Sopenharmony_ci ETH_PACKET_TOO_SHORT, 56678c2ecf20Sopenharmony_ci ETH_PAYLOAD_TOO_BIG, 56688c2ecf20Sopenharmony_ci ETH_ILLEGAL_ETH_TYPE, 56698c2ecf20Sopenharmony_ci ETH_ILLEGAL_LSO_HDR_LEN, 56708c2ecf20Sopenharmony_ci ETH_TOO_MANY_BDS, 56718c2ecf20Sopenharmony_ci ETH_ZERO_HDR_NBDS, 56728c2ecf20Sopenharmony_ci ETH_START_BD_NOT_SET, 56738c2ecf20Sopenharmony_ci ETH_ILLEGAL_PARSE_NBDS, 56748c2ecf20Sopenharmony_ci ETH_IPV6_AND_CHECKSUM, 56758c2ecf20Sopenharmony_ci ETH_VLAN_FLG_INCORRECT, 56768c2ecf20Sopenharmony_ci ETH_ILLEGAL_LSO_MSS, 56778c2ecf20Sopenharmony_ci ETH_TUNNEL_NOT_SUPPORTED, 56788c2ecf20Sopenharmony_ci MAX_MALICIOUS_VF_ERROR_ID 56798c2ecf20Sopenharmony_ci}; 56808c2ecf20Sopenharmony_ci 56818c2ecf20Sopenharmony_ci/* 56828c2ecf20Sopenharmony_ci * Multi-function modes 56838c2ecf20Sopenharmony_ci */ 56848c2ecf20Sopenharmony_cienum mf_mode { 56858c2ecf20Sopenharmony_ci SINGLE_FUNCTION, 56868c2ecf20Sopenharmony_ci MULTI_FUNCTION_SD, 56878c2ecf20Sopenharmony_ci MULTI_FUNCTION_SI, 56888c2ecf20Sopenharmony_ci MULTI_FUNCTION_AFEX, 56898c2ecf20Sopenharmony_ci MAX_MF_MODE 56908c2ecf20Sopenharmony_ci}; 56918c2ecf20Sopenharmony_ci 56928c2ecf20Sopenharmony_ci/* 56938c2ecf20Sopenharmony_ci * Protocol-common statistics collected by the Tstorm (per pf) 56948c2ecf20Sopenharmony_ci */ 56958c2ecf20Sopenharmony_cistruct tstorm_per_pf_stats { 56968c2ecf20Sopenharmony_ci struct regpair rcv_error_bytes; 56978c2ecf20Sopenharmony_ci}; 56988c2ecf20Sopenharmony_ci 56998c2ecf20Sopenharmony_ci/* 57008c2ecf20Sopenharmony_ci * 57018c2ecf20Sopenharmony_ci */ 57028c2ecf20Sopenharmony_cistruct per_pf_stats { 57038c2ecf20Sopenharmony_ci struct tstorm_per_pf_stats tstorm_pf_statistics; 57048c2ecf20Sopenharmony_ci}; 57058c2ecf20Sopenharmony_ci 57068c2ecf20Sopenharmony_ci 57078c2ecf20Sopenharmony_ci/* 57088c2ecf20Sopenharmony_ci * Protocol-common statistics collected by the Tstorm (per port) 57098c2ecf20Sopenharmony_ci */ 57108c2ecf20Sopenharmony_cistruct tstorm_per_port_stats { 57118c2ecf20Sopenharmony_ci __le32 mac_discard; 57128c2ecf20Sopenharmony_ci __le32 mac_filter_discard; 57138c2ecf20Sopenharmony_ci __le32 brb_truncate_discard; 57148c2ecf20Sopenharmony_ci __le32 mf_tag_discard; 57158c2ecf20Sopenharmony_ci __le32 packet_drop; 57168c2ecf20Sopenharmony_ci __le32 reserved; 57178c2ecf20Sopenharmony_ci}; 57188c2ecf20Sopenharmony_ci 57198c2ecf20Sopenharmony_ci/* 57208c2ecf20Sopenharmony_ci * 57218c2ecf20Sopenharmony_ci */ 57228c2ecf20Sopenharmony_cistruct per_port_stats { 57238c2ecf20Sopenharmony_ci struct tstorm_per_port_stats tstorm_port_statistics; 57248c2ecf20Sopenharmony_ci}; 57258c2ecf20Sopenharmony_ci 57268c2ecf20Sopenharmony_ci 57278c2ecf20Sopenharmony_ci/* 57288c2ecf20Sopenharmony_ci * Protocol-common statistics collected by the Tstorm (per client) 57298c2ecf20Sopenharmony_ci */ 57308c2ecf20Sopenharmony_cistruct tstorm_per_queue_stats { 57318c2ecf20Sopenharmony_ci struct regpair rcv_ucast_bytes; 57328c2ecf20Sopenharmony_ci __le32 rcv_ucast_pkts; 57338c2ecf20Sopenharmony_ci __le32 checksum_discard; 57348c2ecf20Sopenharmony_ci struct regpair rcv_bcast_bytes; 57358c2ecf20Sopenharmony_ci __le32 rcv_bcast_pkts; 57368c2ecf20Sopenharmony_ci __le32 pkts_too_big_discard; 57378c2ecf20Sopenharmony_ci struct regpair rcv_mcast_bytes; 57388c2ecf20Sopenharmony_ci __le32 rcv_mcast_pkts; 57398c2ecf20Sopenharmony_ci __le32 ttl0_discard; 57408c2ecf20Sopenharmony_ci __le16 no_buff_discard; 57418c2ecf20Sopenharmony_ci __le16 reserved0; 57428c2ecf20Sopenharmony_ci __le32 reserved1; 57438c2ecf20Sopenharmony_ci}; 57448c2ecf20Sopenharmony_ci 57458c2ecf20Sopenharmony_ci/* 57468c2ecf20Sopenharmony_ci * Protocol-common statistics collected by the Ustorm (per client) 57478c2ecf20Sopenharmony_ci */ 57488c2ecf20Sopenharmony_cistruct ustorm_per_queue_stats { 57498c2ecf20Sopenharmony_ci struct regpair ucast_no_buff_bytes; 57508c2ecf20Sopenharmony_ci struct regpair mcast_no_buff_bytes; 57518c2ecf20Sopenharmony_ci struct regpair bcast_no_buff_bytes; 57528c2ecf20Sopenharmony_ci __le32 ucast_no_buff_pkts; 57538c2ecf20Sopenharmony_ci __le32 mcast_no_buff_pkts; 57548c2ecf20Sopenharmony_ci __le32 bcast_no_buff_pkts; 57558c2ecf20Sopenharmony_ci __le32 coalesced_pkts; 57568c2ecf20Sopenharmony_ci struct regpair coalesced_bytes; 57578c2ecf20Sopenharmony_ci __le32 coalesced_events; 57588c2ecf20Sopenharmony_ci __le32 coalesced_aborts; 57598c2ecf20Sopenharmony_ci}; 57608c2ecf20Sopenharmony_ci 57618c2ecf20Sopenharmony_ci/* 57628c2ecf20Sopenharmony_ci * Protocol-common statistics collected by the Xstorm (per client) 57638c2ecf20Sopenharmony_ci */ 57648c2ecf20Sopenharmony_cistruct xstorm_per_queue_stats { 57658c2ecf20Sopenharmony_ci struct regpair ucast_bytes_sent; 57668c2ecf20Sopenharmony_ci struct regpair mcast_bytes_sent; 57678c2ecf20Sopenharmony_ci struct regpair bcast_bytes_sent; 57688c2ecf20Sopenharmony_ci __le32 ucast_pkts_sent; 57698c2ecf20Sopenharmony_ci __le32 mcast_pkts_sent; 57708c2ecf20Sopenharmony_ci __le32 bcast_pkts_sent; 57718c2ecf20Sopenharmony_ci __le32 error_drop_pkts; 57728c2ecf20Sopenharmony_ci}; 57738c2ecf20Sopenharmony_ci 57748c2ecf20Sopenharmony_ci/* 57758c2ecf20Sopenharmony_ci * 57768c2ecf20Sopenharmony_ci */ 57778c2ecf20Sopenharmony_cistruct per_queue_stats { 57788c2ecf20Sopenharmony_ci struct tstorm_per_queue_stats tstorm_queue_statistics; 57798c2ecf20Sopenharmony_ci struct ustorm_per_queue_stats ustorm_queue_statistics; 57808c2ecf20Sopenharmony_ci struct xstorm_per_queue_stats xstorm_queue_statistics; 57818c2ecf20Sopenharmony_ci}; 57828c2ecf20Sopenharmony_ci 57838c2ecf20Sopenharmony_ci 57848c2ecf20Sopenharmony_ci/* 57858c2ecf20Sopenharmony_ci * FW version stored in first line of pram 57868c2ecf20Sopenharmony_ci */ 57878c2ecf20Sopenharmony_cistruct pram_fw_version { 57888c2ecf20Sopenharmony_ci u8 major; 57898c2ecf20Sopenharmony_ci u8 minor; 57908c2ecf20Sopenharmony_ci u8 revision; 57918c2ecf20Sopenharmony_ci u8 engineering; 57928c2ecf20Sopenharmony_ci u8 flags; 57938c2ecf20Sopenharmony_ci#define PRAM_FW_VERSION_OPTIMIZED (0x1<<0) 57948c2ecf20Sopenharmony_ci#define PRAM_FW_VERSION_OPTIMIZED_SHIFT 0 57958c2ecf20Sopenharmony_ci#define PRAM_FW_VERSION_STORM_ID (0x3<<1) 57968c2ecf20Sopenharmony_ci#define PRAM_FW_VERSION_STORM_ID_SHIFT 1 57978c2ecf20Sopenharmony_ci#define PRAM_FW_VERSION_BIG_ENDIEN (0x1<<3) 57988c2ecf20Sopenharmony_ci#define PRAM_FW_VERSION_BIG_ENDIEN_SHIFT 3 57998c2ecf20Sopenharmony_ci#define PRAM_FW_VERSION_CHIP_VERSION (0x3<<4) 58008c2ecf20Sopenharmony_ci#define PRAM_FW_VERSION_CHIP_VERSION_SHIFT 4 58018c2ecf20Sopenharmony_ci#define __PRAM_FW_VERSION_RESERVED0 (0x3<<6) 58028c2ecf20Sopenharmony_ci#define __PRAM_FW_VERSION_RESERVED0_SHIFT 6 58038c2ecf20Sopenharmony_ci}; 58048c2ecf20Sopenharmony_ci 58058c2ecf20Sopenharmony_ci 58068c2ecf20Sopenharmony_ci/* 58078c2ecf20Sopenharmony_ci * Ethernet slow path element 58088c2ecf20Sopenharmony_ci */ 58098c2ecf20Sopenharmony_ciunion protocol_common_specific_data { 58108c2ecf20Sopenharmony_ci u8 protocol_data[8]; 58118c2ecf20Sopenharmony_ci struct regpair phy_address; 58128c2ecf20Sopenharmony_ci struct regpair mac_config_addr; 58138c2ecf20Sopenharmony_ci struct afex_vif_list_ramrod_data afex_vif_list_data; 58148c2ecf20Sopenharmony_ci}; 58158c2ecf20Sopenharmony_ci 58168c2ecf20Sopenharmony_ci/* 58178c2ecf20Sopenharmony_ci * The send queue element 58188c2ecf20Sopenharmony_ci */ 58198c2ecf20Sopenharmony_cistruct protocol_common_spe { 58208c2ecf20Sopenharmony_ci struct spe_hdr hdr; 58218c2ecf20Sopenharmony_ci union protocol_common_specific_data data; 58228c2ecf20Sopenharmony_ci}; 58238c2ecf20Sopenharmony_ci 58248c2ecf20Sopenharmony_ci/* The data for the Set Timesync Ramrod */ 58258c2ecf20Sopenharmony_cistruct set_timesync_ramrod_data { 58268c2ecf20Sopenharmony_ci u8 drift_adjust_cmd; 58278c2ecf20Sopenharmony_ci u8 offset_cmd; 58288c2ecf20Sopenharmony_ci u8 add_sub_drift_adjust_value; 58298c2ecf20Sopenharmony_ci u8 drift_adjust_value; 58308c2ecf20Sopenharmony_ci u32 drift_adjust_period; 58318c2ecf20Sopenharmony_ci struct regpair offset_delta; 58328c2ecf20Sopenharmony_ci}; 58338c2ecf20Sopenharmony_ci 58348c2ecf20Sopenharmony_ci/* 58358c2ecf20Sopenharmony_ci * The send queue element 58368c2ecf20Sopenharmony_ci */ 58378c2ecf20Sopenharmony_cistruct slow_path_element { 58388c2ecf20Sopenharmony_ci struct spe_hdr hdr; 58398c2ecf20Sopenharmony_ci struct regpair protocol_data; 58408c2ecf20Sopenharmony_ci}; 58418c2ecf20Sopenharmony_ci 58428c2ecf20Sopenharmony_ci 58438c2ecf20Sopenharmony_ci/* 58448c2ecf20Sopenharmony_ci * Protocol-common statistics counter 58458c2ecf20Sopenharmony_ci */ 58468c2ecf20Sopenharmony_cistruct stats_counter { 58478c2ecf20Sopenharmony_ci __le16 xstats_counter; 58488c2ecf20Sopenharmony_ci __le16 reserved0; 58498c2ecf20Sopenharmony_ci __le32 reserved1; 58508c2ecf20Sopenharmony_ci __le16 tstats_counter; 58518c2ecf20Sopenharmony_ci __le16 reserved2; 58528c2ecf20Sopenharmony_ci __le32 reserved3; 58538c2ecf20Sopenharmony_ci __le16 ustats_counter; 58548c2ecf20Sopenharmony_ci __le16 reserved4; 58558c2ecf20Sopenharmony_ci __le32 reserved5; 58568c2ecf20Sopenharmony_ci __le16 cstats_counter; 58578c2ecf20Sopenharmony_ci __le16 reserved6; 58588c2ecf20Sopenharmony_ci __le32 reserved7; 58598c2ecf20Sopenharmony_ci}; 58608c2ecf20Sopenharmony_ci 58618c2ecf20Sopenharmony_ci 58628c2ecf20Sopenharmony_ci/* 58638c2ecf20Sopenharmony_ci * 58648c2ecf20Sopenharmony_ci */ 58658c2ecf20Sopenharmony_cistruct stats_query_entry { 58668c2ecf20Sopenharmony_ci u8 kind; 58678c2ecf20Sopenharmony_ci u8 index; 58688c2ecf20Sopenharmony_ci __le16 funcID; 58698c2ecf20Sopenharmony_ci __le32 reserved; 58708c2ecf20Sopenharmony_ci struct regpair address; 58718c2ecf20Sopenharmony_ci}; 58728c2ecf20Sopenharmony_ci 58738c2ecf20Sopenharmony_ci/* 58748c2ecf20Sopenharmony_ci * statistic command 58758c2ecf20Sopenharmony_ci */ 58768c2ecf20Sopenharmony_cistruct stats_query_cmd_group { 58778c2ecf20Sopenharmony_ci struct stats_query_entry query[STATS_QUERY_CMD_COUNT]; 58788c2ecf20Sopenharmony_ci}; 58798c2ecf20Sopenharmony_ci 58808c2ecf20Sopenharmony_ci 58818c2ecf20Sopenharmony_ci/* 58828c2ecf20Sopenharmony_ci * statistic command header 58838c2ecf20Sopenharmony_ci */ 58848c2ecf20Sopenharmony_cistruct stats_query_header { 58858c2ecf20Sopenharmony_ci u8 cmd_num; 58868c2ecf20Sopenharmony_ci u8 reserved0; 58878c2ecf20Sopenharmony_ci __le16 drv_stats_counter; 58888c2ecf20Sopenharmony_ci __le32 reserved1; 58898c2ecf20Sopenharmony_ci struct regpair stats_counters_addrs; 58908c2ecf20Sopenharmony_ci}; 58918c2ecf20Sopenharmony_ci 58928c2ecf20Sopenharmony_ci 58938c2ecf20Sopenharmony_ci/* 58948c2ecf20Sopenharmony_ci * Types of statistcis query entry 58958c2ecf20Sopenharmony_ci */ 58968c2ecf20Sopenharmony_cienum stats_query_type { 58978c2ecf20Sopenharmony_ci STATS_TYPE_QUEUE, 58988c2ecf20Sopenharmony_ci STATS_TYPE_PORT, 58998c2ecf20Sopenharmony_ci STATS_TYPE_PF, 59008c2ecf20Sopenharmony_ci STATS_TYPE_TOE, 59018c2ecf20Sopenharmony_ci STATS_TYPE_FCOE, 59028c2ecf20Sopenharmony_ci MAX_STATS_QUERY_TYPE 59038c2ecf20Sopenharmony_ci}; 59048c2ecf20Sopenharmony_ci 59058c2ecf20Sopenharmony_ci 59068c2ecf20Sopenharmony_ci/* 59078c2ecf20Sopenharmony_ci * Indicate of the function status block state 59088c2ecf20Sopenharmony_ci */ 59098c2ecf20Sopenharmony_cienum status_block_state { 59108c2ecf20Sopenharmony_ci SB_DISABLED, 59118c2ecf20Sopenharmony_ci SB_ENABLED, 59128c2ecf20Sopenharmony_ci SB_CLEANED, 59138c2ecf20Sopenharmony_ci MAX_STATUS_BLOCK_STATE 59148c2ecf20Sopenharmony_ci}; 59158c2ecf20Sopenharmony_ci 59168c2ecf20Sopenharmony_ci 59178c2ecf20Sopenharmony_ci/* 59188c2ecf20Sopenharmony_ci * Storm IDs (including attentions for IGU related enums) 59198c2ecf20Sopenharmony_ci */ 59208c2ecf20Sopenharmony_cienum storm_id { 59218c2ecf20Sopenharmony_ci USTORM_ID, 59228c2ecf20Sopenharmony_ci CSTORM_ID, 59238c2ecf20Sopenharmony_ci XSTORM_ID, 59248c2ecf20Sopenharmony_ci TSTORM_ID, 59258c2ecf20Sopenharmony_ci ATTENTION_ID, 59268c2ecf20Sopenharmony_ci MAX_STORM_ID 59278c2ecf20Sopenharmony_ci}; 59288c2ecf20Sopenharmony_ci 59298c2ecf20Sopenharmony_ci 59308c2ecf20Sopenharmony_ci/* 59318c2ecf20Sopenharmony_ci * Taffic types used in ETS and flow control algorithms 59328c2ecf20Sopenharmony_ci */ 59338c2ecf20Sopenharmony_cienum traffic_type { 59348c2ecf20Sopenharmony_ci LLFC_TRAFFIC_TYPE_NW, 59358c2ecf20Sopenharmony_ci LLFC_TRAFFIC_TYPE_FCOE, 59368c2ecf20Sopenharmony_ci LLFC_TRAFFIC_TYPE_ISCSI, 59378c2ecf20Sopenharmony_ci MAX_TRAFFIC_TYPE 59388c2ecf20Sopenharmony_ci}; 59398c2ecf20Sopenharmony_ci 59408c2ecf20Sopenharmony_ci 59418c2ecf20Sopenharmony_ci/* 59428c2ecf20Sopenharmony_ci * zone A per-queue data 59438c2ecf20Sopenharmony_ci */ 59448c2ecf20Sopenharmony_cistruct tstorm_queue_zone_data { 59458c2ecf20Sopenharmony_ci struct regpair reserved[4]; 59468c2ecf20Sopenharmony_ci}; 59478c2ecf20Sopenharmony_ci 59488c2ecf20Sopenharmony_ci 59498c2ecf20Sopenharmony_ci/* 59508c2ecf20Sopenharmony_ci * zone B per-VF data 59518c2ecf20Sopenharmony_ci */ 59528c2ecf20Sopenharmony_cistruct tstorm_vf_zone_data { 59538c2ecf20Sopenharmony_ci struct regpair reserved; 59548c2ecf20Sopenharmony_ci}; 59558c2ecf20Sopenharmony_ci 59568c2ecf20Sopenharmony_ci/* Add or Subtract Value for Set Timesync Ramrod */ 59578c2ecf20Sopenharmony_cienum ts_add_sub_value { 59588c2ecf20Sopenharmony_ci TS_SUB_VALUE, 59598c2ecf20Sopenharmony_ci TS_ADD_VALUE, 59608c2ecf20Sopenharmony_ci MAX_TS_ADD_SUB_VALUE 59618c2ecf20Sopenharmony_ci}; 59628c2ecf20Sopenharmony_ci 59638c2ecf20Sopenharmony_ci/* Drift-Adjust Commands for Set Timesync Ramrod */ 59648c2ecf20Sopenharmony_cienum ts_drift_adjust_cmd { 59658c2ecf20Sopenharmony_ci TS_DRIFT_ADJUST_KEEP, 59668c2ecf20Sopenharmony_ci TS_DRIFT_ADJUST_SET, 59678c2ecf20Sopenharmony_ci TS_DRIFT_ADJUST_RESET, 59688c2ecf20Sopenharmony_ci MAX_TS_DRIFT_ADJUST_CMD 59698c2ecf20Sopenharmony_ci}; 59708c2ecf20Sopenharmony_ci 59718c2ecf20Sopenharmony_ci/* Offset Commands for Set Timesync Ramrod */ 59728c2ecf20Sopenharmony_cienum ts_offset_cmd { 59738c2ecf20Sopenharmony_ci TS_OFFSET_KEEP, 59748c2ecf20Sopenharmony_ci TS_OFFSET_INC, 59758c2ecf20Sopenharmony_ci TS_OFFSET_DEC, 59768c2ecf20Sopenharmony_ci MAX_TS_OFFSET_CMD 59778c2ecf20Sopenharmony_ci}; 59788c2ecf20Sopenharmony_ci 59798c2ecf20Sopenharmony_ci /* zone A per-queue data */ 59808c2ecf20Sopenharmony_cistruct ustorm_queue_zone_data { 59818c2ecf20Sopenharmony_ci struct ustorm_eth_rx_producers eth_rx_producers; 59828c2ecf20Sopenharmony_ci struct regpair reserved[3]; 59838c2ecf20Sopenharmony_ci}; 59848c2ecf20Sopenharmony_ci 59858c2ecf20Sopenharmony_ci 59868c2ecf20Sopenharmony_ci/* 59878c2ecf20Sopenharmony_ci * zone B per-VF data 59888c2ecf20Sopenharmony_ci */ 59898c2ecf20Sopenharmony_cistruct ustorm_vf_zone_data { 59908c2ecf20Sopenharmony_ci struct regpair reserved; 59918c2ecf20Sopenharmony_ci}; 59928c2ecf20Sopenharmony_ci 59938c2ecf20Sopenharmony_ci 59948c2ecf20Sopenharmony_ci/* 59958c2ecf20Sopenharmony_ci * data per VF-PF channel 59968c2ecf20Sopenharmony_ci */ 59978c2ecf20Sopenharmony_cistruct vf_pf_channel_data { 59988c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 59998c2ecf20Sopenharmony_ci u16 reserved0; 60008c2ecf20Sopenharmony_ci u8 valid; 60018c2ecf20Sopenharmony_ci u8 state; 60028c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 60038c2ecf20Sopenharmony_ci u8 state; 60048c2ecf20Sopenharmony_ci u8 valid; 60058c2ecf20Sopenharmony_ci u16 reserved0; 60068c2ecf20Sopenharmony_ci#endif 60078c2ecf20Sopenharmony_ci u32 reserved1; 60088c2ecf20Sopenharmony_ci}; 60098c2ecf20Sopenharmony_ci 60108c2ecf20Sopenharmony_ci 60118c2ecf20Sopenharmony_ci/* 60128c2ecf20Sopenharmony_ci * State of VF-PF channel 60138c2ecf20Sopenharmony_ci */ 60148c2ecf20Sopenharmony_cienum vf_pf_channel_state { 60158c2ecf20Sopenharmony_ci VF_PF_CHANNEL_STATE_READY, 60168c2ecf20Sopenharmony_ci VF_PF_CHANNEL_STATE_WAITING_FOR_ACK, 60178c2ecf20Sopenharmony_ci MAX_VF_PF_CHANNEL_STATE 60188c2ecf20Sopenharmony_ci}; 60198c2ecf20Sopenharmony_ci 60208c2ecf20Sopenharmony_ci 60218c2ecf20Sopenharmony_ci/* 60228c2ecf20Sopenharmony_ci * vif_list_rule_kind 60238c2ecf20Sopenharmony_ci */ 60248c2ecf20Sopenharmony_cienum vif_list_rule_kind { 60258c2ecf20Sopenharmony_ci VIF_LIST_RULE_SET, 60268c2ecf20Sopenharmony_ci VIF_LIST_RULE_GET, 60278c2ecf20Sopenharmony_ci VIF_LIST_RULE_CLEAR_ALL, 60288c2ecf20Sopenharmony_ci VIF_LIST_RULE_CLEAR_FUNC, 60298c2ecf20Sopenharmony_ci MAX_VIF_LIST_RULE_KIND 60308c2ecf20Sopenharmony_ci}; 60318c2ecf20Sopenharmony_ci 60328c2ecf20Sopenharmony_ci 60338c2ecf20Sopenharmony_ci/* 60348c2ecf20Sopenharmony_ci * zone A per-queue data 60358c2ecf20Sopenharmony_ci */ 60368c2ecf20Sopenharmony_cistruct xstorm_queue_zone_data { 60378c2ecf20Sopenharmony_ci struct regpair reserved[4]; 60388c2ecf20Sopenharmony_ci}; 60398c2ecf20Sopenharmony_ci 60408c2ecf20Sopenharmony_ci 60418c2ecf20Sopenharmony_ci/* 60428c2ecf20Sopenharmony_ci * zone B per-VF data 60438c2ecf20Sopenharmony_ci */ 60448c2ecf20Sopenharmony_cistruct xstorm_vf_zone_data { 60458c2ecf20Sopenharmony_ci struct regpair reserved; 60468c2ecf20Sopenharmony_ci}; 60478c2ecf20Sopenharmony_ci 60488c2ecf20Sopenharmony_ci#endif /* BNX2X_HSI_H */ 6049