From: Jiawen Wu <jiawenwu@trustnetic.com>
To: dev@dpdk.org
Cc: Jiawen Wu <jiawenwu@trustnetic.com>, stable@dpdk.org
Subject: [PATCH 8/9] net/ngbe: fix YT PHY mixed mode occasionally failing link
Date: Fri, 2 Sep 2022 11:00:10 +0800 [thread overview]
Message-ID: <20220902030011.377523-9-jiawenwu@trustnetic.com> (raw)
In-Reply-To: <20220902030011.377523-1-jiawenwu@trustnetic.com>
Add to read link status register of UTP mode, to ensure link status of
mixed mode, for YT PHY.
Fixes: 1c44384fce76 ("net/ngbe: support custom PHY interfaces")
Cc: stable@dpdk.org
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/ngbe/base/ngbe_phy_yt.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/net/ngbe/base/ngbe_phy_yt.c b/drivers/net/ngbe/base/ngbe_phy_yt.c
index 562a0dede5..c88946f7c3 100644
--- a/drivers/net/ngbe/base/ngbe_phy_yt.c
+++ b/drivers/net/ngbe/base/ngbe_phy_yt.c
@@ -463,7 +463,16 @@ s32 ngbe_check_phy_link_yt(struct ngbe_hw *hw,
if (phy_link) {
*link_up = true;
+ } else {
+ status = ngbe_read_phy_reg_mdi(hw, YT_SPST, 0, &phy_data);
+ phy_link = phy_data & YT_SPST_LINK;
+ phy_speed = phy_data & YT_SPST_SPEED_MASK;
+
+ if (phy_link)
+ *link_up = true;
+ }
+ if (*link_up) {
if (phy_speed == YT_SPST_SPEED_1000M)
*speed = NGBE_LINK_SPEED_1GB_FULL;
else if (phy_speed == YT_SPST_SPEED_100M)
--
2.27.0
next prev parent reply other threads:[~2022-09-02 3:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-02 3:00 [PATCH 0/9] Wangxun fixes and supports Jiawen Wu
2022-09-02 3:00 ` [PATCH 1/9] net/txgbe: fix IPv6 rule in flow director Jiawen Wu
2022-09-02 3:00 ` [PATCH 2/9] net/txgbe: fix OEM customized LED Jiawen Wu
2022-09-02 3:00 ` [PATCH 3/9] net/txgbe: remove semaphore between SW/FW Jiawen Wu
2022-09-02 3:00 ` [PATCH 4/9] net/txgbe: rename some extended statistic Jiawen Wu
2022-09-02 3:00 ` [PATCH 5/9] net/ngbe: " Jiawen Wu
2022-09-02 3:00 ` [PATCH 6/9] net/ngbe: remove semaphore between SW/FW Jiawen Wu
2022-09-02 3:00 ` [PATCH 7/9] net/ngbe: fix max frame size Jiawen Wu
2022-09-02 3:00 ` Jiawen Wu [this message]
2022-09-02 3:00 ` [PATCH 9/9] net/ngbe: support to set link down/up Jiawen Wu
2022-09-21 11:46 ` Ferruh Yigit
2022-09-13 1:55 ` [PATCH 0/9] Wangxun fixes and supports Jiawen Wu
2022-09-21 11:48 ` Ferruh Yigit
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=20220902030011.377523-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).