Link status should be set as down when link is NACK.

Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF")

Signed-off-by: Yanglong Wu <yanglong...@intel.com>

---
v2:
no need to set link status again
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 997683d3b..3ffc72b40 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -3933,12 +3933,10 @@ ixgbevf_check_link(struct ixgbe_hw *hw, 
ixgbe_link_speed *speed,
        }
 
        if (no_pflink_check) {
-               if (*speed == IXGBE_LINK_SPEED_UNKNOWN)
+               if (*speed == IXGBE_LINK_SPEED_UNKNOWN) {
                        mac->get_link_status = true;
-               else
-                       mac->get_link_status = false;
-
-               goto out;
+                       goto out;
+               }
        }
        /* if the read failed it could just be a mailbox collision, best wait
         * until we are called again and don't report an error
-- 
2.11.0

Reply via email to