From: Xiao Wang Date: Thu, 22 Jun 2017 11:20:03 +0000 (-0700) Subject: net/fm10k: initialize link status in device start X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=20c0a0c4e8c6cd626a93f2a4b0cdc3cb2a36b6ac;p=dpdk.git net/fm10k: initialize link status in device start Fm10k host driver can't manage PHY directly and provides a fake link status by always reporting LINK_UP. We should initialize link status in device start, otherwise application will get LINK_DOWN status when LSC configured. Fixes: 9ae6068c86da ("fm10k: add dev start/stop") Cc: stable@dpdk.org Signed-off-by: Xiao Wang Acked-by: Jing Chen --- diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index 7172a0f06b..e60d3a365b 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -84,6 +84,7 @@ static void fm10k_rx_queue_release(void *queue); static void fm10k_set_rx_function(struct rte_eth_dev *dev); static void fm10k_set_tx_function(struct rte_eth_dev *dev); static int fm10k_check_ftag(struct rte_devargs *devargs); +static int fm10k_link_update(struct rte_eth_dev *dev, int wait_to_complete); struct fm10k_xstats_name_off { char name[RTE_ETH_XSTATS_NAME_SIZE]; @@ -1166,6 +1167,8 @@ fm10k_dev_start(struct rte_eth_dev *dev) if (!(dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_VMDQ_FLAG)) fm10k_vlan_filter_set(dev, hw->mac.default_vid, true); + fm10k_link_update(dev, 0); + return 0; }