DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jiawen Wu <jiawenwu@trustnetic.com>
To: dev@dpdk.org
Cc: Jiawen Wu <jiawenwu@trustnetic.com>, stable@dpdk.org
Subject: [PATCH 07/19] net/ngbe: special config for YT8531SH-CA PHY
Date: Mon, 17 Jun 2024 17:53:17 +0800	[thread overview]
Message-ID: <20240617095319.16664-8-jiawenwu@trustnetic.com> (raw)
In-Reply-To: <20240617095319.16664-1-jiawenwu@trustnetic.com>

YT8531SH-CA PHY will switch to SDS space automatically when UTP and
SDS media are not present, causing failure to link up. Add the special
configuration to fix it.

Fixes: 3d0af7066759 ("net/ngbe: setup PHY link")
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 | 4 ++++
 drivers/net/ngbe/base/ngbe_phy_yt.h | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/drivers/net/ngbe/base/ngbe_phy_yt.c b/drivers/net/ngbe/base/ngbe_phy_yt.c
index ea313cd9a5..a374b015fd 100644
--- a/drivers/net/ngbe/base/ngbe_phy_yt.c
+++ b/drivers/net/ngbe/base/ngbe_phy_yt.c
@@ -320,6 +320,10 @@ s32 ngbe_setup_phy_link_yt(struct ngbe_hw *hw, u32 speed,
 			value |= value_r4;
 			ngbe_write_phy_reg_mdi(hw, YT_ANA, 0, value);
 
+			/* config for yt8531sh-ca */
+			ngbe_write_phy_reg_ext_yt(hw, YT_SPEC_CONF, 0,
+						YT_SPEC_CONF_8531SH_CA);
+
 			/* software reset to make the above configuration
 			 * take effect
 			 */
diff --git a/drivers/net/ngbe/base/ngbe_phy_yt.h b/drivers/net/ngbe/base/ngbe_phy_yt.h
index ddf992e79a..c45bec7ce7 100644
--- a/drivers/net/ngbe/base/ngbe_phy_yt.h
+++ b/drivers/net/ngbe/base/ngbe_phy_yt.h
@@ -32,6 +32,8 @@
 #define YT_MISC				0xA006
 #define   YT_MISC_FIBER_PRIO		MS16(8, 0x1) /* 0 for UTP */
 #define   YT_MISC_RESV			MS16(0, 0x1)
+#define YT_SPEC_CONF			0xA023
+#define   YT_SPEC_CONF_8531SH_CA	0x4031
 
 /* SDS EXT */
 #define YT_AUTO				0xA5
-- 
2.27.0


  parent reply	other threads:[~2024-06-17  9:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-17  9:53 [PATCH 00/19] Wangxun fixes and supports Jiawen Wu
2024-06-17  9:53 ` [PATCH 01/19] net/txgbe: fix to parse tunnel packets Jiawen Wu
2024-06-17  9:53 ` [PATCH 02/19] net/txgbe: fix flow filters in VT mode Jiawen Wu
2024-06-17  9:53 ` [PATCH 03/19] net/txgbe: fix Tx hang on queue disable Jiawen Wu
2024-06-17  9:53 ` [PATCH 04/19] net/txgbe: restrict the configuration of VLAN strip offload Jiawen Wu
2024-06-17  9:53 ` [PATCH 05/19] net/txgbe: reconfigure more MAC Rx registers Jiawen Wu
2024-06-17  9:53 ` [PATCH 06/19] net/txgbe: fix VF promiscuous and allmulticast Jiawen Wu
2024-06-17  9:53 ` Jiawen Wu [this message]
2024-06-17  9:53 ` [PATCH 08/19] net/ngbe: keep PHY power down while device probing Jiawen Wu
2024-06-17  9:53 ` [PATCH 09/19] net/ngbe: add WOL and NCSI capability Jiawen Wu
2024-06-18  6:48   ` David Marchand
2024-06-18  7:11     ` Jiawen Wu
2024-06-18  7:11 [PATCH 00/19] Wangxun fixes and supports Jiawen Wu
2024-06-18  7:11 ` [PATCH 07/19] net/ngbe: special config for YT8531SH-CA PHY 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=20240617095319.16664-8-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).