From a7082768655a16294a78b68be97e6997be59d778 Mon Sep 17 00:00:00 2001 From: Chas Williams Date: Tue, 13 Feb 2018 17:56:18 -0500 Subject: [PATCH] net/ixgbe: update link status on start dev->data->eth_link isn't updated until the first interrupt. If a link is carrier down, then this interrupt may never happen. Before we finished starting the PMD, call ixgbe_dev_link_update() to ensure we have a valid status. Signed-off-by: Chas Williams Acked-by: Qi Zhang --- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 8295ca69f8..752a17af0a 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -2634,6 +2634,8 @@ ixgbe_dev_start(struct rte_eth_dev *dev) if (err) goto error; + ixgbe_dev_link_update(dev, 0); + skip_link_setup: if (rte_intr_allow_others(intr_handle)) { @@ -4975,6 +4977,8 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) ixgbevf_dev_rxtx_start(dev); + ixgbevf_dev_link_update(dev, 0); + /* check and configure queue intr-vector mapping */ if (rte_intr_cap_multiple(intr_handle) && dev->data->dev_conf.intr_conf.rxq) { -- 2.20.1