net/ice/base: do not wait for PE unit to load
[dpdk.git] / drivers / net / ice / base / ice_common.c
index c2d4f1f..319b00f 100644 (file)
 
 #define ICE_PF_RESET_WAIT_COUNT        200
 
-#define ICE_PROG_FLEX_ENTRY(hw, rxdid, mdid, idx) \
-       wr32((hw), GLFLXP_RXDID_FLX_WRD_##idx(rxdid), \
-            ((ICE_RX_OPC_MDID << \
-              GLFLXP_RXDID_FLX_WRD_##idx##_RXDID_OPCODE_S) & \
-             GLFLXP_RXDID_FLX_WRD_##idx##_RXDID_OPCODE_M) | \
-            (((mdid) << GLFLXP_RXDID_FLX_WRD_##idx##_PROT_MDID_S) & \
-             GLFLXP_RXDID_FLX_WRD_##idx##_PROT_MDID_M))
-
-#define ICE_PROG_FLEX_ENTRY_EXTRACT(hw, rxdid, protid, off, idx) \
-       wr32((hw), GLFLXP_RXDID_FLX_WRD_##idx(rxdid), \
-            ((ICE_RX_OPC_EXTRACT << \
-              GLFLXP_RXDID_FLX_WRD_##idx##_RXDID_OPCODE_S) & \
-             GLFLXP_RXDID_FLX_WRD_##idx##_RXDID_OPCODE_M) | \
-            (((protid) << GLFLXP_RXDID_FLX_WRD_##idx##_PROT_MDID_S) & \
-             GLFLXP_RXDID_FLX_WRD_##idx##_PROT_MDID_M) | \
-            (((off) << GLFLXP_RXDID_FLX_WRD_##idx##_EXTRACTION_OFFSET_S) & \
-             GLFLXP_RXDID_FLX_WRD_##idx##_EXTRACTION_OFFSET_M))
-
-#define ICE_PROG_FLG_ENTRY(hw, rxdid, flg_0, flg_1, flg_2, flg_3, idx) \
-       wr32((hw), GLFLXP_RXDID_FLAGS(rxdid, idx), \
-            (((flg_0) << GLFLXP_RXDID_FLAGS_FLEXIFLAG_4N_S) & \
-             GLFLXP_RXDID_FLAGS_FLEXIFLAG_4N_M) | \
-            (((flg_1) << GLFLXP_RXDID_FLAGS_FLEXIFLAG_4N_1_S) & \
-             GLFLXP_RXDID_FLAGS_FLEXIFLAG_4N_1_M) | \
-            (((flg_2) << GLFLXP_RXDID_FLAGS_FLEXIFLAG_4N_2_S) & \
-             GLFLXP_RXDID_FLAGS_FLEXIFLAG_4N_2_M) | \
-            (((flg_3) << GLFLXP_RXDID_FLAGS_FLEXIFLAG_4N_3_S) & \
-             GLFLXP_RXDID_FLAGS_FLEXIFLAG_4N_3_M))
-
-
 /**
  * ice_set_mac_type - Sets MAC type
  * @hw: pointer to the HW structure
@@ -70,7 +40,6 @@ static enum ice_status ice_set_mac_type(struct ice_hw *hw)
        return status;
 }
 
-
 /**
  * ice_clear_pf_cfg - Clear PF configuration
  * @hw: pointer to the hardware structure
@@ -142,7 +111,6 @@ ice_aq_manage_mac_read(struct ice_hw *hw, void *buf, u16 buf_size,
                                   ETH_ALEN, ICE_DMA_TO_NONDMA);
                        break;
                }
-
        return ICE_SUCCESS;
 }
 
@@ -187,6 +155,56 @@ ice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode,
        return status;
 }
 
+/**
+ * ice_aq_get_link_topo_handle - get link topology node return status
+ * @pi: port information structure
+ * @node_type: requested node type
+ * @cd: pointer to command details structure or NULL
+ *
+ * Get link topology node return status for specified node type (0x06E0)
+ *
+ * Node type cage can be used to determine if cage is present. If AQC
+ * returns error (ENOENT), then no cage present. If no cage present, then
+ * connection type is backplane or BASE-T.
+ */
+static enum ice_status
+ice_aq_get_link_topo_handle(struct ice_port_info *pi, u8 node_type,
+                           struct ice_sq_cd *cd)
+{
+       struct ice_aqc_get_link_topo *cmd;
+       struct ice_aq_desc desc;
+
+       cmd = &desc.params.get_link_topo;
+
+       ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_get_link_topo);
+
+       cmd->addr.node_type_ctx = (ICE_AQC_LINK_TOPO_NODE_CTX_PORT <<
+                                  ICE_AQC_LINK_TOPO_NODE_CTX_S);
+
+       /* set node type */
+       cmd->addr.node_type_ctx |= (ICE_AQC_LINK_TOPO_NODE_TYPE_M & node_type);
+
+       return ice_aq_send_cmd(pi->hw, &desc, NULL, 0, cd);
+}
+
+/**
+ * ice_is_media_cage_present
+ * @pi: port information structure
+ *
+ * Returns true if media cage is present, else false. If no cage, then
+ * media type is backplane or BASE-T.
+ */
+static bool ice_is_media_cage_present(struct ice_port_info *pi)
+{
+       /* Node type cage can be used to determine if cage is present. If AQC
+        * returns error (ENOENT), then no cage present. If no cage present then
+        * connection type is backplane or BASE-T.
+        */
+       return !ice_aq_get_link_topo_handle(pi,
+                                           ICE_AQC_LINK_TOPO_NODE_TYPE_CAGE,
+                                           NULL);
+}
+
 /**
  * ice_get_media_type - Gets media type
  * @pi: port information structure
@@ -212,7 +230,6 @@ static enum ice_media_type ice_get_media_type(struct ice_port_info *pi)
                case ICE_PHY_TYPE_LOW_10G_SFI_C2C:
                case ICE_PHY_TYPE_LOW_25GBASE_SR:
                case ICE_PHY_TYPE_LOW_25GBASE_LR:
-               case ICE_PHY_TYPE_LOW_25G_AUI_C2C:
                case ICE_PHY_TYPE_LOW_40GBASE_SR4:
                case ICE_PHY_TYPE_LOW_40GBASE_LR4:
                case ICE_PHY_TYPE_LOW_50GBASE_SR2:
@@ -243,6 +260,16 @@ static enum ice_media_type ice_get_media_type(struct ice_port_info *pi)
                case ICE_PHY_TYPE_LOW_100GBASE_CR_PAM4:
                case ICE_PHY_TYPE_LOW_100GBASE_CP2:
                        return ICE_MEDIA_DA;
+               case ICE_PHY_TYPE_LOW_25G_AUI_C2C:
+               case ICE_PHY_TYPE_LOW_40G_XLAUI:
+               case ICE_PHY_TYPE_LOW_50G_LAUI2:
+               case ICE_PHY_TYPE_LOW_50G_AUI2:
+               case ICE_PHY_TYPE_LOW_50G_AUI1:
+               case ICE_PHY_TYPE_LOW_100G_AUI4:
+               case ICE_PHY_TYPE_LOW_100G_CAUI4:
+                       if (ice_is_media_cage_present(pi))
+                               return ICE_MEDIA_DA;
+                       /* fall-through */
                case ICE_PHY_TYPE_LOW_1000BASE_KX:
                case ICE_PHY_TYPE_LOW_2500BASE_KX:
                case ICE_PHY_TYPE_LOW_2500BASE_X:
@@ -260,6 +287,10 @@ static enum ice_media_type ice_get_media_type(struct ice_port_info *pi)
                }
        } else {
                switch (hw_link_info->phy_type_high) {
+               case ICE_PHY_TYPE_HIGH_100G_AUI2:
+                       if (ice_is_media_cage_present(pi))
+                               return ICE_MEDIA_DA;
+                       /* fall-through */
                case ICE_PHY_TYPE_HIGH_100GBASE_KR2_PAM4:
                        return ICE_MEDIA_BACKPLANE;
                }
@@ -364,163 +395,6 @@ ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse,
        return ICE_SUCCESS;
 }
 
-/**
- * ice_init_flex_flags
- * @hw: pointer to the hardware structure
- * @prof_id: Rx Descriptor Builder profile ID
- *
- * Function to initialize Rx flex flags
- */
-static void ice_init_flex_flags(struct ice_hw *hw, enum ice_rxdid prof_id)
-{
-       u8 idx = 0;
-
-       /* Flex-flag fields (0-2) are programmed with FLG64 bits with layout:
-        * flexiflags0[5:0] - TCP flags, is_packet_fragmented, is_packet_UDP_GRE
-        * flexiflags1[3:0] - Not used for flag programming
-        * flexiflags2[7:0] - Tunnel and VLAN types
-        * 2 invalid fields in last index
-        */
-       switch (prof_id) {
-       /* Rx flex flags are currently programmed for the NIC profiles only.
-        * Different flag bit programming configurations can be added per
-        * profile as needed.
-        */
-       case ICE_RXDID_FLEX_NIC:
-       case ICE_RXDID_FLEX_NIC_2:
-               ICE_PROG_FLG_ENTRY(hw, prof_id, ICE_FLG_PKT_FRG,
-                                  ICE_FLG_UDP_GRE, ICE_FLG_PKT_DSI,
-                                  ICE_FLG_FIN, idx++);
-               /* flex flag 1 is not used for flexi-flag programming, skipping
-                * these four FLG64 bits.
-                */
-               ICE_PROG_FLG_ENTRY(hw, prof_id, ICE_FLG_SYN, ICE_FLG_RST,
-                                  ICE_FLG_PKT_DSI, ICE_FLG_PKT_DSI, idx++);
-               ICE_PROG_FLG_ENTRY(hw, prof_id, ICE_FLG_PKT_DSI,
-                                  ICE_FLG_PKT_DSI, ICE_FLG_EVLAN_x8100,
-                                  ICE_FLG_EVLAN_x9100, idx++);
-               ICE_PROG_FLG_ENTRY(hw, prof_id, ICE_FLG_VLAN_x8100,
-                                  ICE_FLG_TNL_VLAN, ICE_FLG_TNL_MAC,
-                                  ICE_FLG_TNL0, idx++);
-               ICE_PROG_FLG_ENTRY(hw, prof_id, ICE_FLG_TNL1, ICE_FLG_TNL2,
-                                  ICE_FLG_PKT_DSI, ICE_FLG_PKT_DSI, idx);
-               break;
-
-       default:
-               ice_debug(hw, ICE_DBG_INIT,
-                         "Flag programming for profile ID %d not supported\n",
-                         prof_id);
-       }
-}
-
-/**
- * ice_init_flex_flds
- * @hw: pointer to the hardware structure
- * @prof_id: Rx Descriptor Builder profile ID
- *
- * Function to initialize flex descriptors
- */
-static void ice_init_flex_flds(struct ice_hw *hw, enum ice_rxdid prof_id)
-{
-       enum ice_prot_id protid_0, protid_1;
-       u16 offset_0, offset_1;
-       enum ice_flex_mdid mdid;
-
-       switch (prof_id) {
-       case ICE_RXDID_FLEX_NIC:
-       case ICE_RXDID_FLEX_NIC_2:
-               ICE_PROG_FLEX_ENTRY(hw, prof_id, ICE_MDID_RX_HASH_LOW, 0);
-               ICE_PROG_FLEX_ENTRY(hw, prof_id, ICE_MDID_RX_HASH_HIGH, 1);
-               ICE_PROG_FLEX_ENTRY(hw, prof_id, ICE_MDID_FLOW_ID_LOWER, 2);
-
-               mdid = (prof_id == ICE_RXDID_FLEX_NIC_2) ?
-                       ICE_MDID_SRC_VSI : ICE_MDID_FLOW_ID_HIGH;
-
-               ICE_PROG_FLEX_ENTRY(hw, prof_id, mdid, 3);
-
-               ice_init_flex_flags(hw, prof_id);
-               break;
-       case ICE_RXDID_COMMS_GENERIC:
-       case ICE_RXDID_COMMS_AUX_VLAN:
-       case ICE_RXDID_COMMS_AUX_IPV4:
-       case ICE_RXDID_COMMS_AUX_IPV6:
-       case ICE_RXDID_COMMS_AUX_IPV6_FLOW:
-       case ICE_RXDID_COMMS_AUX_TCP:
-               ICE_PROG_FLEX_ENTRY(hw, prof_id, ICE_MDID_RX_HASH_LOW, 0);
-               ICE_PROG_FLEX_ENTRY(hw, prof_id, ICE_MDID_RX_HASH_HIGH, 1);
-               ICE_PROG_FLEX_ENTRY(hw, prof_id, ICE_MDID_FLOW_ID_LOWER, 2);
-               ICE_PROG_FLEX_ENTRY(hw, prof_id, ICE_MDID_FLOW_ID_HIGH, 3);
-
-               if (prof_id == ICE_RXDID_COMMS_AUX_VLAN) {
-                       /* FlexiMD.4: VLAN1 - single or EVLAN (first for QinQ).
-                        * FlexiMD.5: VLAN2 - C-VLAN (second for QinQ).
-                        */
-                       protid_0 = ICE_PROT_EVLAN_O;
-                       offset_0 = 0;
-                       protid_1 = ICE_PROT_VLAN_O;
-                       offset_1 = 0;
-               } else if (prof_id == ICE_RXDID_COMMS_AUX_IPV4) {
-                       /* FlexiMD.4: IPHDR1 - IPv4 header word 4, "TTL" and
-                        * "Protocol" fields.
-                        * FlexiMD.5: IPHDR0 - IPv4 header word 0, "Ver",
-                        * "Hdr Len" and "Type of Service" fields.
-                        */
-                       protid_0 = ICE_PROT_IPV4_OF_OR_S;
-                       offset_0 = 8;
-                       protid_1 = ICE_PROT_IPV4_OF_OR_S;
-                       offset_1 = 0;
-               } else if (prof_id == ICE_RXDID_COMMS_AUX_IPV6) {
-                       /* FlexiMD.4: IPHDR1 - IPv6 header word 3,
-                        * "Next Header" and "Hop Limit" fields.
-                        * FlexiMD.5: IPHDR0 - IPv6 header word 0,
-                        * "Ver", "Traffic class" and high 4 bits of
-                        * "Flow Label" fields.
-                        */
-                       protid_0 = ICE_PROT_IPV6_OF_OR_S;
-                       offset_0 = 6;
-                       protid_1 = ICE_PROT_IPV6_OF_OR_S;
-                       offset_1 = 0;
-               } else if (prof_id == ICE_RXDID_COMMS_AUX_IPV6_FLOW) {
-                       /* FlexiMD.4: IPHDR1 - IPv6 header word 1,
-                        * 16 low bits of the "Flow Label" field.
-                        * FlexiMD.5: IPHDR0 - IPv6 header word 0,
-                        * "Ver", "Traffic class" and high 4 bits
-                        * of "Flow Label" fields.
-                        */
-                       protid_0 = ICE_PROT_IPV6_OF_OR_S;
-                       offset_0 = 2;
-                       protid_1 = ICE_PROT_IPV6_OF_OR_S;
-                       offset_1 = 0;
-               } else if (prof_id == ICE_RXDID_COMMS_AUX_TCP) {
-                       /* FlexiMD.4: TCPHDR - TCP header word 6,
-                        * "Data Offset" and "Flags" fields.
-                        * FlexiMD.5: Reserved
-                        */
-                       protid_0 = ICE_PROT_TCP_IL;
-                       offset_0 = 12;
-                       protid_1 = ICE_PROT_ID_INVAL;
-                       offset_1 = 0;
-               } else {
-                       protid_0 = ICE_PROT_ID_INVAL;
-                       offset_0 = 0;
-                       protid_1 = ICE_PROT_ID_INVAL;
-                       offset_1 = 0;
-               }
-
-               ICE_PROG_FLEX_ENTRY_EXTRACT(hw, prof_id,
-                                           protid_0, offset_0, 4);
-               ICE_PROG_FLEX_ENTRY_EXTRACT(hw, prof_id,
-                                           protid_1, offset_1, 5);
-
-               ice_init_flex_flags(hw, prof_id);
-               break;
-       default:
-               ice_debug(hw, ICE_DBG_INIT,
-                         "Field init for profile ID %d not supported\n",
-                         prof_id);
-       }
-}
-
 /**
  * ice_aq_set_mac_cfg
  * @hw: pointer to the HW struct
@@ -653,12 +527,11 @@ static void ice_cleanup_fltr_mgmt_struct(struct ice_hw *hw)
        ice_free(hw, sw);
 }
 
-
 /**
- * ice_get_itr_intrl_gran - determine int/intrl granularity
+ * ice_get_itr_intrl_gran
  * @hw: pointer to the HW struct
  *
- * Determines the itr/intrl granularities based on the maximum aggregate
+ * Determines the ITR/INTRL granularities based on the maximum aggregate
  * bandwidth according to the device's configuration during power-on.
  */
 static void ice_get_itr_intrl_gran(struct ice_hw *hw)
@@ -718,7 +591,6 @@ void ice_print_rollback_msg(struct ice_hw *hw)
                            &ver_lo);
        SNPRINTF(nvm_str, sizeof(nvm_str), "%x.%02x 0x%x %d.%d.%d", ver_hi,
                 ver_lo, hw->nvm.eetrack, oem_ver, oem_build, oem_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",
                 nvm_str, hw->fw_maj_ver, hw->fw_min_ver);
@@ -737,7 +609,6 @@ enum ice_status ice_init_hw(struct ice_hw *hw)
 
        ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__);
 
-
        /* Set MAC type based on DeviceID */
        status = ice_set_mac_type(hw);
        if (status)
@@ -747,14 +618,12 @@ enum ice_status ice_init_hw(struct ice_hw *hw)
                         PF_FUNC_RID_FUNCTION_NUMBER_M) >>
                PF_FUNC_RID_FUNCTION_NUMBER_S;
 
-
        status = ice_reset(hw, ICE_RESET_PFR);
        if (status)
                return status;
 
        ice_get_itr_intrl_gran(hw);
 
-
        status = ice_create_all_ctrlq(hw);
        if (status)
                goto err_unroll_cqinit;
@@ -776,7 +645,6 @@ enum ice_status ice_init_hw(struct ice_hw *hw)
 
        ice_clear_pxe_mode(hw);
 
-
        status = ice_get_caps(hw);
        if (status)
                goto err_unroll_cqinit;
@@ -797,7 +665,6 @@ enum ice_status ice_init_hw(struct ice_hw *hw)
                goto err_unroll_alloc;
 
        hw->evb_veb = true;
-
        /* Query the allocated resources for Tx scheduler */
        status = ice_sched_query_res_alloc(hw);
        if (status) {
@@ -806,7 +673,6 @@ enum ice_status ice_init_hw(struct ice_hw *hw)
                goto err_unroll_alloc;
        }
 
-
        /* Initialize port_info struct with scheduler data */
        status = ice_sched_init_port(hw->port_info);
        if (status)
@@ -845,7 +711,6 @@ enum ice_status ice_init_hw(struct ice_hw *hw)
        if (status)
                goto err_unroll_sched;
 
-
        /* Get MAC information */
        /* A single port can report up to two (LAN and WoL) addresses */
        mac_buf = ice_calloc(hw, 2,
@@ -862,15 +727,6 @@ enum ice_status ice_init_hw(struct ice_hw *hw)
 
        if (status)
                goto err_unroll_fltr_mgmt_struct;
-
-       ice_init_flex_flds(hw, ICE_RXDID_FLEX_NIC);
-       ice_init_flex_flds(hw, ICE_RXDID_FLEX_NIC_2);
-       ice_init_flex_flds(hw, ICE_RXDID_COMMS_GENERIC);
-       ice_init_flex_flds(hw, ICE_RXDID_COMMS_AUX_VLAN);
-       ice_init_flex_flds(hw, ICE_RXDID_COMMS_AUX_IPV4);
-       ice_init_flex_flds(hw, ICE_RXDID_COMMS_AUX_IPV6);
-       ice_init_flex_flds(hw, ICE_RXDID_COMMS_AUX_IPV6_FLOW);
-       ice_init_flex_flds(hw, ICE_RXDID_COMMS_AUX_TCP);
        /* Obtain counter base index which would be used by flow director */
        status = ice_alloc_fd_res_cntr(hw, &hw->fd_ctr_base);
        if (status)
@@ -927,7 +783,7 @@ void ice_deinit_hw(struct ice_hw *hw)
  */
 enum ice_status ice_check_reset(struct ice_hw *hw)
 {
-       u32 cnt, reg = 0, grst_delay;
+       u32 cnt, reg = 0, grst_delay, uld_mask;
 
        /* Poll for Device Active state in case a recent CORER, GLOBR,
         * or EMPR has occurred. The grst delay value is in 100ms units.
@@ -949,13 +805,20 @@ enum ice_status ice_check_reset(struct ice_hw *hw)
                return ICE_ERR_RESET_FAILED;
        }
 
-#define ICE_RESET_DONE_MASK    (GLNVM_ULD_CORER_DONE_M | \
-                                GLNVM_ULD_GLOBR_DONE_M)
+#define ICE_RESET_DONE_MASK    (GLNVM_ULD_PCIER_DONE_M |\
+                                GLNVM_ULD_PCIER_DONE_1_M |\
+                                GLNVM_ULD_CORER_DONE_M |\
+                                GLNVM_ULD_GLOBR_DONE_M |\
+                                GLNVM_ULD_POR_DONE_M |\
+                                GLNVM_ULD_POR_DONE_1_M |\
+                                GLNVM_ULD_PCIER_DONE_2_M)
+
+       uld_mask = ICE_RESET_DONE_MASK;
 
        /* Device is Active; check Global Reset processes are done */
        for (cnt = 0; cnt < ICE_PF_RESET_WAIT_COUNT; cnt++) {
-               reg = rd32(hw, GLNVM_ULD) & ICE_RESET_DONE_MASK;
-               if (reg == ICE_RESET_DONE_MASK) {
+               reg = rd32(hw, GLNVM_ULD) & uld_mask;
+               if (reg == uld_mask) {
                        ice_debug(hw, ICE_DBG_INIT,
                                  "Global reset processes done. %d\n", cnt);
                        break;
@@ -1055,7 +918,6 @@ enum ice_status ice_reset(struct ice_hw *hw, enum ice_reset_req req)
        wr32(hw, GLGEN_RTRIG, val);
        ice_flush(hw);
 
-
        /* wait for the FW to be ready */
        return ice_check_reset(hw);
 }
@@ -1126,8 +988,6 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
        return ICE_ERR_DOES_NOT_EXIST;
 }
 
-
-
 /**
  * ice_copy_rxq_ctx_to_hw
  * @hw: pointer to the hardware structure
@@ -1210,7 +1070,6 @@ ice_write_rxq_ctx(struct ice_hw *hw, struct ice_rlan_ctx *rlan_ctx,
        return ice_copy_rxq_ctx_to_hw(hw, ctx_buf, rxq_index);
 }
 
-#if !defined(NO_UNUSED_CTX_CODE) || defined(AE_DRIVER)
 /**
  * ice_clear_rxq_ctx
  * @hw: pointer to the hardware structure
@@ -1231,7 +1090,6 @@ enum ice_status ice_clear_rxq_ctx(struct ice_hw *hw, u32 rxq_index)
 
        return ICE_SUCCESS;
 }
-#endif /* !NO_UNUSED_CTX_CODE || AE_DRIVER */
 
 /* LAN Tx Queue Context */
 const struct ice_ctx_ele ice_tlan_ctx_info[] = {
@@ -1267,7 +1125,6 @@ const struct ice_ctx_ele ice_tlan_ctx_info[] = {
        { 0 }
 };
 
-#if !defined(NO_UNUSED_CTX_CODE) || defined(AE_DRIVER)
 /**
  * ice_copy_tx_cmpltnq_ctx_to_hw
  * @hw: pointer to the hardware structure
@@ -1448,8 +1305,6 @@ ice_clear_tx_drbell_q_ctx(struct ice_hw *hw, u32 tx_drbell_q_index)
 
        return ICE_SUCCESS;
 }
-#endif /* !NO_UNUSED_CTX_CODE || AE_DRIVER */
-
 
 /* FW Admin Queue command wrappers */
 
@@ -2271,7 +2126,6 @@ ice_aq_manage_mac_write(struct ice_hw *hw, const u8 *mac_addr, u8 flags,
 
        cmd->flags = flags;
 
-
        /* Prep values for flags, sah, sal */
        cmd->sah = HTONS(*((const u16 *)mac_addr));
        cmd->sal = HTONL(*((const u32 *)(mac_addr + 2)));
@@ -2308,7 +2162,6 @@ void ice_clear_pxe_mode(struct ice_hw *hw)
                ice_aq_clear_pxe_mode(hw);
 }
 
-
 /**
  * ice_get_link_speed_based_on_phy_type - returns link speed
  * @phy_type_low: lower part of phy_type
@@ -2977,7 +2830,6 @@ ice_aq_set_mac_loopback(struct ice_hw *hw, bool ena_lpbk, struct ice_sq_cd *cd)
        return ice_aq_send_cmd(hw, &desc, NULL, 0, cd);
 }
 
-
 /**
  * ice_aq_set_port_id_led
  * @pi: pointer to the port information
@@ -2998,7 +2850,6 @@ ice_aq_set_port_id_led(struct ice_port_info *pi, bool is_orig_mode,
 
        ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_set_port_id_led);
 
-
        if (is_orig_mode)
                cmd->ident_mode = ICE_AQC_PORT_IDENT_LED_ORIG;
        else
@@ -3486,7 +3337,6 @@ ice_aq_move_recfg_lan_txq(struct ice_hw *hw, u8 num_qs, bool is_move,
        return status;
 }
 
-
 /* End of FW Admin Queue command wrappers */
 
 /**
@@ -3710,9 +3560,6 @@ ice_set_ctx(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
        return ICE_SUCCESS;
 }
 
-
-
-
 /**
  * ice_read_byte - read context byte into struct
  * @src_ctx:  the context structure to read from
@@ -4176,8 +4023,6 @@ ice_cfg_vsi_lan(struct ice_port_info *pi, u16 vsi_handle, u8 tc_bitmap,
                              ICE_SCHED_NODE_OWNER_LAN);
 }
 
-
-
 /**
  * ice_replay_pre_init - replay pre initialization
  * @hw: pointer to the HW struct
@@ -4375,7 +4220,6 @@ ice_stat_update_repc(struct ice_hw *hw, u16 vsi_handle, bool prev_stat_loaded,
        cur_stats->rx_errors += error_cnt;
 }
 
-
 /**
  * ice_sched_query_elem - query element information from HW
  * @hw: pointer to the HW struct