diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 80fbcc847c..7726a89d99 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -12132,8 +12132,13 @@ i40e_set_mac_max_frame(struct rte_eth_dev *dev, uint16_t size) enum i40e_status_code status; bool can_be_set = true; - /* I40E_MEDIA_TYPE_BASET link up can be ignored */ - if (hw->phy.media_type != I40E_MEDIA_TYPE_BASET) { + /* + * I40E_MEDIA_TYPE_BASET link up can be ignored + * I40E_MEDIA_TYPE_BASET link down that hw->phy.media_type + * is I40E_MEDIA_TYPE_UNKNOWN + */ + if (hw->phy.media_type != I40E_MEDIA_TYPE_BASET && + hw->phy.media_type != I40E_MEDIA_TYPE_UNKNOWN) { do { update_link_reg(hw, &link); if (link.link_status)