The branch main has been updated by erj:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=d08b8680e12ad692736c84238dcf45c70c228914

commit d08b8680e12ad692736c84238dcf45c70c228914
Author:     Eric Joyner <e...@freebsd.org>
AuthorDate: 2021-02-23 01:45:09 +0000
Commit:     Eric Joyner <e...@freebsd.org>
CommitDate: 2021-03-06 01:33:39 +0000

    ice(4): Update to version 0.28.1-k
    
    This updates the driver to align with the version included in
    the "Intel Ethernet Adapter Complete Driver Pack", version 25.6.
    
    There are no major functional changes; this mostly contains
    bug fixes and changes to prepare for new features. This version
    of the driver uses the previously committed ice_ddp package
    1.3.19.0.
    
    Signed-off-by: Eric Joyner <e...@freebsd.org>
    
    Tested by:      jeffrey.e.pie...@intel.com
    Sponsored by:   Intel Corporation
    Differential Revision:  https://reviews.freebsd.org/D28640
---
 sys/conf/files.amd64                  |   2 +
 sys/conf/files.arm64                  |   2 +
 sys/dev/ice/ice_adminq_cmd.h          | 107 ++--
 sys/dev/ice/ice_alloc.h               |   2 +-
 sys/dev/ice/ice_bitops.h              |   4 +-
 sys/dev/ice/ice_common.c              | 135 ++---
 sys/dev/ice/ice_common.h              |  17 +-
 sys/dev/ice/ice_common_sysctls.h      |   2 +-
 sys/dev/ice/ice_common_txrx.h         |   2 +-
 sys/dev/ice/ice_controlq.c            |   2 +-
 sys/dev/ice/ice_controlq.h            |   6 +-
 sys/dev/ice/ice_dcb.c                 |  40 +-
 sys/dev/ice/ice_dcb.h                 |   2 +-
 sys/dev/ice/ice_devids.h              |   2 +-
 sys/dev/ice/ice_drv_info.h            |  27 +-
 sys/dev/ice/ice_features.h            |   2 +-
 sys/dev/ice/ice_flex_pipe.c           |  57 +-
 sys/dev/ice/ice_flex_pipe.h           |   2 +-
 sys/dev/ice/ice_flex_type.h           |  11 +-
 sys/dev/ice/ice_flow.c                | 243 +++++----
 sys/dev/ice/ice_flow.h                |  36 +-
 sys/dev/ice/ice_hw_autogen.h          |   2 +-
 sys/dev/ice/ice_iflib.h               |   2 +-
 sys/dev/ice/ice_iflib_recovery_txrx.c |   2 +-
 sys/dev/ice/ice_iflib_sysctls.h       |   2 +-
 sys/dev/ice/ice_iflib_txrx.c          |   2 +-
 sys/dev/ice/ice_lan_tx_rx.h           |   2 +-
 sys/dev/ice/ice_lib.c                 |  56 +-
 sys/dev/ice/ice_lib.h                 |   2 +-
 sys/dev/ice/ice_nvm.c                 | 954 +++++++++++++++++++++++++++++-----
 sys/dev/ice/ice_nvm.h                 |  24 +-
 sys/dev/ice/ice_opts.h                |   2 +-
 sys/dev/ice/ice_osdep.c               |   2 +-
 sys/dev/ice/ice_osdep.h               |   2 +-
 sys/dev/ice/ice_protocol_type.h       |  27 +-
 sys/dev/ice/ice_resmgr.c              |   2 +-
 sys/dev/ice/ice_resmgr.h              |   2 +-
 sys/dev/ice/ice_rss.h                 |   2 +-
 sys/dev/ice/ice_sbq_cmd.h             |   2 +-
 sys/dev/ice/ice_sched.c               | 562 ++++++++++++--------
 sys/dev/ice/ice_sched.h               |  31 +-
 sys/dev/ice/ice_sriov.c               | 407 ++++++++++++++-
 sys/dev/ice/ice_sriov.h               |  23 +-
 sys/dev/ice/ice_status.h              |   2 +-
 sys/dev/ice/ice_strings.c             |   2 +-
 sys/dev/ice/ice_switch.c              |  70 ++-
 sys/dev/ice/ice_switch.h              |   4 +-
 sys/dev/ice/ice_type.h                | 266 ++++++++--
 sys/dev/ice/ice_vlan_mode.c           |  72 +++
 sys/dev/ice/ice_vlan_mode.h           |  60 +++
 sys/dev/ice/if_ice_iflib.c            |   2 +-
 sys/dev/ice/virtchnl.h                | 287 +++++++++-
 sys/dev/ice/virtchnl_inline_ipsec.h   |  16 +-
 sys/modules/ice/Makefile              |   2 +-
 54 files changed, 2881 insertions(+), 717 deletions(-)

diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64
index c5421f4af4fc..00362da407cb 100644
--- a/sys/conf/files.amd64
+++ b/sys/conf/files.amd64
@@ -191,6 +191,8 @@ dev/ice/ice_sriov.c         optional        ice pci \
        compile-with "${NORMAL_C} -I$S/dev/ice"
 dev/ice/ice_switch.c           optional        ice pci \
        compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_vlan_mode.c                optional        ice pci \
+       compile-with "${NORMAL_C} -I$S/dev/ice"
 ice_ddp.c                      optional ice_ddp        \
        compile-with    "${AWK} -f $S/tools/fw_stub.awk 
ice_ddp.fw:ice_ddp:0x01031300 -mice_ddp -c${.TARGET}"   \
        no-ctfconvert no-implicit-rule before-depend local      \
diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64
index 0286ae57b0e0..dd1d96c49aba 100644
--- a/sys/conf/files.arm64
+++ b/sys/conf/files.arm64
@@ -205,6 +205,8 @@ dev/ice/ice_sriov.c                         optional ice 
pci \
        compile-with "${NORMAL_C} -I$S/dev/ice"
 dev/ice/ice_switch.c                           optional ice pci \
        compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_vlan_mode.c                optional        ice pci \
+       compile-with "${NORMAL_C} -I$S/dev/ice"
 ice_ddp.c                                      optional ice_ddp        \
        compile-with    "${AWK} -f $S/tools/fw_stub.awk 
ice_ddp.fw:ice_ddp:0x01031300 -mice_ddp -c${.TARGET}"   \
        no-ctfconvert no-implicit-rule before-depend local      \
diff --git a/sys/dev/ice/ice_adminq_cmd.h b/sys/dev/ice/ice_adminq_cmd.h
index 8d8c025fdd37..9179b0ce1226 100644
--- a/sys/dev/ice/ice_adminq_cmd.h
+++ b/sys/dev/ice/ice_adminq_cmd.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause */
-/*  Copyright (c) 2020, Intel Corporation
+/*  Copyright (c) 2021, Intel Corporation
  *  All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without
@@ -166,6 +166,7 @@ struct ice_aqc_list_caps_elem {
 #define ICE_AQC_CAPS_LOGI_TO_PHYSI_PORT_MAP            0x0073
 #define ICE_AQC_CAPS_SKU                               0x0074
 #define ICE_AQC_CAPS_PORT_MAP                          0x0075
+#define ICE_AQC_CAPS_PCIE_RESET_AVOIDANCE              0x0076
 #define ICE_AQC_CAPS_NVM_MGMT                          0x0080
 
        u8 major_ver;
@@ -1449,6 +1450,7 @@ struct ice_aqc_get_link_status_data {
 #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)
@@ -1496,7 +1498,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
@@ -1860,7 +1862,9 @@ struct ice_aqc_mdio {
 #define ICE_AQC_MDIO_DEV_M     (0x1F << ICE_AQC_MDIO_DEV_S)
 #define ICE_AQC_MDIO_CLAUSE_22 BIT(5)
 #define ICE_AQC_MDIO_CLAUSE_45 BIT(6)
-       u8 rsvd;
+       u8 mdio_bus_address;
+#define ICE_AQC_MDIO_BUS_ADDR_S 0
+#define ICE_AQC_MDIO_BUS_ADDR_M (0x1F << ICE_AQC_MDIO_BUS_ADDR_S)
        __le16 offset;
        __le16 data; /* Input in write cmd, output in read cmd. */
        u8 rsvd1[4];
@@ -2001,6 +2005,22 @@ struct ice_aqc_sff_eeprom {
        __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 Write commands (indirect 0x0703)
@@ -2027,6 +2047,9 @@ struct ice_aqc_nvm {
 #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
@@ -2056,32 +2079,22 @@ struct ice_aqc_nvm {
 #define ICE_AQC_NVM_LLDP_STATUS_M_LEN          4 /* In Bits */
 #define ICE_AQC_NVM_LLDP_STATUS_RD_LEN         4 /* In Bytes */
 
-/* The result of netlist NVM read comes in a TLV format. The actual data
- * (netlist header) starts from word offset 1 (byte 2). The FW strips
- * out the type field from the TLV header so all the netlist fields
- * should adjust their offset value by 1 word (2 bytes) in order to map
- * their correct location.
+#define ICE_AQC_NVM_MINSREV_MOD_ID             0x130
+
+/* Used for reading and writing MinSRev using 0x0701 and 0x0703. Note that the
+ * type field is excluded from the section when reading and writing from
+ * a module using the module_typeid field with these AQ commands.
  */
-#define ICE_AQC_NVM_LINK_TOPO_NETLIST_MOD_ID           0x11B
-#define ICE_AQC_NVM_LINK_TOPO_NETLIST_LEN_OFFSET       1
-#define ICE_AQC_NVM_LINK_TOPO_NETLIST_LEN              2 /* In bytes */
-#define ICE_AQC_NVM_NETLIST_NODE_COUNT_OFFSET          2
-#define ICE_AQC_NVM_NETLIST_NODE_COUNT_LEN             2 /* In bytes */
-#define ICE_AQC_NVM_NETLIST_NODE_COUNT_M               MAKEMASK(0x3FF, 0)
-#define ICE_AQC_NVM_NETLIST_ID_BLK_START_OFFSET                5
-#define ICE_AQC_NVM_NETLIST_ID_BLK_LEN                 0x30 /* In words */
-
-/* netlist ID block field offsets (word offsets) */
-#define ICE_AQC_NVM_NETLIST_ID_BLK_MAJOR_VER_LOW       2
-#define ICE_AQC_NVM_NETLIST_ID_BLK_MAJOR_VER_HIGH      3
-#define ICE_AQC_NVM_NETLIST_ID_BLK_MINOR_VER_LOW       4
-#define ICE_AQC_NVM_NETLIST_ID_BLK_MINOR_VER_HIGH      5
-#define ICE_AQC_NVM_NETLIST_ID_BLK_TYPE_LOW            6
-#define ICE_AQC_NVM_NETLIST_ID_BLK_TYPE_HIGH           7
-#define ICE_AQC_NVM_NETLIST_ID_BLK_REV_LOW             8
-#define ICE_AQC_NVM_NETLIST_ID_BLK_REV_HIGH            9
-#define ICE_AQC_NVM_NETLIST_ID_BLK_SHA_HASH            0xA
-#define ICE_AQC_NVM_NETLIST_ID_BLK_CUST_VER            0x2F
+struct ice_aqc_nvm_minsrev {
+       __le16 length;
+       __le16 validity;
+#define ICE_AQC_NVM_MINSREV_NVM_VALID          BIT(0)
+#define ICE_AQC_NVM_MINSREV_OROM_VALID         BIT(1)
+       __le16 nvm_minsrev_l;
+       __le16 nvm_minsrev_h;
+       __le16 orom_minsrev_l;
+       __le16 orom_minsrev_h;
+};
 
 /* Used for 0x0704 as well as for 0x0705 commands */
 struct ice_aqc_nvm_cfg {
@@ -2114,7 +2127,7 @@ struct ice_aqc_nvm_checksum {
        u8 rsvd2[12];
 };
 
-/**
+/*
  * Send to PF command (indirect 0x0801) ID is only used by PF
  *
  * Send to VF command (indirect 0x0802) ID is only used by PF
@@ -2541,6 +2554,7 @@ 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 {
@@ -2589,6 +2603,35 @@ struct ice_aqc_set_health_status_config {
        u8 reserved[15];
 };
 
+#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;
@@ -2630,8 +2673,8 @@ struct ice_aqc_clear_health_status {
  * @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
@@ -2920,6 +2963,8 @@ enum ice_adminq_opc {
        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,
diff --git a/sys/dev/ice/ice_alloc.h b/sys/dev/ice/ice_alloc.h
index 1d9b9169eb02..b281958be793 100644
--- a/sys/dev/ice/ice_alloc.h
+++ b/sys/dev/ice/ice_alloc.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause */
-/*  Copyright (c) 2020, Intel Corporation
+/*  Copyright (c) 2021, Intel Corporation
  *  All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ice/ice_bitops.h b/sys/dev/ice/ice_bitops.h
index 7c8cf6cb90f5..a7f729060b78 100644
--- a/sys/dev/ice/ice_bitops.h
+++ b/sys/dev/ice/ice_bitops.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause */
-/*  Copyright (c) 2020, Intel Corporation
+/*  Copyright (c) 2021, Intel Corporation
  *  All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without
@@ -423,7 +423,7 @@ ice_bitmap_set(ice_bitmap_t *dst, u16 pos, u16 num_bits)
 {
        u16 i;
 
-       for (i = pos; i < num_bits; i++)
+       for (i = pos; i < pos + num_bits; i++)
                ice_set_bit(i, dst);
 }
 
diff --git a/sys/dev/ice/ice_common.c b/sys/dev/ice/ice_common.c
index 20689f4893d4..5e2e4340c75c 100644
--- a/sys/dev/ice/ice_common.c
+++ b/sys/dev/ice/ice_common.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause */
-/*  Copyright (c) 2020, Intel Corporation
+/*  Copyright (c) 2021, Intel Corporation
  *  All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without
@@ -265,7 +265,7 @@ ice_aq_get_link_topo_handle(struct ice_port_info *pi, u8 
node_type,
        return ice_aq_send_cmd(pi->hw, &desc, NULL, 0, cd);
 }
 
-/*
+/**
  * ice_is_media_cage_present
  * @pi: port information structure
  *
@@ -704,13 +704,14 @@ static void ice_get_itr_intrl_gran(struct ice_hw *hw)
 void ice_print_rollback_msg(struct ice_hw *hw)
 {
        char nvm_str[ICE_NVM_VER_LEN] = { 0 };
-       struct ice_nvm_info *nvm = &hw->nvm;
        struct ice_orom_info *orom;
+       struct ice_nvm_info *nvm;
 
-       orom = &nvm->orom;
+       orom = &hw->flash.orom;
+       nvm = &hw->flash.nvm;
 
        SNPRINTF(nvm_str, sizeof(nvm_str), "%x.%02x 0x%x %d.%d.%d",
-                nvm->major_ver, nvm->minor_ver, nvm->eetrack, orom->major,
+                nvm->major, nvm->minor, nvm->eetrack, orom->major,
                 orom->build, orom->patch);
        ice_warn(hw,
                 "Firmware rollback mode detected. Current version is NVM: %s, 
FW: %d.%d. Device may exhibit limited functionality. Refer to the Intel(R) 
Ethernet Adapters and Devices User Guide for details on firmware rollback 
mode\n",
@@ -805,8 +806,7 @@ enum ice_status ice_init_hw(struct ice_hw *hw)
                                     ICE_AQC_REPORT_TOPO_CAP, pcaps, NULL);
        ice_free(hw, pcaps);
        if (status)
-               ice_debug(hw, ICE_DBG_PHY, "%s: Get PHY capabilities failed, 
continuing anyway\n",
-                         __func__);
+               ice_debug(hw, ICE_DBG_PHY, "Get PHY capabilities failed, 
continuing anyway\n");
 
        /* Initialize port_info struct with link information */
        status = ice_aq_get_link_info(hw->port_info, false, NULL, NULL);
@@ -850,6 +850,9 @@ enum ice_status ice_init_hw(struct ice_hw *hw)
        if (status)
                goto err_unroll_fltr_mgmt_struct;
        ice_init_lock(&hw->tnl_lock);
+
+       ice_init_vlan_mode_ops(hw);
+
        return ICE_SUCCESS;
 
 err_unroll_fltr_mgmt_struct:
@@ -1701,7 +1704,7 @@ ice_aq_alloc_free_res(struct ice_hw *hw, u16 num_entries,
        if (!buf)
                return ICE_ERR_PARAM;
 
-       if (buf_size < (num_entries * sizeof(buf->elem[0])))
+       if (buf_size < FLEX_ARRAY_SIZE(buf, elem, num_entries))
                return ICE_ERR_PARAM;
 
        ice_fill_dflt_direct_cmd_desc(&desc, opc);
@@ -1982,6 +1985,16 @@ ice_parse_common_caps(struct ice_hw *hw, struct 
ice_hw_common_caps *caps,
        case ICE_AQC_CAPS_NVM_VER:
                break;
        case ICE_AQC_CAPS_NVM_MGMT:
+               caps->sec_rev_disabled =
+                       (number & ICE_NVM_MGMT_SEC_REV_DISABLED) ?
+                       true : false;
+               ice_debug(hw, ICE_DBG_INIT, "%s: sec_rev_disabled = %d\n", 
prefix,
+                         caps->sec_rev_disabled);
+               caps->update_disabled =
+                       (number & ICE_NVM_MGMT_UPDATE_DISABLED) ?
+                       true : false;
+               ice_debug(hw, ICE_DBG_INIT, "%s: update_disabled = %d\n", 
prefix,
+                         caps->update_disabled);
                caps->nvm_unified_update =
                        (number & ICE_NVM_MGMT_UNIFIED_UPD_SUPPORT) ?
                        true : false;
@@ -2389,26 +2402,25 @@ void ice_set_safe_mode_caps(struct ice_hw *hw)
 {
        struct ice_hw_func_caps *func_caps = &hw->func_caps;
        struct ice_hw_dev_caps *dev_caps = &hw->dev_caps;
-       u32 valid_func, rxq_first_id, txq_first_id;
-       u32 msix_vector_first_id, max_mtu;
+       struct ice_hw_common_caps cached_caps;
        u32 num_funcs;
 
        /* cache some func_caps values that should be restored after memset */
-       valid_func = func_caps->common_cap.valid_functions;
-       txq_first_id = func_caps->common_cap.txq_first_id;
-       rxq_first_id = func_caps->common_cap.rxq_first_id;
-       msix_vector_first_id = func_caps->common_cap.msix_vector_first_id;
-       max_mtu = func_caps->common_cap.max_mtu;
+       cached_caps = func_caps->common_cap;
 
        /* unset func capabilities */
        memset(func_caps, 0, sizeof(*func_caps));
 
+#define ICE_RESTORE_FUNC_CAP(name) \
+       func_caps->common_cap.name = cached_caps.name
+
        /* restore cached values */
-       func_caps->common_cap.valid_functions = valid_func;
-       func_caps->common_cap.txq_first_id = txq_first_id;
-       func_caps->common_cap.rxq_first_id = rxq_first_id;
-       func_caps->common_cap.msix_vector_first_id = msix_vector_first_id;
-       func_caps->common_cap.max_mtu = max_mtu;
+       ICE_RESTORE_FUNC_CAP(valid_functions);
+       ICE_RESTORE_FUNC_CAP(txq_first_id);
+       ICE_RESTORE_FUNC_CAP(rxq_first_id);
+       ICE_RESTORE_FUNC_CAP(msix_vector_first_id);
+       ICE_RESTORE_FUNC_CAP(max_mtu);
+       ICE_RESTORE_FUNC_CAP(nvm_unified_update);
 
        /* one Tx and one Rx queue in safe mode */
        func_caps->common_cap.num_rxq = 1;
@@ -2419,22 +2431,22 @@ void ice_set_safe_mode_caps(struct ice_hw *hw)
        func_caps->guar_num_vsi = 1;
 
        /* cache some dev_caps values that should be restored after memset */
-       valid_func = dev_caps->common_cap.valid_functions;
-       txq_first_id = dev_caps->common_cap.txq_first_id;
-       rxq_first_id = dev_caps->common_cap.rxq_first_id;
-       msix_vector_first_id = dev_caps->common_cap.msix_vector_first_id;
-       max_mtu = dev_caps->common_cap.max_mtu;
+       cached_caps = dev_caps->common_cap;
        num_funcs = dev_caps->num_funcs;
 
        /* unset dev capabilities */
        memset(dev_caps, 0, sizeof(*dev_caps));
 
+#define ICE_RESTORE_DEV_CAP(name) \
+       dev_caps->common_cap.name = cached_caps.name
+
        /* restore cached values */
-       dev_caps->common_cap.valid_functions = valid_func;
-       dev_caps->common_cap.txq_first_id = txq_first_id;
-       dev_caps->common_cap.rxq_first_id = rxq_first_id;
-       dev_caps->common_cap.msix_vector_first_id = msix_vector_first_id;
-       dev_caps->common_cap.max_mtu = max_mtu;
+       ICE_RESTORE_DEV_CAP(valid_functions);
+       ICE_RESTORE_DEV_CAP(txq_first_id);
+       ICE_RESTORE_DEV_CAP(rxq_first_id);
+       ICE_RESTORE_DEV_CAP(msix_vector_first_id);
+       ICE_RESTORE_DEV_CAP(max_mtu);
+       ICE_RESTORE_DEV_CAP(nvm_unified_update);
        dev_caps->num_funcs = num_funcs;
 
        /* one Tx and one Rx queue per function in safe mode */
@@ -2480,7 +2492,7 @@ ice_aq_manage_mac_write(struct ice_hw *hw, const u8 
*mac_addr, u8 flags,
        ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_manage_mac_write);
 
        cmd->flags = flags;
-       ice_memcpy(cmd->mac_addr, mac_addr, ETH_ALEN, ICE_NONDMA_TO_DMA);
+       ice_memcpy(cmd->mac_addr, mac_addr, ETH_ALEN, ICE_NONDMA_TO_NONDMA);
 
        return ice_aq_send_cmd(hw, &desc, NULL, 0, cd);
 }
@@ -2816,6 +2828,11 @@ enum ice_status ice_update_link_info(struct 
ice_port_info *pi)
                status = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_TOPO_CAP,
                                             pcaps, NULL);
 
+               if (status == ICE_SUCCESS)
+                       ice_memcpy(li->module_type, &pcaps->module_type,
+                                  sizeof(li->module_type),
+                                  ICE_NONDMA_TO_NONDMA);
+
                ice_free(hw, pcaps);
        }
 
@@ -3379,7 +3396,7 @@ ice_aq_sff_eeprom(struct ice_hw *hw, u16 lport, u8 
bus_addr,
 
        ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_sff_eeprom);
        cmd = &desc.params.read_write_sff_param;
-       desc.flags = CPU_TO_LE16(ICE_AQ_FLAG_RD | ICE_AQ_FLAG_BUF);
+       desc.flags = CPU_TO_LE16(ICE_AQ_FLAG_RD);
        cmd->lport_num = (u8)(lport & 0xff);
        cmd->lport_num_valid = (u8)((lport >> 8) & 0x01);
        cmd->i2c_bus_addr = CPU_TO_LE16(((bus_addr >> 1) &
@@ -3399,23 +3416,33 @@ ice_aq_sff_eeprom(struct ice_hw *hw, u16 lport, u8 
bus_addr,
 /**
  * __ice_aq_get_set_rss_lut
  * @hw: pointer to the hardware structure
- * @vsi_id: VSI FW index
- * @lut_type: LUT table type
- * @lut: pointer to the LUT buffer provided by the caller
- * @lut_size: size of the LUT buffer
- * @glob_lut_idx: global LUT index
+ * @params: RSS LUT parameters
  * @set: set true to set the table, false to get the table
  *
  * Internal function to get (0x0B05) or set (0x0B03) RSS look up table
  */
 static enum ice_status
-__ice_aq_get_set_rss_lut(struct ice_hw *hw, u16 vsi_id, u8 lut_type, u8 *lut,
-                        u16 lut_size, u8 glob_lut_idx, bool set)
+__ice_aq_get_set_rss_lut(struct ice_hw *hw, struct 
ice_aq_get_set_rss_lut_params *params, bool set)
 {
+       u16 flags = 0, vsi_id, lut_type, lut_size, glob_lut_idx, vsi_handle;
        struct ice_aqc_get_set_rss_lut *cmd_resp;
        struct ice_aq_desc desc;
        enum ice_status status;
-       u16 flags = 0;
+       u8 *lut;
+
+       if (!params)
+               return ICE_ERR_PARAM;
+
+       vsi_handle = params->vsi_handle;
+       lut = params->lut;
+
+       if (!ice_is_vsi_valid(hw, vsi_handle) || !lut)
+               return ICE_ERR_PARAM;
+
+       lut_size = params->lut_size;
+       lut_type = params->lut_type;
+       glob_lut_idx = params->global_lut_id;
+       vsi_id = ice_get_hw_vsi_num(hw, vsi_handle);
 
        cmd_resp = &desc.params.get_set_rss_lut;
 
@@ -3492,43 +3519,27 @@ ice_aq_get_set_rss_lut_exit:
 /**
  * ice_aq_get_rss_lut
  * @hw: pointer to the hardware structure
- * @vsi_handle: software VSI handle
- * @lut_type: LUT table type
- * @lut: pointer to the LUT buffer provided by the caller
- * @lut_size: size of the LUT buffer
+ * @get_params: RSS LUT parameters used to specify which RSS LUT to get
  *
  * get the RSS lookup table, PF or VSI type
  */
 enum ice_status
-ice_aq_get_rss_lut(struct ice_hw *hw, u16 vsi_handle, u8 lut_type,
-                  u8 *lut, u16 lut_size)
+ice_aq_get_rss_lut(struct ice_hw *hw, struct ice_aq_get_set_rss_lut_params 
*get_params)
 {
-       if (!ice_is_vsi_valid(hw, vsi_handle) || !lut)
-               return ICE_ERR_PARAM;
-
-       return __ice_aq_get_set_rss_lut(hw, ice_get_hw_vsi_num(hw, vsi_handle),
-                                       lut_type, lut, lut_size, 0, false);
+       return __ice_aq_get_set_rss_lut(hw, get_params, false);
 }
 
 /**
  * ice_aq_set_rss_lut
  * @hw: pointer to the hardware structure
- * @vsi_handle: software VSI handle
- * @lut_type: LUT table type
- * @lut: pointer to the LUT buffer provided by the caller
- * @lut_size: size of the LUT buffer
+ * @set_params: RSS LUT parameters used to specify how to set the RSS LUT
  *
  * set the RSS lookup table, PF or VSI type
  */
 enum ice_status
-ice_aq_set_rss_lut(struct ice_hw *hw, u16 vsi_handle, u8 lut_type,
-                  u8 *lut, u16 lut_size)
+ice_aq_set_rss_lut(struct ice_hw *hw, struct ice_aq_get_set_rss_lut_params 
*set_params)
 {
-       if (!ice_is_vsi_valid(hw, vsi_handle) || !lut)
-               return ICE_ERR_PARAM;
-
-       return __ice_aq_get_set_rss_lut(hw, ice_get_hw_vsi_num(hw, vsi_handle),
-                                       lut_type, lut, lut_size, 0, true);
+       return __ice_aq_get_set_rss_lut(hw, set_params, true);
 }
 
 /**
diff --git a/sys/dev/ice/ice_common.h b/sys/dev/ice/ice_common.h
index 84a39b7e9b8a..3a28816fb131 100644
--- a/sys/dev/ice/ice_common.h
+++ b/sys/dev/ice/ice_common.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause */
-/*  Copyright (c) 2020, Intel Corporation
+/*  Copyright (c) 2021, Intel Corporation
  *  All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without
@@ -117,11 +117,9 @@ ice_write_tx_drbell_q_ctx(struct ice_hw *hw,
                          u32 tx_drbell_q_index);
 
 enum ice_status
-ice_aq_get_rss_lut(struct ice_hw *hw, u16 vsi_handle, u8 lut_type, u8 *lut,
-                  u16 lut_size);
+ice_aq_get_rss_lut(struct ice_hw *hw, struct ice_aq_get_set_rss_lut_params 
*get_params);
 enum ice_status
-ice_aq_set_rss_lut(struct ice_hw *hw, u16 vsi_handle, u8 lut_type, u8 *lut,
-                  u16 lut_size);
+ice_aq_set_rss_lut(struct ice_hw *hw, struct ice_aq_get_set_rss_lut_params 
*set_params);
 enum ice_status
 ice_aq_get_rss_key(struct ice_hw *hw, u16 vsi_handle,
                   struct ice_aqc_get_set_rss_keys *keys);
@@ -240,13 +238,6 @@ ice_ena_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, 
u8 tc, u16 q_handle,
                struct ice_sq_cd *cd);
 enum ice_status ice_replay_vsi(struct ice_hw *hw, u16 vsi_handle);
 void ice_replay_post(struct ice_hw *hw);
-void ice_sched_replay_agg_vsi_preinit(struct ice_hw *hw);
-void ice_sched_replay_agg(struct ice_hw *hw);
-enum ice_status ice_sched_replay_tc_node_bw(struct ice_port_info *pi);
-enum ice_status ice_replay_vsi_agg(struct ice_hw *hw, u16 vsi_handle);
-enum ice_status ice_sched_replay_root_node_bw(struct ice_port_info *pi);
-enum ice_status
-ice_sched_replay_q_bw(struct ice_port_info *pi, struct ice_q_ctx *q_ctx);
 struct ice_q_ctx *
 ice_get_lan_q_ctx(struct ice_hw *hw, u16 vsi_handle, u8 tc, u16 q_handle);
 void
@@ -277,7 +268,7 @@ enum ice_status
 ice_get_cur_lldp_persist_status(struct ice_hw *hw, u32 *lldp_status);
 enum ice_status
 ice_get_dflt_lldp_persist_status(struct ice_hw *hw, u32 *lldp_status);
-enum ice_status ice_get_netlist_ver_info(struct ice_hw *hw);
+enum ice_status ice_get_netlist_ver_info(struct ice_hw *hw, struct 
ice_netlist_info *netlist);
 enum ice_status
 ice_aq_set_lldp_mib(struct ice_hw *hw, u8 mib_type, void *buf, u16 buf_size,
                    struct ice_sq_cd *cd);
diff --git a/sys/dev/ice/ice_common_sysctls.h b/sys/dev/ice/ice_common_sysctls.h
index 82ead3fcfecc..17c2fce72ee7 100644
--- a/sys/dev/ice/ice_common_sysctls.h
+++ b/sys/dev/ice/ice_common_sysctls.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause */
-/*  Copyright (c) 2020, Intel Corporation
+/*  Copyright (c) 2021, Intel Corporation
  *  All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ice/ice_common_txrx.h b/sys/dev/ice/ice_common_txrx.h
index 8fb3d49288d8..d5e6182c2212 100644
--- a/sys/dev/ice/ice_common_txrx.h
+++ b/sys/dev/ice/ice_common_txrx.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause */
-/*  Copyright (c) 2020, Intel Corporation
+/*  Copyright (c) 2021, Intel Corporation
  *  All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ice/ice_controlq.c b/sys/dev/ice/ice_controlq.c
index 3caab15e0e41..ee8d7f5c3e8f 100644
--- a/sys/dev/ice/ice_controlq.c
+++ b/sys/dev/ice/ice_controlq.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause */
-/*  Copyright (c) 2020, Intel Corporation
+/*  Copyright (c) 2021, Intel Corporation
  *  All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ice/ice_controlq.h b/sys/dev/ice/ice_controlq.h
index 0da6b025fc8c..947f1d6d1767 100644
--- a/sys/dev/ice/ice_controlq.h
+++ b/sys/dev/ice/ice_controlq.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause */
-/*  Copyright (c) 2020, Intel Corporation
+/*  Copyright (c) 2021, Intel Corporation
  *  All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without
@@ -60,8 +60,8 @@ enum ice_ctl_q {
        ICE_CTL_Q_MAILBOX,
 };
 
-/* Control Queue timeout settings - max delay 250ms */
-#define ICE_CTL_Q_SQ_CMD_TIMEOUT       2500  /* Count 2500 times */
+/* Control Queue timeout settings - max delay 1s */
+#define ICE_CTL_Q_SQ_CMD_TIMEOUT       10000 /* Count 10000 times */
 #define ICE_CTL_Q_SQ_CMD_USEC          100   /* Check every 100usec */
 #define ICE_CTL_Q_ADMIN_INIT_TIMEOUT   10    /* Count 10 times */
 #define ICE_CTL_Q_ADMIN_INIT_MSEC      100   /* Check every 100msec */
diff --git a/sys/dev/ice/ice_dcb.c b/sys/dev/ice/ice_dcb.c
index b6275c5d07e8..abe0237eb88f 100644
--- a/sys/dev/ice/ice_dcb.c
+++ b/sys/dev/ice/ice_dcb.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause */
-/*  Copyright (c) 2020, Intel Corporation
+/*  Copyright (c) 2021, Intel Corporation
  *  All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without
@@ -994,22 +994,27 @@ ice_aq_set_dcb_parameters(struct ice_hw *hw, bool 
dcb_enable,
 /**
  * ice_cee_to_dcb_cfg
  * @cee_cfg: pointer to CEE configuration struct
- * @dcbcfg: DCB configuration struct
+ * @pi: port information structure
  *
  * Convert CEE configuration from firmware to DCB configuration
  */
 static void
 ice_cee_to_dcb_cfg(struct ice_aqc_get_cee_dcb_cfg_resp *cee_cfg,
-                  struct ice_dcbx_cfg *dcbcfg)
+                  struct ice_port_info *pi)
 {
        u32 status, tlv_status = LE32_TO_CPU(cee_cfg->tlv_status);
        u32 ice_aqc_cee_status_mask, ice_aqc_cee_status_shift;
+       u8 i, j, err, sync, oper, app_index, ice_app_sel_type;
        u16 app_prio = LE16_TO_CPU(cee_cfg->oper_app_prio);
-       u8 i, err, sync, oper, app_index, ice_app_sel_type;
        u16 ice_aqc_cee_app_mask, ice_aqc_cee_app_shift;
+       struct ice_dcbx_cfg *cmp_dcbcfg, *dcbcfg;
        u16 ice_app_prot_id_type;
 
-       /* CEE PG data to ETS config */
+       dcbcfg = &pi->qos_cfg.local_dcbx_cfg;
+       dcbcfg->dcbx_mode = ICE_DCBX_MODE_CEE;
+       dcbcfg->tlv_status = tlv_status;
+
+       /* CEE PG data */
        dcbcfg->etscfg.maxtcs = cee_cfg->oper_num_tc;
 
        /* Note that the FW creates the oper_prio_tc nibbles reversed
@@ -1036,10 +1041,16 @@ ice_cee_to_dcb_cfg(struct ice_aqc_get_cee_dcb_cfg_resp 
*cee_cfg,
                }
        }
 
-       /* CEE PFC data to ETS config */
+       /* CEE PFC data */
        dcbcfg->pfc.pfcena = cee_cfg->oper_pfc_en;
        dcbcfg->pfc.pfccap = ICE_MAX_TRAFFIC_CLASS;
 
+       /* CEE APP TLV data */
+       if (dcbcfg->app_mode == ICE_DCBX_APPS_NON_WILLING)
+               cmp_dcbcfg = &pi->qos_cfg.desired_dcbx_cfg;
+       else
+               cmp_dcbcfg = &pi->qos_cfg.remote_dcbx_cfg;
+
        app_index = 0;
        for (i = 0; i < 3; i++) {
                if (i == 0) {
@@ -1058,6 +1069,18 @@ ice_cee_to_dcb_cfg(struct ice_aqc_get_cee_dcb_cfg_resp 
*cee_cfg,
                        ice_aqc_cee_app_shift = ICE_AQC_CEE_APP_ISCSI_S;
                        ice_app_sel_type = ICE_APP_SEL_TCPIP;
                        ice_app_prot_id_type = ICE_APP_PROT_ID_ISCSI;
+
+                       for (j = 0; j < cmp_dcbcfg->numapps; j++) {
+                               u16 prot_id = cmp_dcbcfg->app[j].prot_id;
+                               u8 sel = cmp_dcbcfg->app[j].selector;
+
+                               if  (sel == ICE_APP_SEL_TCPIP &&
+                                    (prot_id == ICE_APP_PROT_ID_ISCSI ||
+                                     prot_id == ICE_APP_PROT_ID_ISCSI_860)) {
+                                       ice_app_prot_id_type = prot_id;
+                                       break;
+                               }
+                       }
                } else {
                        /* FIP APP */
                        ice_aqc_cee_status_mask = ICE_AQC_CEE_FIP_STATUS_M;
@@ -1148,11 +1171,8 @@ enum ice_status ice_get_dcb_cfg(struct ice_port_info *pi)
        ret = ice_aq_get_cee_dcb_cfg(pi->hw, &cee_cfg, NULL);
        if (ret == ICE_SUCCESS) {
                /* CEE mode */
-               dcbx_cfg = &pi->qos_cfg.local_dcbx_cfg;
-               dcbx_cfg->dcbx_mode = ICE_DCBX_MODE_CEE;
-               dcbx_cfg->tlv_status = LE32_TO_CPU(cee_cfg.tlv_status);
-               ice_cee_to_dcb_cfg(&cee_cfg, dcbx_cfg);
                ret = ice_get_ieee_or_cee_dcb_cfg(pi, ICE_DCBX_MODE_CEE);
+               ice_cee_to_dcb_cfg(&cee_cfg, pi);
        } else if (pi->hw->adminq.sq_last_status == ICE_AQ_RC_ENOENT) {
                /* CEE mode not enabled try querying IEEE data */
                dcbx_cfg = &pi->qos_cfg.local_dcbx_cfg;
diff --git a/sys/dev/ice/ice_dcb.h b/sys/dev/ice/ice_dcb.h
index 88c49c89fbd2..85d6b399cf11 100644
--- a/sys/dev/ice/ice_dcb.h
+++ b/sys/dev/ice/ice_dcb.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause */
-/*  Copyright (c) 2020, Intel Corporation
+/*  Copyright (c) 2021, Intel Corporation
  *  All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ice/ice_devids.h b/sys/dev/ice/ice_devids.h
index a110133823df..8611fc170816 100644
--- a/sys/dev/ice/ice_devids.h
+++ b/sys/dev/ice/ice_devids.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause */
-/*  Copyright (c) 2020, Intel Corporation
+/*  Copyright (c) 2021, Intel Corporation
  *  All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ice/ice_drv_info.h b/sys/dev/ice/ice_drv_info.h
index 9ed3e3e2fb0e..340d53e4a671 100644
--- a/sys/dev/ice/ice_drv_info.h
+++ b/sys/dev/ice/ice_drv_info.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause */
-/*  Copyright (c) 2020, Intel Corporation
+/*  Copyright (c) 2021, Intel Corporation
  *  All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without
@@ -63,16 +63,16 @@
  * @var ice_rc_version
  * @brief driver release candidate version number
  */
-const char ice_driver_version[] = "0.26.16-k";
+const char ice_driver_version[] = "0.28.1-k";
 const uint8_t ice_major_version = 0;
-const uint8_t ice_minor_version = 26;
-const uint8_t ice_patch_version = 16;
+const uint8_t ice_minor_version = 28;
+const uint8_t ice_patch_version = 1;
 const uint8_t ice_rc_version = 0;
 
 #define PVIDV(vendor, devid, name) \
-       PVID(vendor, devid, name " - 0.26.16-k")
+       PVID(vendor, devid, name " - 0.28.1-k")
 #define PVIDV_OEM(vendor, devid, svid, sdevid, revid, name) \
-       PVID_OEM(vendor, devid, svid, sdevid, revid, name " - 0.26.16-k")
+       PVID_OEM(vendor, devid, svid, sdevid, revid, name " - 0.28.1-k")
 
 /**
  * @var ice_vendor_info_array
@@ -113,20 +113,11 @@ static pci_vendor_info_t ice_vendor_info_array[] = {
        PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_QSFP,
                ICE_INTEL_VENDOR_ID, 0x0008, 0,
                "Intel(R) Ethernet Network Adapter E810-C-Q2 for OCP3.0"),
+       PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_QSFP,
+               ICE_INTEL_VENDOR_ID, 0x000D, 0,
+               "Intel(R) Ethernet Network Adapter E810-L-Q2 for OCP3.0"),
        PVIDV(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_QSFP,
                "Intel(R) Ethernet Controller E810-C for QSFP"),
-       PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_SFP,
-               ICE_INTEL_VENDOR_ID, 0x0001, 0,
-               "Intel(R) Ethernet Network Adapter E810-L-1"),
-       PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_SFP,
-               ICE_INTEL_VENDOR_ID, 0x0002, 0,
-               "Intel(R) Ethernet Network Adapter E810-L-2"),
-       PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_SFP,
-               ICE_INTEL_VENDOR_ID, 0x0003, 0,
-               "Intel(R) Ethernet Network Adapter E810-L-1"),
-       PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_SFP,
-               ICE_INTEL_VENDOR_ID, 0x0004, 0,
-               "Intel(R) Ethernet Network Adapter E810-L-2"),
        PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_SFP,
                ICE_INTEL_VENDOR_ID, 0x0005, 0,
                "Intel(R) Ethernet Network Adapter E810-XXV-4"),
diff --git a/sys/dev/ice/ice_features.h b/sys/dev/ice/ice_features.h
index f5ea542d8626..dcb096509f73 100644
--- a/sys/dev/ice/ice_features.h
+++ b/sys/dev/ice/ice_features.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause */
-/*  Copyright (c) 2020, Intel Corporation
+/*  Copyright (c) 2021, Intel Corporation
  *  All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without
diff --git a/sys/dev/ice/ice_flex_pipe.c b/sys/dev/ice/ice_flex_pipe.c
index 6a02239eca5c..e8e4403a23fe 100644
--- a/sys/dev/ice/ice_flex_pipe.c
+++ b/sys/dev/ice/ice_flex_pipe.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause */
-/*  Copyright (c) 2020, Intel Corporation
+/*  Copyright (c) 2021, Intel Corporation
  *  All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without
@@ -1057,6 +1057,13 @@ ice_dwnld_cfg_bufs(struct ice_hw *hw, struct ice_buf 
*bufs, u32 count)
                        break;
        }
 
+       if (!status) {
+               status = ice_set_vlan_mode(hw);
+               if (status)
+                       ice_debug(hw, ICE_DBG_PKG, "Failed to set VLAN mode: 
err %d\n",
+                                 status);
+       }
+
        ice_release_global_cfg_lock(hw);
 
        return status;
@@ -1126,34 +1133,40 @@ ice_download_pkg(struct ice_hw *hw, struct ice_seg 
*ice_seg)
 static enum ice_status
 ice_init_pkg_info(struct ice_hw *hw, struct ice_pkg_hdr *pkg_hdr)
 {
-       struct ice_global_metadata_seg *meta_seg;
        struct ice_generic_seg_hdr *seg_hdr;
 
        ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__);
        if (!pkg_hdr)
                return ICE_ERR_PARAM;
 
-       meta_seg = (struct ice_global_metadata_seg *)
-                  ice_find_seg_in_pkg(hw, SEGMENT_TYPE_METADATA, pkg_hdr);
-       if (meta_seg) {
-               hw->pkg_ver = meta_seg->pkg_ver;
-               ice_memcpy(hw->pkg_name, meta_seg->pkg_name,
-                          sizeof(hw->pkg_name), ICE_NONDMA_TO_NONDMA);
+       seg_hdr = (struct ice_generic_seg_hdr *)
+               ice_find_seg_in_pkg(hw, SEGMENT_TYPE_ICE, pkg_hdr);
+       if (seg_hdr) {
+               struct ice_meta_sect *meta;
+               struct ice_pkg_enum state;
+
+               ice_memset(&state, 0, sizeof(state), ICE_NONDMA_MEM);
+
+               /* Get package information from the Metadata Section */
+               meta = (struct ice_meta_sect *)
+                       ice_pkg_enum_section((struct ice_seg *)seg_hdr, &state,
+                                            ICE_SID_METADATA);
+               if (!meta) {
+                       ice_debug(hw, ICE_DBG_INIT, "Did not find ice metadata 
section in package\n");
+                       return ICE_ERR_CFG;
+               }
+
+               hw->pkg_ver = meta->ver;
+               ice_memcpy(hw->pkg_name, meta->name, sizeof(meta->name),
+                          ICE_NONDMA_TO_NONDMA);
 
                ice_debug(hw, ICE_DBG_PKG, "Pkg: %d.%d.%d.%d, %s\n",
-                         meta_seg->pkg_ver.major, meta_seg->pkg_ver.minor,
-                         meta_seg->pkg_ver.update, meta_seg->pkg_ver.draft,
-                         meta_seg->pkg_name);
-       } else {
-               ice_debug(hw, ICE_DBG_INIT, "Did not find metadata segment in 
driver package\n");
-               return ICE_ERR_CFG;
-       }
+                         meta->ver.major, meta->ver.minor, meta->ver.update,
+                         meta->ver.draft, meta->name);
 
-       seg_hdr = ice_find_seg_in_pkg(hw, SEGMENT_TYPE_ICE, pkg_hdr);
-       if (seg_hdr) {
-               hw->ice_pkg_ver = seg_hdr->seg_format_ver;
-               ice_memcpy(hw->ice_pkg_name, seg_hdr->seg_id,
-                          sizeof(hw->ice_pkg_name), ICE_NONDMA_TO_NONDMA);
+               hw->ice_seg_fmt_ver = seg_hdr->seg_format_ver;
+               ice_memcpy(hw->ice_seg_id, seg_hdr->seg_id,
+                          sizeof(hw->ice_seg_id), ICE_NONDMA_TO_NONDMA);
 
                ice_debug(hw, ICE_DBG_PKG, "Ice Seg: %d.%d.%d.%d, %s\n",
*** 4742 LINES SKIPPED ***
_______________________________________________
dev-commits-src-main@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"

Reply via email to