ixgbe: initialize link status on initialization
authorStephen Hemminger <stephen@networkplumber.org>
Sat, 27 Dec 2014 17:41:35 +0000 (09:41 -0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 27 Jan 2015 11:36:24 +0000 (12:36 +0100)
The link_status variable is not set when device is initialized.
This can lead to problems with link never being reported as up
if using some SFP modules where the link is instantly on.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
lib/librte_pmd_ixgbe/ixgbe_ethdev.c

index e36cdf5..07b72d7 100644 (file)
@@ -1514,6 +1514,8 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
        err = ixgbe_check_link(hw, &speed, &link_up, 0);
        if (err)
                goto error;
+       dev->data->dev_link.link_status = link_up;
+
        err = ixgbe_get_link_capabilities(hw, &speed, &negotiate);
        if (err)
                goto error;