| 2948 | } |
| 2949 | |
| 2950 | int |
| 2951 | i40e_dev_link_update(struct rte_eth_dev *dev, |
| 2952 | int wait_to_complete) |
| 2953 | { |
| 2954 | struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private); |
| 2955 | struct rte_eth_link link; |
| 2956 | bool enable_lse = dev->data->dev_conf.intr_conf.lsc ? true : false; |
| 2957 | int ret; |
| 2958 | |
| 2959 | memset(&link, 0, sizeof(link)); |
| 2960 | |
| 2961 | /* i40e uses full duplex only */ |
| 2962 | link.link_duplex = RTE_ETH_LINK_FULL_DUPLEX; |
| 2963 | link.link_autoneg = !(dev->data->dev_conf.link_speeds & |
| 2964 | RTE_ETH_LINK_SPEED_FIXED); |
| 2965 | |
| 2966 | if (!wait_to_complete && !enable_lse) |
| 2967 | update_link_reg(hw, &link); |
| 2968 | else |
| 2969 | update_link_aq(hw, &link, enable_lse, wait_to_complete); |
| 2970 | |
| 2971 | if (hw->switch_dev) |
| 2972 | rte_eth_linkstatus_get(hw->switch_dev, &link); |
| 2973 | |
| 2974 | ret = rte_eth_linkstatus_set(dev, &link); |
| 2975 | i40e_notify_all_vfs_link_status(dev); |
| 2976 | |
| 2977 | return ret; |
| 2978 | } |
| 2979 | |
| 2980 | static void |
| 2981 | i40e_stat_update_48_in_64(struct i40e_hw *hw, uint32_t hireg, |
no test coverage detected