net/ice/base: change get PHY capability log level
[dpdk.git] / drivers / net / ice / base / ice_adminq_cmd.h
index 7afdb65..ff0e712 100644 (file)
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _ICE_ADMINQ_CMD_H_
@@ -9,12 +9,10 @@
  * descriptor format. It is shared between Firmware and Software.
  */
 
-
 #define ICE_MAX_VSI                    768
 #define ICE_AQC_TOPO_MAX_LEVEL_NUM     0x9
 #define ICE_AQ_SET_MAC_FRAME_SIZE_MAX  9728
 
-
 struct ice_aqc_generic {
        __le32 param0;
        __le32 param1;
@@ -22,7 +20,6 @@ struct ice_aqc_generic {
        __le32 addr_low;
 };
 
-
 /* Get version (direct 0x0001) */
 struct ice_aqc_get_ver {
        __le32 rom_ver;
@@ -37,7 +34,6 @@ struct ice_aqc_get_ver {
        u8 api_patch;
 };
 
-
 /* Send driver version (indirect 0x0002) */
 struct ice_aqc_driver_ver {
        u8 major_ver;
@@ -49,7 +45,6 @@ struct ice_aqc_driver_ver {
        __le32 addr_low;
 };
 
-
 /* Queue Shutdown (direct 0x0003) */
 struct ice_aqc_q_shutdown {
        u8 driver_unloading;
@@ -57,9 +52,6 @@ struct ice_aqc_q_shutdown {
        u8 reserved[15];
 };
 
-
-
-
 /* Request resource ownership (direct 0x0008)
  * Release resource ownership (direct 0x0009)
  */
@@ -92,7 +84,6 @@ struct ice_aqc_req_res {
        u8 reserved[2];
 };
 
-
 /* Get function capabilities (indirect 0x000A)
  * Get device capabilities (indirect 0x000B)
  */
@@ -105,7 +96,6 @@ struct ice_aqc_list_caps {
        __le32 addr_low;
 };
 
-
 /* Device/Function buffer entry, repeated per reported capability */
 struct ice_aqc_list_caps_elem {
        __le16 cap;
@@ -119,6 +109,9 @@ struct ice_aqc_list_caps_elem {
 #define ICE_AQC_CAPS_MSIX                              0x0043
 #define ICE_AQC_CAPS_FD                                        0x0045
 #define ICE_AQC_CAPS_MAX_MTU                           0x0047
+#define ICE_AQC_CAPS_IWARP                             0x0051
+#define ICE_AQC_CAPS_PCIE_RESET_AVOIDANCE              0x0076
+#define ICE_AQC_CAPS_NVM_MGMT                          0x0080
 
        u8 major_ver;
        u8 minor_ver;
@@ -132,7 +125,6 @@ struct ice_aqc_list_caps_elem {
        __le64 rsvd2;
 };
 
-
 /* Manage MAC address, read command - indirect (0x0107)
  * This struct is also used for the response
  */
@@ -153,7 +145,6 @@ struct ice_aqc_manage_mac_read {
        __le32 addr_low;
 };
 
-
 /* Response buffer format for manage MAC read command */
 struct ice_aqc_manage_mac_read_resp {
        u8 lport_num;
@@ -163,7 +154,6 @@ struct ice_aqc_manage_mac_read_resp {
        u8 mac_addr[ETH_ALEN];
 };
 
-
 /* Manage MAC address, write command - direct (0x0108) */
 struct ice_aqc_manage_mac_write {
        u8 rsvd;
@@ -171,18 +161,15 @@ struct ice_aqc_manage_mac_write {
 #define ICE_AQC_MAN_MAC_WR_MC_MAG_EN           BIT(0)
 #define ICE_AQC_MAN_MAC_WR_WOL_LAA_PFR_KEEP    BIT(1)
 #define ICE_AQC_MAN_MAC_WR_S           6
-#define ICE_AQC_MAN_MAC_WR_M           (3 << ICE_AQC_MAN_MAC_WR_S)
+#define ICE_AQC_MAN_MAC_WR_M           MAKEMASK(3, ICE_AQC_MAN_MAC_WR_S)
 #define ICE_AQC_MAN_MAC_UPDATE_LAA     0
-#define ICE_AQC_MAN_MAC_UPDATE_LAA_WOL (BIT(0) << ICE_AQC_MAN_MAC_WR_S)
-       /* High 16 bits of MAC address in big endian order */
-       __be16 sah;
-       /* Low 32 bits of MAC address in big endian order */
-       __be32 sal;
+#define ICE_AQC_MAN_MAC_UPDATE_LAA_WOL BIT(ICE_AQC_MAN_MAC_WR_S)
+       /* byte stream in network order */
+       u8 mac_addr[ETH_ALEN];
        __le32 addr_high;
        __le32 addr_low;
 };
 
-
 /* Clear PXE Command and response (direct 0x0110) */
 struct ice_aqc_clear_pxe {
        u8 rx_cnt;
@@ -190,7 +177,6 @@ struct ice_aqc_clear_pxe {
        u8 reserved[15];
 };
 
-
 /* Configure No-Drop Policy Command (direct 0x0112) */
 struct ice_aqc_config_no_drop_policy {
        u8 opts;
@@ -215,7 +201,6 @@ struct ice_aqc_get_sw_cfg {
        __le32 addr_low;
 };
 
-
 /* Each entry in the response buffer is of the following type: */
 struct ice_aqc_get_sw_cfg_resp_elem {
        /* VSI/Port Number */
@@ -242,16 +227,27 @@ struct ice_aqc_get_sw_cfg_resp_elem {
 #define ICE_AQC_GET_SW_CONF_RESP_IS_VF         BIT(15)
 };
 
-
-/* The response buffer is as follows. Note that the length of the
- * elements array varies with the length of the command response.
- */
-struct ice_aqc_get_sw_cfg_resp {
-       struct ice_aqc_get_sw_cfg_resp_elem elements[1];
+/* Set Port parameters, (direct, 0x0203) */
+struct ice_aqc_set_port_params {
+       __le16 cmd_flags;
+#define ICE_AQC_SET_P_PARAMS_SAVE_BAD_PACKETS  BIT(0)
+#define ICE_AQC_SET_P_PARAMS_PAD_SHORT_PACKETS BIT(1)
+#define ICE_AQC_SET_P_PARAMS_DOUBLE_VLAN_ENA   BIT(2)
+       __le16 bad_frame_vsi;
+#define ICE_AQC_SET_P_PARAMS_VSI_S     0
+#define ICE_AQC_SET_P_PARAMS_VSI_M     (0x3FF << ICE_AQC_SET_P_PARAMS_VSI_S)
+#define ICE_AQC_SET_P_PARAMS_VSI_VALID BIT(15)
+       __le16 swid;
+#define ICE_AQC_SET_P_PARAMS_SWID_S    0
+#define ICE_AQC_SET_P_PARAMS_SWID_M    (0xFF << ICE_AQC_SET_P_PARAMS_SWID_S)
+#define ICE_AQC_SET_P_PARAMS_LOGI_PORT_ID_S    8
+#define ICE_AQC_SET_P_PARAMS_LOGI_PORT_ID_M    \
+                               (0x3F << ICE_AQC_SET_P_PARAMS_LOGI_PORT_ID_S)
+#define ICE_AQC_SET_P_PARAMS_IS_LOGI_PORT      BIT(14)
+#define ICE_AQC_SET_P_PARAMS_SWID_VALID                BIT(15)
+       u8 reserved[10];
 };
 
-
-
 /* These resource type defines are used for all switch resource
  * commands where a resource type is required, such as:
  * Get Resource Allocation command (indirect 0x0204)
@@ -315,16 +311,6 @@ struct ice_aqc_get_res_resp_elem {
        __le16 total_free; /* Resources un-allocated/not reserved by any PF */
 };
 
-/* Buffer for Get Resource command */
-struct ice_aqc_get_res_resp {
-       /* Number of resource entries to be calculated using
-        * datalen/sizeof(struct ice_aqc_cmd_resp)).
-        * Value of 'datalen' gets updated as part of response.
-        */
-       struct ice_aqc_get_res_resp_elem elem[1];
-};
-
-
 /* Allocate Resources command (indirect 0x0208)
  * Free Resources command (indirect 0x0209)
  */
@@ -335,7 +321,6 @@ struct ice_aqc_alloc_free_res_cmd {
        __le32 addr_low;
 };
 
-
 /* Resource descriptor */
 struct ice_aqc_res_elem {
        union {
@@ -344,7 +329,6 @@ struct ice_aqc_res_elem {
        } e;
 };
 
-
 /* Buffer for Allocate/Free Resources commands */
 struct ice_aqc_alloc_free_res_elem {
        __le16 res_type; /* Types defined above cmd 0x0204 */
@@ -352,10 +336,9 @@ struct ice_aqc_alloc_free_res_elem {
 #define ICE_AQC_RES_TYPE_VSI_PRUNE_LIST_M      \
                                (0xF << ICE_AQC_RES_TYPE_VSI_PRUNE_LIST_S)
        __le16 num_elems;
-       struct ice_aqc_res_elem elem[1];
+       struct ice_aqc_res_elem elem[STRUCT_HACK_VAR_LEN];
 };
 
-
 /* Get Allocated Resource Descriptors Command (indirect 0x020A) */
 struct ice_aqc_get_allocd_res_desc {
        union {
@@ -375,11 +358,6 @@ struct ice_aqc_get_allocd_res_desc {
        __le32 addr_low;
 };
 
-struct ice_aqc_get_allocd_res_desc_resp {
-       struct ice_aqc_res_elem elem[1];
-};
-
-
 /* Add VSI (indirect 0x0210)
  * Update VSI (indirect 0x0211)
  * Get VSI (indirect 0x0212)
@@ -405,7 +383,6 @@ struct ice_aqc_add_get_update_free_vsi {
        __le32 addr_low;
 };
 
-
 /* Response descriptor for:
  * Add VSI (indirect 0x0210)
  * Update VSI (indirect 0x0211)
@@ -420,7 +397,6 @@ struct ice_aqc_add_update_free_vsi_resp {
        __le32 addr_low;
 };
 
-
 struct ice_aqc_get_vsi_resp {
        __le16 vsi_num;
        u8 vf_id;
@@ -434,7 +410,6 @@ struct ice_aqc_get_vsi_resp {
        __le32 addr_low;
 };
 
-
 struct ice_aqc_vsi_props {
        __le16 valid_sections;
 #define ICE_AQ_VSI_PROP_SW_VALID               BIT(0)
@@ -446,6 +421,7 @@ struct ice_aqc_vsi_props {
 #define ICE_AQ_VSI_PROP_RXQ_MAP_VALID          BIT(6)
 #define ICE_AQ_VSI_PROP_Q_OPT_VALID            BIT(7)
 #define ICE_AQ_VSI_PROP_OUTER_UP_VALID         BIT(8)
+#define ICE_AQ_VSI_PROP_ACL_VALID              BIT(10)
 #define ICE_AQ_VSI_PROP_FLOW_DIR_VALID         BIT(11)
 #define ICE_AQ_VSI_PROP_PASID_VALID            BIT(12)
        /* switch section */
@@ -561,8 +537,16 @@ struct ice_aqc_vsi_props {
        u8 q_opt_reserved[3];
        /* outer up section */
        __le32 outer_up_table; /* same structure and defines as ingress tbl */
-       /* section 10 */
-       __le16 sect_10_reserved;
+       /* ACL section */
+       __le16 acl_def_act;
+#define ICE_AQ_VSI_ACL_DEF_RX_PROF_S   0
+#define ICE_AQ_VSI_ACL_DEF_RX_PROF_M   (0xF << ICE_AQ_VSI_ACL_DEF_RX_PROF_S)
+#define ICE_AQ_VSI_ACL_DEF_RX_TABLE_S  4
+#define ICE_AQ_VSI_ACL_DEF_RX_TABLE_M  (0xF << ICE_AQ_VSI_ACL_DEF_RX_TABLE_S)
+#define ICE_AQ_VSI_ACL_DEF_TX_PROF_S   8
+#define ICE_AQ_VSI_ACL_DEF_TX_PROF_M   (0xF << ICE_AQ_VSI_ACL_DEF_TX_PROF_S)
+#define ICE_AQ_VSI_ACL_DEF_TX_TABLE_S  12
+#define ICE_AQ_VSI_ACL_DEF_TX_TABLE_M  (0xF << ICE_AQ_VSI_ACL_DEF_TX_TABLE_S)
        /* flow director section */
        __le16 fd_options;
 #define ICE_AQ_VSI_FD_ENABLE           BIT(0)
@@ -589,7 +573,6 @@ struct ice_aqc_vsi_props {
        u8 reserved[24];
 };
 
-
 /* Add/update mirror rule - direct (0x0260) */
 #define ICE_AQC_RULE_ID_VALID_S                7
 #define ICE_AQC_RULE_ID_VALID_M                (0x1 << ICE_AQC_RULE_ID_VALID_S)
@@ -694,10 +677,9 @@ struct ice_aqc_storm_cfg {
        __le32 reserved;
 };
 
-
 #define ICE_MAX_NUM_RECIPES 64
 
-/* Add/Get Recipe (indirect 0x0290/0x0292)*/
+/* Add/Get Recipe (indirect 0x0290/0x0292) */
 struct ice_aqc_add_get_recipe {
        __le16 num_sub_recipes; /* Input in Add cmd, Output in Get cmd */
        __le16 return_index;    /* Input, used for Get cmd only */
@@ -711,7 +693,7 @@ struct ice_aqc_recipe_content {
 #define ICE_AQ_RECIPE_ID_S             0
 #define ICE_AQ_RECIPE_ID_M             (0x3F << ICE_AQ_RECIPE_ID_S)
 #define ICE_AQ_RECIPE_ID_IS_ROOT       BIT(7)
-#define ICE_AQ_SW_ID_LKUP_IDX          0
+#define        ICE_AQ_SW_ID_LKUP_IDX           0
        u8 lkup_indx[5];
 #define ICE_AQ_RECIPE_LKUP_DATA_S      0
 #define ICE_AQ_RECIPE_LKUP_DATA_M      (0x3F << ICE_AQ_RECIPE_LKUP_DATA_S)
@@ -751,13 +733,6 @@ struct ice_aqc_recipe_data_elem {
        u8 rsvd2[20];
 };
 
-/* This struct contains a number of entries as per the
- * num_sub_recipes in the command
- */
-struct ice_aqc_add_get_recipe_data {
-       struct ice_aqc_recipe_data_elem recipe[1];
-};
-
 /* Set/Get Recipes to Profile Association (direct 0x0291/0x0293) */
 struct ice_aqc_recipe_to_profile {
        __le16 profile_id;
@@ -779,8 +754,6 @@ struct ice_aqc_sw_rules {
        __le32 addr_low;
 };
 
-
-#pragma pack(1)
 /* Add/Update/Get/Remove lookup Rx/Tx command/response entry
  * This structures describes the lookup rules and associated actions. "index"
  * is returned as part of a response to a successful Add command, and can be
@@ -843,7 +816,7 @@ struct ice_sw_rule_lkup_rx_tx {
 #define ICE_SINGLE_ACT_OTHER_ACTS              0x3
 #define ICE_SINGLE_OTHER_ACT_IDENTIFIER_S      17
 #define ICE_SINGLE_OTHER_ACT_IDENTIFIER_M      \
-                               (0x3 << ICE_SINGLE_OTHER_ACT_IDENTIFIER_S)
+                               (0x3 << ICE_SINGLE_OTHER_ACT_IDENTIFIER_S)
 
        /* Bit 17:18 - Defines other actions */
        /* Other action = 0 - Mirror VSI */
@@ -863,10 +836,8 @@ struct ice_sw_rule_lkup_rx_tx {
         * lookup-type
         */
        __le16 hdr_len;
-       u8 hdr[1];
+       u8 hdr[STRUCT_HACK_VAR_LEN];
 };
-#pragma pack()
-
 
 /* Add/Update/Remove large action command/response entry
  * "index" is returned as part of a response to a successful Add command, and
@@ -875,7 +846,6 @@ struct ice_sw_rule_lkup_rx_tx {
 struct ice_sw_rule_lg_act {
        __le16 index; /* Index in large action table */
        __le16 size;
-       __le32 act[1]; /* array of size for actions */
        /* Max number of large actions */
 #define ICE_MAX_LG_ACT 4
        /* Bit 0:1 - Action type */
@@ -926,9 +896,9 @@ struct ice_sw_rule_lg_act {
 #define ICE_LG_ACT_STAT_COUNT          0x7
 #define ICE_LG_ACT_STAT_COUNT_S                3
 #define ICE_LG_ACT_STAT_COUNT_M                (0x7F << ICE_LG_ACT_STAT_COUNT_S)
+       __le32 act[STRUCT_HACK_VAR_LEN]; /* array of size for actions */
 };
 
-
 /* Add/Update/Remove VSI list command/response entry
  * "index" is returned as part of a response to a successful Add command, and
  * can be used to identify the VSI list for Update/Get/Remove commands.
@@ -936,10 +906,9 @@ struct ice_sw_rule_lg_act {
 struct ice_sw_rule_vsi_list {
        __le16 index; /* Index of VSI/Prune list */
        __le16 number_vsi;
-       __le16 vsi[1]; /* Array of number_vsi VSI numbers */
+       __le16 vsi[STRUCT_HACK_VAR_LEN]; /* Array of number_vsi VSI numbers */
 };
 
-
 #pragma pack(1)
 /* Query VSI list command/response entry */
 struct ice_sw_rule_vsi_list_query {
@@ -948,7 +917,6 @@ struct ice_sw_rule_vsi_list_query {
 };
 #pragma pack()
 
-
 #pragma pack(1)
 /* Add switch rule response:
  * Content of return buffer is same as the input buffer. The status field and
@@ -974,7 +942,6 @@ struct ice_aqc_sw_rules_elem {
 
 #pragma pack()
 
-
 /* PFC Ignore (direct 0x0301)
  * The command and response use the same descriptor structure
  */
@@ -1004,12 +971,13 @@ struct ice_aqc_set_query_pfc_mode {
 struct ice_aqc_set_dcb_params {
        u8 cmd_flags; /* unused in response */
 #define ICE_AQC_LINK_UP_DCB_CFG    BIT(0)
+#define ICE_AQC_PERSIST_DCB_CFG    BIT(1)
        u8 valid_flags; /* unused in response */
 #define ICE_AQC_LINK_UP_DCB_CFG_VALID    BIT(0)
+#define ICE_AQC_PERSIST_DCB_CFG_VALID    BIT(1)
        u8 rsvd[14];
 };
 
-
 /* Get Default Topology (indirect 0x0400) */
 struct ice_aqc_get_topo {
        u8 port_num;
@@ -1020,7 +988,6 @@ struct ice_aqc_get_topo {
        __le32 addr_low;
 };
 
-
 /* Update TSE (indirect 0x0403)
  * Get TSE (indirect 0x0404)
  * Add TSE (indirect 0x0401)
@@ -1037,16 +1004,6 @@ struct ice_aqc_sched_elem_cmd {
        __le32 addr_low;
 };
 
-
-/* This is the buffer for:
- * Suspend Nodes (indirect 0x0409)
- * Resume Nodes (indirect 0x040A)
- */
-struct ice_aqc_suspend_resume_elem {
-       __le32 teid[1];
-};
-
-
 struct ice_aqc_txsched_move_grp_info_hdr {
        __le32 src_parent_teid;
        __le32 dest_parent_teid;
@@ -1054,19 +1011,16 @@ struct ice_aqc_txsched_move_grp_info_hdr {
        __le16 reserved;
 };
 
-
 struct ice_aqc_move_elem {
        struct ice_aqc_txsched_move_grp_info_hdr hdr;
-       __le32 teid[1];
+       __le32 teid[STRUCT_HACK_VAR_LEN];
 };
 
-
 struct ice_aqc_elem_info_bw {
        __le16 bw_profile_idx;
        __le16 bw_alloc;
 };
 
-
 struct ice_aqc_txsched_elem {
        u8 elem_type; /* Special field, reserved for some aq calls */
 #define ICE_AQC_ELEM_TYPE_UNDEFINED            0x0
@@ -1098,50 +1052,34 @@ struct ice_aqc_txsched_elem {
        __le16 reserved2;
 };
 
-
 struct ice_aqc_txsched_elem_data {
        __le32 parent_teid;
        __le32 node_teid;
        struct ice_aqc_txsched_elem data;
 };
 
-
 struct ice_aqc_txsched_topo_grp_info_hdr {
        __le32 parent_teid;
        __le16 num_elems;
        __le16 reserved2;
 };
 
-
 struct ice_aqc_add_elem {
        struct ice_aqc_txsched_topo_grp_info_hdr hdr;
-       struct ice_aqc_txsched_elem_data generic[1];
+       struct ice_aqc_txsched_elem_data generic[STRUCT_HACK_VAR_LEN];
 };
 
-
-struct ice_aqc_conf_elem {
-       struct ice_aqc_txsched_elem_data generic[1];
-};
-
-
-struct ice_aqc_get_elem {
-       struct ice_aqc_txsched_elem_data generic[1];
-};
-
-
 struct ice_aqc_get_topo_elem {
        struct ice_aqc_txsched_topo_grp_info_hdr hdr;
        struct ice_aqc_txsched_elem_data
                generic[ICE_AQC_TOPO_MAX_LEVEL_NUM];
 };
 
-
 struct ice_aqc_delete_elem {
        struct ice_aqc_txsched_topo_grp_info_hdr hdr;
-       __le32 teid[1];
+       __le32 teid[STRUCT_HACK_VAR_LEN];
 };
 
-
 /* Query Port ETS (indirect 0x040E)
  *
  * This indirect command is used to query port TC node configuration.
@@ -1168,7 +1106,6 @@ struct ice_aqc_port_ets_elem {
        __le32 tc_node_teid[8]; /* Used for response, reserved in command */
 };
 
-
 /* Rate limiting profile for
  * Add RL profile (indirect 0x0410)
  * Query RL profile (indirect 0x0411)
@@ -1184,7 +1121,6 @@ struct ice_aqc_rl_profile {
        __le32 addr_low;
 };
 
-
 struct ice_aqc_rl_profile_elem {
        u8 level;
        u8 flags;
@@ -1204,13 +1140,6 @@ struct ice_aqc_rl_profile_elem {
        __le16 rl_encode;
 };
 
-
-struct ice_aqc_rl_profile_generic_elem {
-       struct ice_aqc_rl_profile_elem generic[1];
-};
-
-
-
 /* Configure L2 Node CGD (indirect 0x0414)
  * This indirect command allows configuring a congestion domain for given L2
  * node TEIDs in the scheduler topology.
@@ -1222,19 +1151,12 @@ struct ice_aqc_cfg_l2_node_cgd {
        __le32 addr_low;
 };
 
-
 struct ice_aqc_cfg_l2_node_cgd_elem {
        __le32 node_teid;
        u8 cgd;
        u8 reserved[3];
 };
 
-
-struct ice_aqc_cfg_l2_node_cgd_data {
-       struct ice_aqc_cfg_l2_node_cgd_elem elem[1];
-};
-
-
 /* Query Scheduler Resource Allocation (indirect 0x0412)
  * This indirect command retrieves the scheduler resources allocated by
  * EMP Firmware to the given PF.
@@ -1245,7 +1167,6 @@ struct ice_aqc_query_txsched_res {
        __le32 addr_low;
 };
 
-
 struct ice_aqc_generic_sched_props {
        __le16 phys_levels;
        __le16 logical_levels;
@@ -1257,7 +1178,6 @@ struct ice_aqc_generic_sched_props {
        u8 rsvd1[22];
 };
 
-
 struct ice_aqc_layer_props {
        u8 logical_layer;
        u8 chunk_size;
@@ -1271,13 +1191,11 @@ struct ice_aqc_layer_props {
        u8 rsvd1[14];
 };
 
-
 struct ice_aqc_query_txsched_res_resp {
        struct ice_aqc_generic_sched_props sched_props;
        struct ice_aqc_layer_props layer_props[ICE_AQC_TOPO_MAX_LEVEL_NUM];
 };
 
-
 /* Query Node to Root Topology (indirect 0x0413)
  * This command uses ice_aqc_get_elem as its data buffer.
  */
@@ -1288,7 +1206,6 @@ struct ice_aqc_query_node_to_root {
        __le32 addr_low;
 };
 
-
 /* Get PHY capabilities (indirect 0x0600) */
 struct ice_aqc_get_phy_caps {
        u8 lport_num;
@@ -1311,7 +1228,6 @@ struct ice_aqc_get_phy_caps {
        __le32 addr_low;
 };
 
-
 /* This is #define of PHY type (Extended):
  * The first set of defines is for phy_type_low.
  */
@@ -1386,7 +1302,7 @@ struct ice_aqc_get_phy_caps {
 #define ICE_PHY_TYPE_HIGH_100G_CAUI2           BIT_ULL(2)
 #define ICE_PHY_TYPE_HIGH_100G_AUI2_AOC_ACC    BIT_ULL(3)
 #define ICE_PHY_TYPE_HIGH_100G_AUI2            BIT_ULL(4)
-#define ICE_PHY_TYPE_HIGH_MAX_INDEX            19
+#define ICE_PHY_TYPE_HIGH_MAX_INDEX            5
 
 struct ice_aqc_get_phy_caps_data {
        __le64 phy_type_low; /* Use values from ICE_PHY_TYPE_LOW_* */
@@ -1401,8 +1317,11 @@ struct ice_aqc_get_phy_caps_data {
 #define ICE_AQC_PHY_EN_LESM                            BIT(6)
 #define ICE_AQC_PHY_EN_AUTO_FEC                                BIT(7)
 #define ICE_AQC_PHY_CAPS_MASK                          MAKEMASK(0xff, 0)
-       u8 low_power_ctrl;
+       u8 low_power_ctrl_an;
 #define ICE_AQC_PHY_EN_D3COLD_LOW_POWER_AUTONEG                BIT(0)
+#define ICE_AQC_PHY_AN_EN_CLAUSE28                     BIT(1)
+#define ICE_AQC_PHY_AN_EN_CLAUSE73                     BIT(2)
+#define ICE_AQC_PHY_AN_EN_CLAUSE37                     BIT(3)
        __le16 eee_cap;
 #define ICE_AQC_PHY_EEE_EN_100BASE_TX                  BIT(0)
 #define ICE_AQC_PHY_EEE_EN_1000BASE_T                  BIT(1)
@@ -1427,12 +1346,14 @@ struct ice_aqc_get_phy_caps_data {
 #define ICE_AQC_PHY_FEC_25G_RS_CLAUSE91_EN             BIT(6)
 #define ICE_AQC_PHY_FEC_25G_KR_CLAUSE74_EN             BIT(7)
 #define ICE_AQC_PHY_FEC_MASK                           MAKEMASK(0xdf, 0)
-       u8 rsvd1;       /* Byte 35 reserved */
+       u8 module_compliance_enforcement;
+#define ICE_AQC_MOD_ENFORCE_STRICT_MODE                        BIT(0)
        u8 extended_compliance_code;
 #define ICE_MODULE_TYPE_TOTAL_BYTE                     3
        u8 module_type[ICE_MODULE_TYPE_TOTAL_BYTE];
 #define ICE_AQC_MOD_TYPE_BYTE0_SFP_PLUS                        0xA0
 #define ICE_AQC_MOD_TYPE_BYTE0_QSFP_PLUS               0x80
+#define ICE_AQC_MOD_TYPE_IDENT                         1
 #define ICE_AQC_MOD_TYPE_BYTE1_SFP_PLUS_CU_PASSIVE     BIT(0)
 #define ICE_AQC_MOD_TYPE_BYTE1_SFP_PLUS_CU_ACTIVE      BIT(1)
 #define ICE_AQC_MOD_TYPE_BYTE1_10G_BASE_SR             BIT(4)
@@ -1453,7 +1374,6 @@ struct ice_aqc_get_phy_caps_data {
        } qual_modules[ICE_AQC_QUAL_MOD_COUNT_MAX];
 };
 
-
 /* Set PHY capabilities (direct 0x0601)
  * NOTE: This command must be followed by setup link and restart auto-neg
  */
@@ -1464,7 +1384,6 @@ struct ice_aqc_set_phy_cfg {
        __le32 addr_low;
 };
 
-
 /* Set PHY config command data structure */
 struct ice_aqc_set_phy_cfg_data {
        __le64 phy_type_low; /* Use values from ICE_PHY_TYPE_LOW_* */
@@ -1478,14 +1397,13 @@ struct ice_aqc_set_phy_cfg_data {
 #define ICE_AQ_PHY_ENA_AUTO_LINK_UPDT  BIT(5)
 #define ICE_AQ_PHY_ENA_LESM            BIT(6)
 #define ICE_AQ_PHY_ENA_AUTO_FEC                BIT(7)
-       u8 low_power_ctrl;
+       u8 low_power_ctrl_an;
        __le16 eee_cap; /* Value from ice_aqc_get_phy_caps */
        __le16 eeer_value;
        u8 link_fec_opt; /* Use defines from ice_aqc_get_phy_caps */
-       u8 rsvd1;
+       u8 module_compliance_enforcement;
 };
 
-
 /* Set MAC Config command data structure (direct 0x0603) */
 struct ice_aqc_set_mac_cfg {
        __le16 max_frame_size;
@@ -1505,7 +1423,6 @@ struct ice_aqc_set_mac_cfg {
        u8 reserved[7];
 };
 
-
 /* Restart AN command data structure (direct 0x0605)
  * Also used for response, with only the lport_num field present.
  */
@@ -1518,7 +1435,6 @@ struct ice_aqc_restart_an {
        u8 reserved2[13];
 };
 
-
 /* Get link status (indirect 0x0607), also used for Link Status Event */
 struct ice_aqc_get_link_status {
        u8 lport_num;
@@ -1535,7 +1451,6 @@ struct ice_aqc_get_link_status {
        __le32 addr_low;
 };
 
-
 /* Get link status response data structure, also used for Link Status Event */
 struct ice_aqc_get_link_status_data {
        u8 topo_media_conflict;
@@ -1548,6 +1463,10 @@ struct ice_aqc_get_link_status_data {
 #define ICE_AQ_LINK_TOPO_UNSUPP_MEDIA  BIT(7)
        u8 link_cfg_err;
 #define ICE_AQ_LINK_CFG_ERR            BIT(0)
+#define ICE_AQ_LINK_ACT_PORT_OPT_INVAL BIT(2)
+#define ICE_AQ_LINK_FEAT_ID_OR_CONFIG_ID_INVAL BIT(3)
+#define ICE_AQ_LINK_TOPO_CRITICAL_SDP_ERR      BIT(4)
+#define ICE_AQ_LINK_MODULE_POWER_UNSUPPORTED   BIT(5)
        u8 link_info;
 #define ICE_AQ_LINK_UP                 BIT(0)  /* Link Status */
 #define ICE_AQ_LINK_FAULT              BIT(1)
@@ -1575,7 +1494,12 @@ struct ice_aqc_get_link_status_data {
 #define ICE_AQ_LINK_TX_ACTIVE          0
 #define ICE_AQ_LINK_TX_DRAINED         1
 #define ICE_AQ_LINK_TX_FLUSHED         3
-       u8 reserved2;
+       u8 lb_status;
+#define ICE_AQ_LINK_LB_PHY_LCL         BIT(0)
+#define ICE_AQ_LINK_LB_PHY_RMT         BIT(1)
+#define ICE_AQ_LINK_LB_MAC_LCL         BIT(2)
+#define ICE_AQ_LINK_LB_PHY_IDX_S       3
+#define ICE_AQ_LINK_LB_PHY_IDX_M       (0x7 << ICE_AQ_LB_PHY_IDX_S)
        __le16 max_frame_size;
        u8 cfg;
 #define ICE_AQ_LINK_25G_KR_FEC_EN      BIT(0)
@@ -1590,7 +1514,7 @@ struct ice_aqc_get_link_status_data {
 #define ICE_AQ_CFG_PACING_TYPE_FIXED   ICE_AQ_CFG_PACING_TYPE_M
        /* External Device Power Ability */
        u8 power_desc;
-#define ICE_AQ_PWR_CLASS_M             0x3
+#define ICE_AQ_PWR_CLASS_M             0x3F
 #define ICE_AQ_LINK_PWR_BASET_LOW_HIGH 0
 #define ICE_AQ_LINK_PWR_BASET_HIGH     1
 #define ICE_AQ_LINK_PWR_QSFP_CLASS_1   0
@@ -1598,6 +1522,7 @@ struct ice_aqc_get_link_status_data {
 #define ICE_AQ_LINK_PWR_QSFP_CLASS_3   2
 #define ICE_AQ_LINK_PWR_QSFP_CLASS_4   3
        __le16 link_speed;
+#define ICE_AQ_LINK_SPEED_M            0x7FF
 #define ICE_AQ_LINK_SPEED_10MB         BIT(0)
 #define ICE_AQ_LINK_SPEED_100MB                BIT(1)
 #define ICE_AQ_LINK_SPEED_1000MB       BIT(2)
@@ -1615,7 +1540,6 @@ struct ice_aqc_get_link_status_data {
        __le64 phy_type_high; /* Use values from ICE_PHY_TYPE_HIGH_* */
 };
 
-
 /* Set event mask command (direct 0x0613) */
 struct ice_aqc_set_event_mask {
        u8      lport_num;
@@ -1630,11 +1554,11 @@ struct ice_aqc_set_event_mask {
 #define ICE_AQ_LINK_EVENT_AN_COMPLETED         BIT(7)
 #define ICE_AQ_LINK_EVENT_MODULE_QUAL_FAIL     BIT(8)
 #define ICE_AQ_LINK_EVENT_PORT_TX_SUSPENDED    BIT(9)
+#define ICE_AQ_LINK_EVENT_TOPO_CONFLICT                BIT(10)
+#define ICE_AQ_LINK_EVENT_MEDIA_CONFLICT       BIT(11)
        u8      reserved1[6];
 };
 
-
-
 /* Set MAC Loopback command (direct 0x0620) */
 struct ice_aqc_set_mac_lb {
        u8 lb_mode;
@@ -1643,9 +1567,56 @@ struct ice_aqc_set_mac_lb {
        u8 reserved[15];
 };
 
-
-
-
+struct ice_aqc_link_topo_addr {
+       u8 lport_num;
+       u8 lport_num_valid;
+#define ICE_AQC_LINK_TOPO_PORT_NUM_VALID       BIT(0)
+       u8 node_type_ctx;
+#define ICE_AQC_LINK_TOPO_NODE_TYPE_S          0
+#define ICE_AQC_LINK_TOPO_NODE_TYPE_M  (0xF << ICE_AQC_LINK_TOPO_NODE_TYPE_S)
+#define ICE_AQC_LINK_TOPO_NODE_TYPE_PHY                0
+#define ICE_AQC_LINK_TOPO_NODE_TYPE_GPIO_CTRL  1
+#define ICE_AQC_LINK_TOPO_NODE_TYPE_MUX_CTRL   2
+#define ICE_AQC_LINK_TOPO_NODE_TYPE_LED_CTRL   3
+#define ICE_AQC_LINK_TOPO_NODE_TYPE_LED                4
+#define ICE_AQC_LINK_TOPO_NODE_TYPE_THERMAL    5
+#define ICE_AQC_LINK_TOPO_NODE_TYPE_CAGE       6
+#define ICE_AQC_LINK_TOPO_NODE_TYPE_MEZZ       7
+#define ICE_AQC_LINK_TOPO_NODE_TYPE_ID_EEPROM  8
+#define ICE_AQC_LINK_TOPO_NODE_CTX_S           4
+#define ICE_AQC_LINK_TOPO_NODE_CTX_M           \
+                               (0xF << ICE_AQC_LINK_TOPO_NODE_CTX_S)
+#define ICE_AQC_LINK_TOPO_NODE_CTX_GLOBAL      0
+#define ICE_AQC_LINK_TOPO_NODE_CTX_BOARD       1
+#define ICE_AQC_LINK_TOPO_NODE_CTX_PORT                2
+#define ICE_AQC_LINK_TOPO_NODE_CTX_NODE                3
+#define ICE_AQC_LINK_TOPO_NODE_CTX_PROVIDED    4
+#define ICE_AQC_LINK_TOPO_NODE_CTX_OVERRIDE    5
+       u8 index;
+       __le16 handle;
+#define ICE_AQC_LINK_TOPO_HANDLE_S     0
+#define ICE_AQC_LINK_TOPO_HANDLE_M     (0x3FF << ICE_AQC_LINK_TOPO_HANDLE_S)
+/* Used to decode the handle field */
+#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_M    BIT(9)
+#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_LOM  BIT(9)
+#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_MEZZ 0
+#define ICE_AQC_LINK_TOPO_HANDLE_NODE_S                0
+/* In case of a Mezzanine type */
+#define ICE_AQC_LINK_TOPO_HANDLE_MEZZ_NODE_M   \
+                               (0x3F << ICE_AQC_LINK_TOPO_HANDLE_NODE_S)
+#define ICE_AQC_LINK_TOPO_HANDLE_MEZZ_S        6
+#define ICE_AQC_LINK_TOPO_HANDLE_MEZZ_M        (0x7 << ICE_AQC_LINK_TOPO_HANDLE_MEZZ_S)
+/* In case of a LOM type */
+#define ICE_AQC_LINK_TOPO_HANDLE_LOM_NODE_M    \
+                               (0x1FF << ICE_AQC_LINK_TOPO_HANDLE_NODE_S)
+};
+
+/* Get Link Topology Handle (direct, 0x06E0) */
+struct ice_aqc_get_link_topo {
+       struct ice_aqc_link_topo_addr addr;
+       u8 node_part_num;
+       u8 rsvd[9];
+};
 
 /* Set Port Identification LED (direct, 0x06E9) */
 struct ice_aqc_set_port_id_led {
@@ -1658,25 +1629,78 @@ struct ice_aqc_set_port_id_led {
        u8 rsvd[13];
 };
 
+/* Read/Write SFF EEPROM command (indirect 0x06EE) */
+struct ice_aqc_sff_eeprom {
+       u8 lport_num;
+       u8 lport_num_valid;
+#define ICE_AQC_SFF_PORT_NUM_VALID     BIT(0)
+       __le16 i2c_bus_addr;
+#define ICE_AQC_SFF_I2CBUS_7BIT_M      0x7F
+#define ICE_AQC_SFF_I2CBUS_10BIT_M     0x3FF
+#define ICE_AQC_SFF_I2CBUS_TYPE_M      BIT(10)
+#define ICE_AQC_SFF_I2CBUS_TYPE_7BIT   0
+#define ICE_AQC_SFF_I2CBUS_TYPE_10BIT  ICE_AQC_SFF_I2CBUS_TYPE_M
+#define ICE_AQC_SFF_SET_EEPROM_PAGE_S  11
+#define ICE_AQC_SFF_SET_EEPROM_PAGE_M  (0x3 << ICE_AQC_SFF_SET_EEPROM_PAGE_S)
+#define ICE_AQC_SFF_NO_PAGE_CHANGE     0
+#define ICE_AQC_SFF_SET_23_ON_MISMATCH 1
+#define ICE_AQC_SFF_SET_22_ON_MISMATCH 2
+#define ICE_AQC_SFF_IS_WRITE           BIT(15)
+       __le16 i2c_mem_addr;
+       __le16 eeprom_page;
+#define  ICE_AQC_SFF_EEPROM_BANK_S 0
+#define  ICE_AQC_SFF_EEPROM_BANK_M (0xFF << ICE_AQC_SFF_EEPROM_BANK_S)
+#define  ICE_AQC_SFF_EEPROM_PAGE_S 8
+#define  ICE_AQC_SFF_EEPROM_PAGE_M (0xFF << ICE_AQC_SFF_EEPROM_PAGE_S)
+       __le32 addr_high;
+       __le32 addr_low;
+};
 
+/* SW Set GPIO command (indirect 0x6EF)
+ * SW Get GPIO command (indirect 0x6F0)
+ */
+struct ice_aqc_sw_gpio {
+       __le16 gpio_ctrl_handle;
+#define ICE_AQC_SW_GPIO_CONTROLLER_HANDLE_S    0
+#define ICE_AQC_SW_GPIO_CONTROLLER_HANDLE_M    (0x3FF << ICE_AQC_SW_GPIO_CONTROLLER_HANDLE_S)
+       u8 gpio_num;
+#define ICE_AQC_SW_GPIO_NUMBER_S       0
+#define ICE_AQC_SW_GPIO_NUMBER_M       (0x1F << ICE_AQC_SW_GPIO_NUMBER_S)
+       u8 gpio_params;
+#define ICE_AQC_SW_GPIO_PARAMS_DIRECTION    BIT(1)
+#define ICE_AQC_SW_GPIO_PARAMS_VALUE        BIT(0)
+       u8 rsvd[12];
+};
 
 /* NVM Read command (indirect 0x0701)
  * NVM Erase commands (direct 0x0702)
- * NVM Update commands (indirect 0x0703)
+ * NVM Write commands (indirect 0x0703)
+ * NVM Write Activate commands (direct 0x0707)
+ * NVM Shadow RAM Dump commands (direct 0x0707)
  */
 struct ice_aqc_nvm {
+#define ICE_AQC_NVM_MAX_OFFSET         0xFFFFFF
        __le16 offset_low;
-       u8 offset_high;
+       u8 offset_high; /* For Write Activate offset_high is used as flags2 */
        u8 cmd_flags;
 #define ICE_AQC_NVM_LAST_CMD           BIT(0)
-#define ICE_AQC_NVM_PCIR_REQ           BIT(0)  /* Used by NVM Update reply */
-#define ICE_AQC_NVM_PRESERVATION_S     1
+#define ICE_AQC_NVM_PCIR_REQ           BIT(0)  /* Used by NVM Write reply */
+#define ICE_AQC_NVM_PRESERVATION_S     1 /* Used by NVM Write Activate only */
 #define ICE_AQC_NVM_PRESERVATION_M     (3 << ICE_AQC_NVM_PRESERVATION_S)
 #define ICE_AQC_NVM_NO_PRESERVATION    (0 << ICE_AQC_NVM_PRESERVATION_S)
 #define ICE_AQC_NVM_PRESERVE_ALL       BIT(1)
 #define ICE_AQC_NVM_FACTORY_DEFAULT    (2 << ICE_AQC_NVM_PRESERVATION_S)
 #define ICE_AQC_NVM_PRESERVE_SELECTED  (3 << ICE_AQC_NVM_PRESERVATION_S)
+#define ICE_AQC_NVM_ACTIV_SEL_NVM      BIT(3) /* Write Activate/SR Dump only */
+#define ICE_AQC_NVM_ACTIV_SEL_OROM     BIT(4)
+#define ICE_AQC_NVM_ACTIV_SEL_NETLIST  BIT(5)
+#define ICE_AQC_NVM_SPECIAL_UPDATE     BIT(6)
+#define ICE_AQC_NVM_REVERT_LAST_ACTIV  BIT(6) /* Write Activate only */
+#define ICE_AQC_NVM_ACTIV_SEL_MASK     MAKEMASK(0x7, 3)
 #define ICE_AQC_NVM_FLASH_ONLY         BIT(7)
+#define ICE_AQC_NVM_POR_FLAG   0       /* Used by NVM Write completion on ARQ */
+#define ICE_AQC_NVM_PERST_FLAG 1
+#define ICE_AQC_NVM_EMPR_FLAG  2
        __le16 module_typeid;
        __le16 length;
 #define ICE_AQC_NVM_ERASE_LEN  0xFFFF
@@ -1684,6 +1708,27 @@ struct ice_aqc_nvm {
        __le32 addr_low;
 };
 
+/* NVM Module_Type ID, needed offset and read_len for struct ice_aqc_nvm. */
+#define ICE_AQC_NVM_SECTOR_UNIT                        4096 /* In Bytes */
+#define ICE_AQC_NVM_WORD_UNIT                  2 /* In Bytes */
+
+#define ICE_AQC_NVM_START_POINT                        0
+#define ICE_AQC_NVM_EMP_SR_PTR_OFFSET          0x90
+#define ICE_AQC_NVM_EMP_SR_PTR_RD_LEN          2 /* In Bytes */
+#define ICE_AQC_NVM_EMP_SR_PTR_M               MAKEMASK(0x7FFF, 0)
+#define ICE_AQC_NVM_EMP_SR_PTR_TYPE_S          15
+#define ICE_AQC_NVM_EMP_SR_PTR_TYPE_M          BIT(15)
+#define ICE_AQC_NVM_EMP_SR_PTR_TYPE_SECTOR     1
+
+#define ICE_AQC_NVM_LLDP_CFG_PTR_OFFSET                0x46
+#define ICE_AQC_NVM_LLDP_CFG_HEADER_LEN                2 /* In Bytes */
+#define ICE_AQC_NVM_LLDP_CFG_PTR_RD_LEN                2 /* In Bytes */
+
+#define ICE_AQC_NVM_LLDP_PRESERVED_MOD_ID      0x129
+#define ICE_AQC_NVM_CUR_LLDP_PERSIST_RD_OFFSET 2 /* In Bytes */
+#define ICE_AQC_NVM_LLDP_STATUS_M              MAKEMASK(0xF, 0)
+#define ICE_AQC_NVM_LLDP_STATUS_M_LEN          4 /* In Bits */
+#define ICE_AQC_NVM_LLDP_STATUS_RD_LEN         4 /* In Bytes */
 
 /* Used for 0x0704 as well as for 0x0705 commands */
 struct ice_aqc_nvm_cfg {
@@ -1699,14 +1744,12 @@ struct ice_aqc_nvm_cfg {
        __le32 addr_low;
 };
 
-
 struct ice_aqc_nvm_cfg_data {
        __le16 field_id;
        __le16 field_options;
        __le16 field_value;
 };
 
-
 /* NVM Checksum Command (direct, 0x0706) */
 struct ice_aqc_nvm_checksum {
        u8 flags;
@@ -1718,9 +1761,6 @@ struct ice_aqc_nvm_checksum {
        u8 rsvd2[12];
 };
 
-
-
-
 /* Get LLDP MIB (indirect 0x0A00)
  * Note: This is also used by the LLDP MIB Change Event (0x0A01)
  * as the format is the same.
@@ -1872,6 +1912,17 @@ struct ice_aqc_lldp_stop_start_specific_agent {
        u8 reserved[15];
 };
 
+/* LLDP Filter Control (direct 0x0A0A) */
+struct ice_aqc_lldp_filter_ctrl {
+       u8 cmd_flags;
+#define ICE_AQC_LLDP_FILTER_ACTION_M           MAKEMASK(3, 0)
+#define ICE_AQC_LLDP_FILTER_ACTION_ADD         0x0
+#define ICE_AQC_LLDP_FILTER_ACTION_DELETE      0x1
+#define ICE_AQC_LLDP_FILTER_ACTION_UPDATE      0x2
+       u8 reserved1;
+       __le16 vsi_num;
+       u8 reserved2[12];
+};
 
 /* Get/Set RSS key (indirect 0x0B04/0x0B02) */
 struct ice_aqc_get_set_rss_key {
@@ -1884,7 +1935,6 @@ struct ice_aqc_get_set_rss_key {
        __le32 addr_low;
 };
 
-
 #define ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE      0x28
 #define ICE_AQC_GET_SET_RSS_KEY_DATA_HASH_KEY_SIZE     0xC
 #define ICE_GET_SET_RSS_KEY_EXTEND_KEY_SIZE \
@@ -1906,12 +1956,11 @@ struct ice_aqc_get_set_rss_keys {
        u8 extended_hash_key[ICE_AQC_GET_SET_RSS_KEY_DATA_HASH_KEY_SIZE];
 };
 
-
 /* Get/Set RSS LUT (indirect 0x0B05/0x0B03) */
 struct ice_aqc_get_set_rss_lut {
 #define ICE_AQC_GSET_RSS_LUT_VSI_VALID BIT(15)
 #define ICE_AQC_GSET_RSS_LUT_VSI_ID_S  0
-#define ICE_AQC_GSET_RSS_LUT_VSI_ID_M  (0x1FF << ICE_AQC_GSET_RSS_LUT_VSI_ID_S)
+#define ICE_AQC_GSET_RSS_LUT_VSI_ID_M  (0x3FF << ICE_AQC_GSET_RSS_LUT_VSI_ID_S)
        __le16 vsi_id;
 #define ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_S      0
 #define ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_M      \
@@ -1942,7 +1991,6 @@ struct ice_aqc_get_set_rss_lut {
        __le32 addr_low;
 };
 
-
 /* Clear FD Table Command (direct, 0x0B06) */
 struct ice_aqc_clear_fd_table {
        u8 clear_type;
@@ -1953,8 +2001,421 @@ struct ice_aqc_clear_fd_table {
        u8 reserved[12];
 };
 
+/* Allocate ACL table (indirect 0x0C10) */
+#define ICE_AQC_ACL_KEY_WIDTH          40
+#define ICE_AQC_ACL_KEY_WIDTH_BYTES    5
+#define ICE_AQC_ACL_TCAM_DEPTH         512
+#define ICE_ACL_ENTRY_ALLOC_UNIT       64
+#define ICE_AQC_MAX_CONCURRENT_ACL_TBL 15
+#define ICE_AQC_MAX_ACTION_MEMORIES    20
+#define ICE_AQC_MAX_ACTION_ENTRIES     512
+#define ICE_AQC_ACL_SLICES             16
+#define ICE_AQC_ALLOC_ID_LESS_THAN_4K  0x1000
+/* The ACL block supports up to 8 actions per a single output. */
+#define ICE_AQC_TBL_MAX_ACTION_PAIRS   4
+
+#define ICE_AQC_MAX_TCAM_ALLOC_UNITS   (ICE_AQC_ACL_TCAM_DEPTH / \
+                                        ICE_ACL_ENTRY_ALLOC_UNIT)
+#define ICE_AQC_ACL_ALLOC_UNITS                (ICE_AQC_ACL_SLICES * \
+                                        ICE_AQC_MAX_TCAM_ALLOC_UNITS)
+
+struct ice_aqc_acl_alloc_table {
+       __le16 table_width;
+       __le16 table_depth;
+       u8 act_pairs_per_entry;
+       /* For non-concurrent table allocation, this field needs
+        * to be set to zero(0) otherwise it shall specify the
+        * amount of concurrent tables whose AllocIDs are
+        * specified in buffer. Thus the newly allocated table
+        * is concurrent with table IDs specified in AllocIDs.
+        */
+#define ICE_AQC_ACL_ALLOC_TABLE_TYPE_NONCONCURR        0
+       u8 table_type;
+       __le16 reserved;
+       __le32 addr_high;
+       __le32 addr_low;
+};
+
+/* Allocate ACL table command buffer format */
+struct ice_aqc_acl_alloc_table_data {
+       /* Dependent table AllocIDs. Each word in this 15 word array specifies
+        * a dependent table AllocID according to the amount specified in the
+        * "table_type" field. All unused words shall be set to 0xFFFF
+        */
+#define ICE_AQC_CONCURR_ID_INVALID     0xffff
+       __le16 alloc_ids[ICE_AQC_MAX_CONCURRENT_ACL_TBL];
+};
+
+/* Deallocate ACL table (indirect 0x0C11)
+ * Allocate ACL action-pair (indirect 0x0C12)
+ * Deallocate ACL action-pair (indirect 0x0C13)
+ */
+
+/* Following structure is common and used in case of deallocation
+ * of ACL table and action-pair
+ */
+struct ice_aqc_acl_tbl_actpair {
+       /* Alloc ID of the table being released */
+       __le16 alloc_id;
+       u8 reserved[6];
+       __le32 addr_high;
+       __le32 addr_low;
+};
+
+/* This response structure is same in case of alloc/dealloc table,
+ * alloc/dealloc action-pair
+ */
+struct ice_aqc_acl_generic {
+       /* if alloc_id is below 0x1000 then alllocation failed due to
+        * unavailable resources, else this is set by FW to identify
+        * table allocation
+        */
+       __le16 alloc_id;
+
+       union {
+               /* to be used only in case of alloc/dealloc table */
+               struct {
+                       /* Index of the first TCAM block, otherwise set to 0xFF
+                        * for a failed allocation
+                        */
+                       u8 first_tcam;
+                       /* Index of the last TCAM block. This index shall be
+                        * set to the value of first_tcam for single TCAM block
+                        * allocation, otherwise set to 0xFF for a failed
+                        * allocation
+                        */
+                       u8 last_tcam;
+               } table;
+               /* reserved in case of alloc/dealloc action-pair */
+               struct {
+                       __le16 reserved;
+               } act_pair;
+       } ops;
+
+       /* index of first entry (in both TCAM and action memories),
+        * otherwise set to 0xFF for a failed allocation
+        */
+       __le16 first_entry;
+       /* index of last entry (in both TCAM and action memories),
+        * otherwise set to 0xFF for a failed allocation
+        */
+       __le16 last_entry;
+
+       /* Each act_mem element specifies the order of the memory
+        * otherwise 0xFF
+        */
+       u8 act_mem[ICE_AQC_MAX_ACTION_MEMORIES];
+};
+
+/* Allocate ACL scenario (indirect 0x0C14). This command doesn't have separate
+ * response buffer since original command buffer gets updated with
+ * 'scen_id' in case of success
+ */
+struct ice_aqc_acl_alloc_scen {
+       union {
+               struct {
+                       u8 reserved[8];
+               } cmd;
+               struct {
+                       __le16 scen_id;
+                       u8 reserved[6];
+               } resp;
+       } ops;
+       __le32 addr_high;
+       __le32 addr_low;
+};
+
+/* De-allocate ACL scenario (direct 0x0C15). This command doesn't need
+ * separate response buffer since nothing to be returned as a response
+ * except status.
+ */
+struct ice_aqc_acl_dealloc_scen {
+       __le16 scen_id;
+       u8 reserved[14];
+};
+
+/* Update ACL scenario (direct 0x0C1B)
+ * Query ACL scenario (direct 0x0C23)
+ */
+struct ice_aqc_acl_update_query_scen {
+       __le16 scen_id;
+       u8 reserved[6];
+       __le32 addr_high;
+       __le32 addr_low;
+};
+
+/* Input buffer format in case allocate/update ACL scenario and same format
+ * is used for response buffer in case of query ACL scenario.
+ * NOTE: de-allocate ACL scenario is direct command and doesn't require
+ * "buffer", hence no buffer format.
+ */
+struct ice_aqc_acl_scen {
+       struct {
+               /* Byte [x] selection for the TCAM key. This value must be
+                * set to 0x0 for unusued TCAM.
+                * Only Bit 6..0 is used in each byte and MSB is reserved
+                */
+#define ICE_AQC_ACL_ALLOC_SCE_SELECT_M         0x7F
+#define ICE_AQC_ACL_BYTE_SEL_BASE              0x20
+#define ICE_AQC_ACL_BYTE_SEL_BASE_PID          0x3E
+#define ICE_AQC_ACL_BYTE_SEL_BASE_PKT_DIR      ICE_AQC_ACL_BYTE_SEL_BASE
+#define ICE_AQC_ACL_BYTE_SEL_BASE_RNG_CHK      0x3F
+               u8 tcam_select[5];
+               /* TCAM Block entry masking. This value should be set to 0x0 for
+                * unused TCAM
+                */
+               u8 chnk_msk;
+               /* Bit 0 : masks TCAM entries 0-63
+                * Bit 1 : masks TCAM entries 64-127
+                * Bit 2 to 7 : follow the pattern of bit 0 and 1
+                */
+#define ICE_AQC_ACL_ALLOC_SCE_START_CMP                BIT(0)
+#define ICE_AQC_ACL_ALLOC_SCE_START_SET                BIT(1)
+               u8 start_cmp_set;
+
+       } tcam_cfg[ICE_AQC_ACL_SLICES];
+
+       /* Each byte, Bit 6..0: Action memory association to a TCAM block,
+        * otherwise it shall be set to 0x0 for disabled memory action.
+        * Bit 7 : Action memory enable for this scenario
+        */
+#define ICE_AQC_ACL_SCE_ACT_MEM_TCAM_ASSOC_M   0x7F
+#define ICE_AQC_ACL_SCE_ACT_MEM_EN             BIT(7)
+       u8 act_mem_cfg[ICE_AQC_MAX_ACTION_MEMORIES];
+};
+
+/* Allocate ACL counters (indirect 0x0C16) */
+struct ice_aqc_acl_alloc_counters {
+       /* Amount of contiguous counters requested. Min value is 1 and
+        * max value is 255
+        */
+#define ICE_AQC_ACL_ALLOC_CNT_MIN_AMT  0x1
+#define ICE_AQC_ACL_ALLOC_CNT_MAX_AMT  0xFF
+       u8 counter_amount;
+
+       /* Counter type: 'single counter' which can be configured to count
+        * either bytes or packets
+        */
+#define ICE_AQC_ACL_CNT_TYPE_SINGLE    0x0
+
+       /* Counter type: 'counter pair' which counts number of bytes and number
+        * of packets.
+        */
+#define ICE_AQC_ACL_CNT_TYPE_DUAL      0x1
+       /* requested counter type, single/dual */
+       u8 counters_type;
+
+       /* counter bank allocation shall be 0-3 for 'byte or packet counter' */
+#define ICE_AQC_ACL_MAX_CNT_SINGLE     0x3
+/* counter bank allocation shall be 0-1 for 'byte and packet counter dual' */
+#define ICE_AQC_ACL_MAX_CNT_DUAL       0x1
+       /* requested counter bank allocation */
+       u8 bank_alloc;
+
+       u8 reserved;
+
+       union {
+               /* Applicable only in case of command */
+               struct {
+                       u8 reserved[12];
+               } cmd;
+               /* Applicable only in case of response */
+#define ICE_AQC_ACL_ALLOC_CNT_INVAL    0xFFFF
+               struct {
+                       /* Index of first allocated counter. 0xFFFF in case
+                        * of unsuccessful allocation
+                        */
+                       __le16 first_counter;
+                       /* Index of last allocated counter. 0xFFFF in case
+                        * of unsuccessful allocation
+                        */
+                       __le16 last_counter;
+                       u8 rsvd[8];
+               } resp;
+       } ops;
+};
+
+/* De-allocate ACL counters (direct 0x0C17) */
+struct ice_aqc_acl_dealloc_counters {
+       /* first counter being released */
+       __le16 first_counter;
+       /* last counter being released */
+       __le16 last_counter;
+       /* requested counter type, single/dual */
+       u8 counters_type;
+       /* requested counter bank allocation */
+       u8 bank_alloc;
+       u8 reserved[10];
+};
+
+/* De-allocate ACL resources (direct 0x0C1A). Used by SW to release all the
+ * resources allocated for it using a single command
+ */
+struct ice_aqc_acl_dealloc_res {
+       u8 reserved[16];
+};
+
+/* Program ACL actionpair (indirect 0x0C1C)
+ * Query ACL actionpair (indirect 0x0C25)
+ */
+struct ice_aqc_acl_actpair {
+       /* action mem index to program/update */
+       u8 act_mem_index;
+       u8 reserved;
+       /* The entry index in action memory to be programmed/updated */
+       __le16 act_entry_index;
+       __le32 reserved2;
+       __le32 addr_high;
+       __le32 addr_low;
+};
 
+/* Input buffer format for program/query action-pair admin command */
+struct ice_acl_act_entry {
+       /* Action priority, values must be between 0..7 */
+#define ICE_AQC_ACT_PRIO_VALID_MAX     7
+#define ICE_AQC_ACT_PRIO_MSK           MAKEMASK(0xff, 0)
+       u8 prio;
+       /* Action meta-data identifier. This field should be set to 0x0
+        * for a NOP action
+        */
+#define ICE_AQC_ACT_MDID_S             8
+#define ICE_AQC_ACT_MDID_MSK           MAKEMASK(0xff00, ICE_AQC_ACT_MDID_S)
+       u8 mdid;
+       /* Action value */
+#define ICE_AQC_ACT_VALUE_S            16
+#define ICE_AQC_ACT_VALUE_MSK          MAKEMASK(0xffff0000, 16)
+       __le16 value;
+};
 
+#define ICE_ACL_NUM_ACT_PER_ACT_PAIR 2
+struct ice_aqc_actpair {
+       struct ice_acl_act_entry act[ICE_ACL_NUM_ACT_PER_ACT_PAIR];
+};
+
+/* Generic format used to describe either input or response buffer
+ * for admin commands related to ACL profile
+ */
+struct ice_aqc_acl_prof_generic_frmt {
+       /* The first byte of the byte selection base is reserved to keep the
+        * first byte of the field vector where the packet direction info is
+        * available. Thus we should start at index 1 of the field vector to
+        * map its entries to the byte selection base.
+        */
+#define ICE_AQC_ACL_PROF_BYTE_SEL_START_IDX    1
+       /* In each byte:
+        * Bit 0..5 = Byte selection for the byte selection base from the
+        * extracted fields (expressed as byte offset in extracted fields).
+        * Applicable values are 0..63
+        * Bit 6..7 = Reserved
+        */
+#define ICE_AQC_ACL_PROF_BYTE_SEL_ELEMS                30
+       u8 byte_selection[ICE_AQC_ACL_PROF_BYTE_SEL_ELEMS];
+       /* In each byte:
+        * Bit 0..4 = Word selection for the word selection base from the
+        * extracted fields (expressed as word offset in extracted fields).
+        * Applicable values are 0..31
+        * Bit 5..7 = Reserved
+        */
+#define ICE_AQC_ACL_PROF_WORD_SEL_ELEMS                32
+       u8 word_selection[ICE_AQC_ACL_PROF_WORD_SEL_ELEMS];
+       /* In each byte:
+        * Bit 0..3 = Double word selection for the double-word selection base
+        * from the extracted fields (expressed as double-word offset in
+        * extracted fields).
+        * Applicable values are 0..15
+        * Bit 4..7 = Reserved
+        */
+#define ICE_AQC_ACL_PROF_DWORD_SEL_ELEMS       15
+       u8 dword_selection[ICE_AQC_ACL_PROF_DWORD_SEL_ELEMS];
+       /* Scenario numbers for individual Physical Function's */
+#define ICE_AQC_ACL_PROF_PF_SCEN_NUM_ELEMS     8
+       u8 pf_scenario_num[ICE_AQC_ACL_PROF_PF_SCEN_NUM_ELEMS];
+};
+
+/* Program ACL profile extraction (indirect 0x0C1D)
+ * Program ACL profile ranges (indirect 0x0C1E)
+ * Query ACL profile (indirect 0x0C21)
+ * Query ACL profile ranges (indirect 0x0C22)
+ */
+struct ice_aqc_acl_profile {
+       u8 profile_id; /* Programmed/Updated profile ID */
+       u8 reserved[7];
+       __le32 addr_high;
+       __le32 addr_low;
+};
+
+/* Input buffer format for program profile extraction admin command and
+ * response buffer format for query profile admin command is as defined
+ * in struct ice_aqc_acl_prof_generic_frmt
+ */
+
+/* Input buffer format for program profile ranges and query profile ranges
+ * admin commands. Same format is used for response buffer in case of query
+ * profile ranges command
+ */
+struct ice_acl_rng_data {
+       /* The range checker output shall be sent when the value
+        * related to this range checker is lower than low boundary
+        */
+       __be16 low_boundary;
+       /* The range checker output shall be sent when the value
+        * related to this range checker is higher than high boundary
+        */
+       __be16 high_boundary;
+       /* A value of '0' in bit shall clear the relevant bit input
+        * to the range checker
+        */
+       __be16 mask;
+};
+
+struct ice_aqc_acl_profile_ranges {
+#define ICE_AQC_ACL_PROF_RANGES_NUM_CFG 8
+       struct ice_acl_rng_data checker_cfg[ICE_AQC_ACL_PROF_RANGES_NUM_CFG];
+};
+
+/* Program ACL entry (indirect 0x0C20)
+ * Query ACL entry (indirect 0x0C24)
+ */
+struct ice_aqc_acl_entry {
+       u8 tcam_index; /* Updated TCAM block index */
+       u8 reserved;
+       __le16 entry_index; /* Updated entry index */
+       __le32 reserved2;
+       __le32 addr_high;
+       __le32 addr_low;
+};
+
+/* Input buffer format in case of program ACL entry and response buffer format
+ * in case of query ACL entry
+ */
+struct ice_aqc_acl_data {
+       /* Entry key and entry key invert are 40 bits wide.
+        * Byte 0..4 : entry key and Byte 5..7 are reserved
+        * Byte 8..12: entry key invert and Byte 13..15 are reserved
+        */
+       struct {
+               u8 val[5];
+               u8 reserved[3];
+       } entry_key, entry_key_invert;
+};
+
+/* Query ACL counter (direct 0x0C27) */
+struct ice_aqc_acl_query_counter {
+       /* Queried counter index */
+       __le16 counter_index;
+       /* Queried counter bank */
+       u8 counter_bank;
+       union {
+               struct {
+                       u8 reserved[13];
+               } cmd;
+               struct {
+                       /* Holds counter value/packet counter value */
+                       u8 val[5];
+                       u8 reserved[8];
+               } resp;
+       } ops;
+};
 
 /* Add Tx LAN Queues (indirect 0x0C30) */
 struct ice_aqc_add_txqs {
@@ -1965,7 +2426,6 @@ struct ice_aqc_add_txqs {
        __le32 addr_low;
 };
 
-
 /* This is the descriptor of each queue entry for the Add Tx LAN Queues
  * command (0x0C30). Only used within struct ice_aqc_add_tx_qgrp.
  */
@@ -1978,7 +2438,6 @@ struct ice_aqc_add_txqs_perq {
        struct ice_aqc_txsched_elem info;
 };
 
-
 /* The format of the command buffer for Add Tx LAN Queues (0x0C30)
  * is an array of the following structs. Please note that the length of
  * each struct ice_aqc_add_tx_qgrp is variable due
@@ -1988,10 +2447,9 @@ struct ice_aqc_add_tx_qgrp {
        __le32 parent_teid;
        u8 num_txqs;
        u8 rsvd[3];
-       struct ice_aqc_add_txqs_perq txqs[1];
+       struct ice_aqc_add_txqs_perq txqs[STRUCT_HACK_VAR_LEN];
 };
 
-
 /* Disable Tx LAN Queues (indirect 0x0C31) */
 struct ice_aqc_dis_txqs {
        u8 cmd_type;
@@ -2014,7 +2472,6 @@ struct ice_aqc_dis_txqs {
        __le32 addr_low;
 };
 
-
 /* The buffer for Disable Tx LAN Queues (indirect 0x0C31)
  * contains the following structures, arrayed one after the
  * other.
@@ -2023,25 +2480,21 @@ struct ice_aqc_dis_txqs {
  * added before the start of the next group, to allow correct
  * alignment of the parent_teid field.
  */
+#pragma pack(1)
 struct ice_aqc_dis_txq_item {
        __le32 parent_teid;
        u8 num_qs;
        u8 rsvd;
        /* The length of the q_id array varies according to num_qs */
-       __le16 q_id[1];
-       /* This only applies from F8 onward */
 #define ICE_AQC_Q_DIS_BUF_ELEM_TYPE_S          15
 #define ICE_AQC_Q_DIS_BUF_ELEM_TYPE_LAN_Q      \
                        (0 << ICE_AQC_Q_DIS_BUF_ELEM_TYPE_S)
 #define ICE_AQC_Q_DIS_BUF_ELEM_TYPE_RDMA_QSET  \
                        (1 << ICE_AQC_Q_DIS_BUF_ELEM_TYPE_S)
+       __le16 q_id[STRUCT_HACK_VAR_LEN];
 };
 
-
-struct ice_aqc_dis_txq {
-       struct ice_aqc_dis_txq_item qgrps[1];
-};
-
+#pragma pack()
 
 /* Tx LAN Queues Cleanup Event (0x0C31) */
 struct ice_aqc_txqs_cleanup {
@@ -2050,7 +2503,6 @@ struct ice_aqc_txqs_cleanup {
        u8 reserved[12];
 };
 
-
 /* Move / Reconfigure Tx Queues (indirect 0x0C32) */
 struct ice_aqc_move_txqs {
        u8 cmd_type;
@@ -2071,10 +2523,7 @@ struct ice_aqc_move_txqs {
        __le32 addr_low;
 };
 
-
-/* This is the descriptor of each queue entry for the move Tx LAN Queues
- * command (0x0C32).
- */
+/* Per-queue data buffer for the Move Tx LAN Queues command/response */
 struct ice_aqc_move_txqs_elem {
        __le16 txq_id;
        u8 q_cgd;
@@ -2082,17 +2531,15 @@ struct ice_aqc_move_txqs_elem {
        __le32 q_teid;
 };
 
-
+/* Indirect data buffer for the Move Tx LAN Queues command/response */
 struct ice_aqc_move_txqs_data {
        __le32 src_teid;
        __le32 dest_teid;
-       struct ice_aqc_move_txqs_elem txqs[1];
+       struct ice_aqc_move_txqs_elem txqs[STRUCT_HACK_VAR_LEN];
 };
 
-
-
 /* Download Package (indirect 0x0C40) */
-/* Also used for Update Package (indirect 0x0C42) */
+/* Also used for Update Package (indirect 0x0C42 and 0x0C41) */
 struct ice_aqc_download_pkg {
        u8 flags;
 #define ICE_AQC_DOWNLOAD_PKG_LAST_BUF  0x01
@@ -2126,10 +2573,13 @@ struct ice_pkg_ver {
 };
 
 #define ICE_PKG_NAME_SIZE      32
+#define ICE_SEG_ID_SIZE        28
+#define ICE_SEG_NAME_SIZE      28
 
 struct ice_aqc_get_pkg_info {
        struct ice_pkg_ver ver;
-       char name[ICE_PKG_NAME_SIZE];
+       char name[ICE_SEG_NAME_SIZE];
+       __le32 track_id;
        u8 is_in_nvm;
        u8 is_active;
        u8 is_active_at_boot;
@@ -2139,11 +2589,22 @@ struct ice_aqc_get_pkg_info {
 /* Get Package Info List response buffer format (0x0C43) */
 struct ice_aqc_get_pkg_info_resp {
        __le32 count;
-       struct ice_aqc_get_pkg_info pkg_info[1];
+       struct ice_aqc_get_pkg_info pkg_info[STRUCT_HACK_VAR_LEN];
 };
 
-
-
+/* Driver Shared Parameters (direct, 0x0C90) */
+struct ice_aqc_driver_shared_params {
+       u8 set_or_get_op;
+#define ICE_AQC_DRIVER_PARAM_OP_MASK           BIT(0)
+#define ICE_AQC_DRIVER_PARAM_SET               0
+#define ICE_AQC_DRIVER_PARAM_GET               1
+       u8 param_indx;
+#define ICE_AQC_DRIVER_PARAM_MAX_IDX           15
+       u8 rsvd[2];
+       __le32 param_val;
+       __le32 addr_high;
+       __le32 addr_low;
+};
 
 /* Lan Queue Overflow Event (direct, 0x1001) */
 struct ice_aqc_event_lan_overflow {
@@ -2152,98 +2613,87 @@ struct ice_aqc_event_lan_overflow {
        u8 reserved[8];
 };
 
+/* Set Health Status (direct 0xFF20) */
+struct ice_aqc_set_health_status_config {
+       u8 event_source;
+#define ICE_AQC_HEALTH_STATUS_SET_PF_SPECIFIC_MASK     BIT(0)
+#define ICE_AQC_HEALTH_STATUS_SET_ALL_PF_MASK          BIT(1)
+#define ICE_AQC_HEALTH_STATUS_SET_GLOBAL_MASK          BIT(2)
+       u8 reserved[15];
+};
 
-
-/* Configure Firmware Logging Command (indirect 0xFF09)
- * Logging Information Read Response (indirect 0xFF10)
- * Note: The 0xFF10 command has no input parameters.
- */
-struct ice_aqc_fw_logging {
-       u8 log_ctrl;
-#define ICE_AQC_FW_LOG_AQ_EN           BIT(0)
-#define ICE_AQC_FW_LOG_UART_EN         BIT(1)
-       u8 rsvd0;
-       u8 log_ctrl_valid; /* Not used by 0xFF10 Response */
-#define ICE_AQC_FW_LOG_AQ_VALID                BIT(0)
-#define ICE_AQC_FW_LOG_UART_VALID      BIT(1)
-       u8 rsvd1[5];
+#define ICE_AQC_HEALTH_STATUS_ERR_UNKNOWN_MOD_STRICT           0x101
+#define ICE_AQC_HEALTH_STATUS_ERR_MOD_TYPE                     0x102
+#define ICE_AQC_HEALTH_STATUS_ERR_MOD_QUAL                     0x103
+#define ICE_AQC_HEALTH_STATUS_ERR_MOD_COMM                     0x104
+#define ICE_AQC_HEALTH_STATUS_ERR_MOD_CONFLICT                 0x105
+#define ICE_AQC_HEALTH_STATUS_ERR_MOD_NOT_PRESENT              0x106
+#define ICE_AQC_HEALTH_STATUS_INFO_MOD_UNDERUTILIZED           0x107
+#define ICE_AQC_HEALTH_STATUS_ERR_UNKNOWN_MOD_LENIENT          0x108
+#define ICE_AQC_HEALTH_STATUS_ERR_INVALID_LINK_CFG             0x10B
+#define ICE_AQC_HEALTH_STATUS_ERR_PORT_ACCESS                  0x10C
+#define ICE_AQC_HEALTH_STATUS_ERR_PORT_UNREACHABLE             0x10D
+#define ICE_AQC_HEALTH_STATUS_INFO_PORT_SPEED_MOD_LIMITED      0x10F
+#define ICE_AQC_HEALTH_STATUS_ERR_PARALLEL_FAULT               0x110
+#define ICE_AQC_HEALTH_STATUS_INFO_PORT_SPEED_PHY_LIMITED      0x111
+#define ICE_AQC_HEALTH_STATUS_ERR_NETLIST_TOPO                 0x112
+#define ICE_AQC_HEALTH_STATUS_ERR_NETLIST                      0x113
+#define ICE_AQC_HEALTH_STATUS_ERR_TOPO_CONFLICT                        0x114
+#define ICE_AQC_HEALTH_STATUS_ERR_LINK_HW_ACCESS               0x115
+#define ICE_AQC_HEALTH_STATUS_ERR_LINK_RUNTIME                 0x116
+#define ICE_AQC_HEALTH_STATUS_ERR_DNL_INIT                     0x117
+#define ICE_AQC_HEALTH_STATUS_INFO_RECOVERY                    0x500
+#define ICE_AQC_HEALTH_STATUS_ERR_FLASH_ACCESS                 0x501
+#define ICE_AQC_HEALTH_STATUS_ERR_NVM_AUTH                     0x502
+#define ICE_AQC_HEALTH_STATUS_ERR_OROM_AUTH                    0x503
+#define ICE_AQC_HEALTH_STATUS_ERR_DDP_AUTH                     0x504
+#define ICE_AQC_HEALTH_STATUS_ERR_NVM_COMPAT                   0x505
+#define ICE_AQC_HEALTH_STATUS_ERR_OROM_COMPAT                  0x506
+#define ICE_AQC_HEALTH_STATUS_ERR_DCB_MIB                      0x509
+
+/* Get Health Status codes (indirect 0xFF21) */
+struct ice_aqc_get_supported_health_status_codes {
+       __le16 health_code_count;
+       u8 reserved[6];
        __le32 addr_high;
        __le32 addr_low;
 };
 
+/* Get Health Status (indirect 0xFF22) */
+struct ice_aqc_get_health_status {
+       __le16 health_status_count;
+       u8 reserved[6];
+       __le32 addr_high;
+       __le32 addr_low;
+};
 
-enum ice_aqc_fw_logging_mod {
-       ICE_AQC_FW_LOG_ID_GENERAL = 0,
-       ICE_AQC_FW_LOG_ID_CTRL,
-       ICE_AQC_FW_LOG_ID_LINK,
-       ICE_AQC_FW_LOG_ID_LINK_TOPO,
-       ICE_AQC_FW_LOG_ID_DNL,
-       ICE_AQC_FW_LOG_ID_I2C,
-       ICE_AQC_FW_LOG_ID_SDP,
-       ICE_AQC_FW_LOG_ID_MDIO,
-       ICE_AQC_FW_LOG_ID_ADMINQ,
-       ICE_AQC_FW_LOG_ID_HDMA,
-       ICE_AQC_FW_LOG_ID_LLDP,
-       ICE_AQC_FW_LOG_ID_DCBX,
-       ICE_AQC_FW_LOG_ID_DCB,
-       ICE_AQC_FW_LOG_ID_NETPROXY,
-       ICE_AQC_FW_LOG_ID_NVM,
-       ICE_AQC_FW_LOG_ID_AUTH,
-       ICE_AQC_FW_LOG_ID_VPD,
-       ICE_AQC_FW_LOG_ID_IOSF,
-       ICE_AQC_FW_LOG_ID_PARSER,
-       ICE_AQC_FW_LOG_ID_SW,
-       ICE_AQC_FW_LOG_ID_SCHEDULER,
-       ICE_AQC_FW_LOG_ID_TXQ,
-       ICE_AQC_FW_LOG_ID_RSVD,
-       ICE_AQC_FW_LOG_ID_POST,
-       ICE_AQC_FW_LOG_ID_WATCHDOG,
-       ICE_AQC_FW_LOG_ID_TASK_DISPATCH,
-       ICE_AQC_FW_LOG_ID_MNG,
-       ICE_AQC_FW_LOG_ID_SYNCE,
-       ICE_AQC_FW_LOG_ID_MAX,
-};
-
-/* This is the buffer for both of the logging commands.
- * The entry array size depends on the datalen parameter in the descriptor.
- * There will be a total of datalen / 2 entries.
+/* Get Health Status event buffer entry, (0xFF22)
+ * repeated per reported health status
  */
-struct ice_aqc_fw_logging_data {
-       __le16 entry[1];
-#define ICE_AQC_FW_LOG_ID_S            0
-#define ICE_AQC_FW_LOG_ID_M            (0xFFF << ICE_AQC_FW_LOG_ID_S)
-
-#define ICE_AQC_FW_LOG_CONF_SUCCESS    0       /* Used by response */
-#define ICE_AQC_FW_LOG_CONF_BAD_INDX   BIT(12) /* Used by response */
-
-#define ICE_AQC_FW_LOG_EN_S            12
-#define ICE_AQC_FW_LOG_EN_M            (0xF << ICE_AQC_FW_LOG_EN_S)
-#define ICE_AQC_FW_LOG_INFO_EN         BIT(12) /* Used by command */
-#define ICE_AQC_FW_LOG_INIT_EN         BIT(13) /* Used by command */
-#define ICE_AQC_FW_LOG_FLOW_EN         BIT(14) /* Used by command */
-#define ICE_AQC_FW_LOG_ERR_EN          BIT(15) /* Used by command */
+struct ice_aqc_health_status_elem {
+       __le16 health_status_code;
+       __le16 event_source;
+#define ICE_AQC_HEALTH_STATUS_PF                       (0x1)
+#define ICE_AQC_HEALTH_STATUS_PORT                     (0x2)
+#define ICE_AQC_HEALTH_STATUS_GLOBAL                   (0x3)
+       __le32 internal_data1;
+#define ICE_AQC_HEALTH_STATUS_UNDEFINED_DATA   (0xDEADBEEF)
+       __le32 internal_data2;
 };
 
-
-/* Get/Clear FW Log (indirect 0xFF11) */
-struct ice_aqc_get_clear_fw_log {
-       u8 flags;
-#define ICE_AQC_FW_LOG_CLEAR           BIT(0)
-#define ICE_AQC_FW_LOG_MORE_DATA_AVAIL BIT(1)
-       u8 rsvd1[7];
-       __le32 addr_high;
-       __le32 addr_low;
+/* Clear Health Status (direct 0xFF23) */
+struct ice_aqc_clear_health_status {
+       __le32 reserved[4];
 };
 
-
 /**
  * struct ice_aq_desc - Admin Queue (AQ) descriptor
  * @flags: ICE_AQ_FLAG_* flags
  * @opcode: AQ command opcode
  * @datalen: length in bytes of indirect/external data buffer
  * @retval: return value from firmware
- * @cookie_h: opaque data high-half
- * @cookie_l: opaque data low-half
+ * @cookie_high: opaque data high-half
+ * @cookie_low: opaque data low-half
  * @params: command-specific parameters
  *
  * Descriptor format for commands the driver posts on the Admin Transmit Queue
@@ -2277,8 +2727,10 @@ struct ice_aq_desc {
                struct ice_aqc_get_phy_caps get_phy;
                struct ice_aqc_set_phy_cfg set_phy;
                struct ice_aqc_restart_an restart_an;
+               struct ice_aqc_sff_eeprom read_write_sff_param;
                struct ice_aqc_set_port_id_led set_port_id_led;
                struct ice_aqc_get_sw_cfg get_sw_conf;
+               struct ice_aqc_set_port_params set_port_params;
                struct ice_aqc_sw_rules sw_rules;
                struct ice_aqc_storm_cfg storm_conf;
                struct ice_aqc_add_get_recipe add_get_recipe;
@@ -2304,19 +2756,32 @@ struct ice_aq_desc {
                struct ice_aqc_lldp_start lldp_start;
                struct ice_aqc_lldp_set_local_mib lldp_set_mib;
                struct ice_aqc_lldp_stop_start_specific_agent lldp_agent_ctrl;
+               struct ice_aqc_lldp_filter_ctrl lldp_filter_ctrl;
                struct ice_aqc_get_set_rss_lut get_set_rss_lut;
                struct ice_aqc_get_set_rss_key get_set_rss_key;
                struct ice_aqc_clear_fd_table clear_fd_table;
+               struct ice_aqc_acl_alloc_table alloc_table;
+               struct ice_aqc_acl_tbl_actpair tbl_actpair;
+               struct ice_aqc_acl_alloc_scen alloc_scen;
+               struct ice_aqc_acl_dealloc_scen dealloc_scen;
+               struct ice_aqc_acl_update_query_scen update_query_scen;
+               struct ice_aqc_acl_alloc_counters alloc_counters;
+               struct ice_aqc_acl_dealloc_counters dealloc_counters;
+               struct ice_aqc_acl_dealloc_res dealloc_res;
+               struct ice_aqc_acl_entry program_query_entry;
+               struct ice_aqc_acl_actpair program_query_actpair;
+               struct ice_aqc_acl_profile profile;
+               struct ice_aqc_acl_query_counter query_counter;
                struct ice_aqc_add_txqs add_txqs;
                struct ice_aqc_dis_txqs dis_txqs;
+               struct ice_aqc_move_txqs move_txqs;
                struct ice_aqc_txqs_cleanup txqs_cleanup;
                struct ice_aqc_add_get_update_free_vsi vsi_cmd;
                struct ice_aqc_add_update_free_vsi_resp add_update_free_vsi_res;
                struct ice_aqc_get_vsi_resp get_vsi_resp;
                struct ice_aqc_download_pkg download_pkg;
                struct ice_aqc_get_pkg_info_list get_pkg_info_list;
-               struct ice_aqc_fw_logging fw_logging;
-               struct ice_aqc_get_clear_fw_log get_clear_fw_log;
+               struct ice_aqc_driver_shared_params drv_shared_params;
                struct ice_aqc_set_mac_lb set_mac_lb;
                struct ice_aqc_alloc_free_res_cmd sw_res_ctrl;
                struct ice_aqc_get_res_alloc get_res;
@@ -2324,10 +2789,17 @@ struct ice_aq_desc {
                struct ice_aqc_set_mac_cfg set_mac_cfg;
                struct ice_aqc_set_event_mask set_event_mask;
                struct ice_aqc_get_link_status get_link_status;
+               struct ice_aqc_event_lan_overflow lan_overflow;
+               struct ice_aqc_get_link_topo get_link_topo;
+               struct ice_aqc_set_health_status_config
+                       set_health_status_config;
+               struct ice_aqc_get_supported_health_status_codes
+                       get_supported_health_status_codes;
+               struct ice_aqc_get_health_status get_health_status;
+               struct ice_aqc_clear_health_status clear_health_status;
        } params;
 };
 
-
 /* FW defined boundary for a large buffer, 4k >= Large buffer > 512 bytes */
 #define ICE_AQ_LG_BUF  512
 
@@ -2422,6 +2894,7 @@ enum ice_adminq_opc {
 
        /* internal switch commands */
        ice_aqc_opc_get_sw_cfg                          = 0x0200,
+       ice_aqc_opc_set_port_params                     = 0x0203,
 
        /* Alloc/Free/Get Resources */
        ice_aqc_opc_get_res_alloc                       = 0x0204,
@@ -2487,19 +2960,27 @@ enum ice_adminq_opc {
        ice_aqc_opc_get_link_status                     = 0x0607,
        ice_aqc_opc_set_event_mask                      = 0x0613,
        ice_aqc_opc_set_mac_lb                          = 0x0620,
+       ice_aqc_opc_get_link_topo                       = 0x06E0,
        ice_aqc_opc_set_port_id_led                     = 0x06E9,
        ice_aqc_opc_get_port_options                    = 0x06EA,
        ice_aqc_opc_set_port_option                     = 0x06EB,
        ice_aqc_opc_set_gpio                            = 0x06EC,
        ice_aqc_opc_get_gpio                            = 0x06ED,
+       ice_aqc_opc_sff_eeprom                          = 0x06EE,
+       ice_aqc_opc_sw_set_gpio                         = 0x06EF,
+       ice_aqc_opc_sw_get_gpio                         = 0x06F0,
 
        /* NVM commands */
        ice_aqc_opc_nvm_read                            = 0x0701,
        ice_aqc_opc_nvm_erase                           = 0x0702,
-       ice_aqc_opc_nvm_update                          = 0x0703,
+       ice_aqc_opc_nvm_write                           = 0x0703,
        ice_aqc_opc_nvm_cfg_read                        = 0x0704,
        ice_aqc_opc_nvm_cfg_write                       = 0x0705,
        ice_aqc_opc_nvm_checksum                        = 0x0706,
+       ice_aqc_opc_nvm_write_activate                  = 0x0707,
+       ice_aqc_opc_nvm_sr_dump                         = 0x0707,
+       ice_aqc_opc_nvm_save_factory_settings           = 0x0708,
+       ice_aqc_opc_nvm_update_empr                     = 0x0709,
 
        /* LLDP commands */
        ice_aqc_opc_lldp_get_mib                        = 0x0A00,
@@ -2512,6 +2993,7 @@ enum ice_adminq_opc {
        ice_aqc_opc_get_cee_dcb_cfg                     = 0x0A07,
        ice_aqc_opc_lldp_set_local_mib                  = 0x0A08,
        ice_aqc_opc_lldp_stop_start_specific_agent      = 0x0A09,
+       ice_aqc_opc_lldp_filter_ctrl                    = 0x0A0A,
 
        /* RSS commands */
        ice_aqc_opc_set_rss_key                         = 0x0B02,
@@ -2519,6 +3001,27 @@ enum ice_adminq_opc {
        ice_aqc_opc_get_rss_key                         = 0x0B04,
        ice_aqc_opc_get_rss_lut                         = 0x0B05,
        ice_aqc_opc_clear_fd_table                      = 0x0B06,
+       /* ACL commands */
+       ice_aqc_opc_alloc_acl_tbl                       = 0x0C10,
+       ice_aqc_opc_dealloc_acl_tbl                     = 0x0C11,
+       ice_aqc_opc_alloc_acl_actpair                   = 0x0C12,
+       ice_aqc_opc_dealloc_acl_actpair                 = 0x0C13,
+       ice_aqc_opc_alloc_acl_scen                      = 0x0C14,
+       ice_aqc_opc_dealloc_acl_scen                    = 0x0C15,
+       ice_aqc_opc_alloc_acl_counters                  = 0x0C16,
+       ice_aqc_opc_dealloc_acl_counters                = 0x0C17,
+       ice_aqc_opc_dealloc_acl_res                     = 0x0C1A,
+       ice_aqc_opc_update_acl_scen                     = 0x0C1B,
+       ice_aqc_opc_program_acl_actpair                 = 0x0C1C,
+       ice_aqc_opc_program_acl_prof_extraction         = 0x0C1D,
+       ice_aqc_opc_program_acl_prof_ranges             = 0x0C1E,
+       ice_aqc_opc_program_acl_entry                   = 0x0C20,
+       ice_aqc_opc_query_acl_prof                      = 0x0C21,
+       ice_aqc_opc_query_acl_prof_ranges               = 0x0C22,
+       ice_aqc_opc_query_acl_scen                      = 0x0C23,
+       ice_aqc_opc_query_acl_entry                     = 0x0C24,
+       ice_aqc_opc_query_acl_actpair                   = 0x0C25,
+       ice_aqc_opc_query_acl_counter                   = 0x0C27,
 
        /* Tx queue handling commands/events */
        ice_aqc_opc_add_txqs                            = 0x0C30,
@@ -2532,15 +3035,16 @@ enum ice_adminq_opc {
        ice_aqc_opc_update_pkg                          = 0x0C42,
        ice_aqc_opc_get_pkg_info_list                   = 0x0C43,
 
-
+       ice_aqc_opc_driver_shared_params                = 0x0C90,
 
        /* Standalone Commands/Events */
        ice_aqc_opc_event_lan_overflow                  = 0x1001,
 
-       /* debug commands */
-       ice_aqc_opc_fw_logging                          = 0xFF09,
-       ice_aqc_opc_fw_logging_info                     = 0xFF10,
-       ice_aqc_opc_get_clear_fw_log                    = 0xFF11
+       /* SystemDiagnostic commands */
+       ice_aqc_opc_set_health_status_config            = 0xFF20,
+       ice_aqc_opc_get_supported_health_status_codes   = 0xFF21,
+       ice_aqc_opc_get_health_status                   = 0xFF22,
+       ice_aqc_opc_clear_health_status                 = 0xFF23
 };
 
 #endif /* _ICE_ADMINQ_CMD_H_ */