net/ice: fix link up when starting device
authorYunjian Wang <wangyunjian@huawei.com>
Tue, 25 Jan 2022 01:39:07 +0000 (09:39 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Tue, 25 Jan 2022 01:41:23 +0000 (02:41 +0100)
Currently, there is a possibility that the link status is not correct
after set link up, the device ID is 159b. It would be fixed by calling
ice_link_update() while the parameter 'wait_to_complete' is true. It's
reasonable to wait for complete right after set link up as it is not
in an link status change interrupt handling scenario.

Fixes: cf911d90e366 ("net/ice: support link update")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/ice/ice_ethdev.c

index 6d85e42..d01acb8 100644 (file)
@@ -3610,7 +3610,7 @@ ice_dev_start(struct rte_eth_dev *dev)
        ice_dev_set_link_up(dev);
 
        /* Call get_link_info aq command to enable/disable LSE */
-       ice_link_update(dev, 0);
+       ice_link_update(dev, 1);
 
        pf->adapter_stopped = false;