net/ixgbe: set fixed flag for exact link speed
Setting exact link speed makes sense if auto-negotiation is disabled. Fixed flag is required to disable auto-negotiation. Signed-off-by: Guinan Sun <guinanx.sun@intel.com> Acked-by: Ting Xu <ting.xu@intel.com> Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
This commit is contained in:
parent
dc73db27bb
commit
34e7360960
@ -2559,17 +2559,6 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
|
||||
|
||||
PMD_INIT_FUNC_TRACE();
|
||||
|
||||
/* IXGBE devices don't support:
|
||||
* - half duplex (checked afterwards for valid speeds)
|
||||
* - fixed speed: TODO implement
|
||||
*/
|
||||
if (dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED) {
|
||||
PMD_INIT_LOG(ERR,
|
||||
"Invalid link_speeds for port %u, fix speed not supported",
|
||||
dev->data->port_id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Stop the link setup handler before resetting the HW. */
|
||||
rte_eal_alarm_cancel(ixgbe_dev_setup_link_alarm_handler, dev);
|
||||
|
||||
@ -2725,7 +2714,11 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
|
||||
}
|
||||
|
||||
link_speeds = &dev->data->dev_conf.link_speeds;
|
||||
if (*link_speeds & ~allowed_speeds) {
|
||||
|
||||
/* Ignore autoneg flag bit and check the validity of
|
||||
* link_speed
|
||||
*/
|
||||
if (((*link_speeds) >> 1) & ~(allowed_speeds >> 1)) {
|
||||
PMD_INIT_LOG(ERR, "Invalid link setting");
|
||||
goto error;
|
||||
}
|
||||
@ -4169,7 +4162,8 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
|
||||
link.link_status = ETH_LINK_DOWN;
|
||||
link.link_speed = ETH_SPEED_NUM_NONE;
|
||||
link.link_duplex = ETH_LINK_HALF_DUPLEX;
|
||||
link.link_autoneg = ETH_LINK_AUTONEG;
|
||||
link.link_autoneg = !(dev->data->dev_conf.link_speeds &
|
||||
ETH_LINK_SPEED_FIXED);
|
||||
|
||||
hw->mac.get_link_status = true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user