From: Jiawen Wu <jiawenwu@trustnetic.com>
To: dev@dpdk.org
Cc: Jiawen Wu <jiawenwu@trustnetic.com>, stable@dpdk.org
Subject: [PATCH 8/9] net/txgbe: fix to set link up and down
Date: Tue, 8 Feb 2022 18:11:28 +0800 [thread overview]
Message-ID: <20220208101129.69173-9-jiawenwu@trustnetic.com> (raw)
In-Reply-To: <20220208101129.69173-1-jiawenwu@trustnetic.com>
Add hw->dev_start status in the flow of setting link up/down, to avoid
obtaining link status inconsistent with the settings.
Fixes: 12a653eb53e1 ("net/txgbe: fix link status when device stopped")
Cc: stable@dpdk.org
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/txgbe_ethdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 4799a60116..6bc209e661 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -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);
}
@@ -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);
}
--
2.21.0.windows.1
next prev parent reply other threads:[~2022-02-08 10:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-08 10:11 [PATCH 0/9] Wangxun fixes and supports Jiawen Wu
2022-02-08 10:11 ` [PATCH 1/9] net/ngbe: fix failed to receive packets Jiawen Wu
2022-02-08 10:11 ` [PATCH 2/9] net/ngbe: fix link interrupt sometimes lost Jiawen Wu
2022-02-08 10:11 ` [PATCH 3/9] net/ngbe: fix Tx pending Jiawen Wu
2022-02-08 17:38 ` Ferruh Yigit
2022-02-08 10:11 ` [PATCH 4/9] net/ngbe: fix RxTx packet statistics Jiawen Wu
2022-02-08 17:38 ` Ferruh Yigit
2022-02-08 10:11 ` [PATCH 5/9] net/ngbe: optimize the PHY initialization process Jiawen Wu
2022-02-08 17:39 ` Ferruh Yigit
2022-02-09 2:38 ` Jiawen Wu
2022-02-08 10:11 ` [PATCH 6/9] net/ngbe: add support to custom PHY interfaces Jiawen Wu
2022-02-08 17:41 ` Ferruh Yigit
2022-02-09 6:17 ` Jiawen Wu
2022-02-08 10:11 ` [PATCH 7/9] net: add LED OEM support for wangxun devices Jiawen Wu
2022-02-08 17:41 ` Ferruh Yigit
2022-02-08 10:11 ` Jiawen Wu [this message]
2022-02-08 10:11 ` [PATCH 9/9] net/txgbe: fix KR auto-negotiation Jiawen Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220208101129.69173-9-jiawenwu@trustnetic.com \
--to=jiawenwu@trustnetic.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).