#define ICE_PF_RESET_WAIT_COUNT 200
-
/**
* ice_set_mac_type - Sets MAC type
* @hw: pointer to the HW structure
return status;
}
-
/**
* ice_clear_pf_cfg - Clear PF configuration
* @hw: pointer to the hardware structure
ETH_ALEN, ICE_DMA_TO_NONDMA);
break;
}
-
return ICE_SUCCESS;
}
cmd = &desc.params.get_link_topo;
- if (!cmd)
- return ICE_ERR_PARAM;
-
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_free(hw, sw);
}
-
/**
* ice_get_itr_intrl_gran
* @hw: pointer to the HW struct
&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);
ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__);
-
/* Set MAC type based on DeviceID */
status = ice_set_mac_type(hw);
if (status)
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;
ice_clear_pxe_mode(hw);
-
status = ice_get_caps(hw);
if (status)
goto err_unroll_cqinit;
goto err_unroll_alloc;
hw->evb_veb = true;
-
/* Query the allocated resources for Tx scheduler */
status = ice_sched_query_res_alloc(hw);
if (status) {
goto err_unroll_alloc;
}
-
/* Initialize port_info struct with scheduler data */
status = ice_sched_init_port(hw->port_info);
if (status)
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,
*/
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.
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;
wr32(hw, GLGEN_RTRIG, val);
ice_flush(hw);
-
/* wait for the FW to be ready */
return ice_check_reset(hw);
}
return ICE_ERR_DOES_NOT_EXIST;
}
-
-
/**
* ice_copy_rxq_ctx_to_hw
* @hw: pointer to the hardware structure
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
return ICE_SUCCESS;
}
-#endif /* !NO_UNUSED_CTX_CODE || AE_DRIVER */
/* LAN Tx Queue Context */
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
return ICE_SUCCESS;
}
-#endif /* !NO_UNUSED_CTX_CODE || AE_DRIVER */
-
/* FW Admin Queue command wrappers */
cmd->flags = flags;
-
/* Prep values for flags, sah, sal */
cmd->sah = HTONS(*((const u16 *)mac_addr));
cmd->sal = HTONL(*((const u32 *)(mac_addr + 2)));
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
return ice_aq_send_cmd(hw, &desc, NULL, 0, cd);
}
-
/**
* ice_aq_set_port_id_led
* @pi: pointer to the port information
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
return status;
}
-
/* End of FW Admin Queue command wrappers */
/**
return ICE_SUCCESS;
}
-
-
-
/**
* ice_read_byte - read context byte into struct
* @src_ctx: the context structure to read from
ICE_SCHED_NODE_OWNER_LAN);
}
-
-
/**
* ice_replay_pre_init - replay pre initialization
* @hw: pointer to the HW struct
cur_stats->rx_errors += error_cnt;
}
-
/**
* ice_sched_query_elem - query element information from HW
* @hw: pointer to the HW struct