Skip to content

Commit

Permalink
net/txgbe: fix link up and down
Browse files Browse the repository at this point in the history
[ upstream commit 2e1ecb4 ]

Add hw->dev_start status in the flow of setting link up/down, to avoid
obtaining link status inconsistent with the settings.

Fixes: 12a653e ("net/txgbe: fix link status when device stopped")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
  • Loading branch information
Jiawen Wu authored and kevintraynor committed Feb 21, 2022
1 parent 5969118 commit 42960ce
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/txgbe/txgbe_ethdev.c
Expand Up @@ -1937,6 +1937,7 @@ txgbe_dev_set_link_up(struct rte_eth_dev *dev)
} else {
/* Turn on the laser */
hw->mac.enable_tx_laser(hw);
hw->dev_start = true;
txgbe_dev_link_update(dev, 0);
}

Expand All @@ -1957,6 +1958,7 @@ txgbe_dev_set_link_down(struct rte_eth_dev *dev)
} else {
/* Turn off the laser */
hw->mac.disable_tx_laser(hw);
hw->dev_start = false;
txgbe_dev_link_update(dev, 0);
}

Expand Down

0 comments on commit 42960ce

Please sign in to comment.