patches for DPDK stable branches
 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 08/19] net/ngbe: keep PHY power down while device probing
Date: Tue, 18 Jun 2024 15:11:39 +0800	[thread overview]
Message-ID: <20240618071150.21564-9-jiawenwu@trustnetic.com> (raw)
In-Reply-To: <20240618071150.21564-1-jiawenwu@trustnetic.com>

The internal PHY will be set to default power down after LAN reset,
but the external PHY will not. To keep the PHY behavior consistent,
set PHY power down uniformly here.

Fixes: 708ebe7d0399 ("net/ngbe: fix external PHY power down")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/base/ngbe_devids.h | 1 +
 drivers/net/ngbe/base/ngbe_hw.c     | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/net/ngbe/base/ngbe_devids.h b/drivers/net/ngbe/base/ngbe_devids.h
index 83eedf423e..e1efa62015 100644
--- a/drivers/net/ngbe/base/ngbe_devids.h
+++ b/drivers/net/ngbe/base/ngbe_devids.h
@@ -83,6 +83,7 @@
 #define NGBE_YT8521S_SFP_GPIO			0x0062
 #define NGBE_INTERNAL_YT8521S_SFP_GPIO		0x0064
 #define NGBE_LY_YT8521S_SFP			0x0070
+#define NGBE_RGMII_FPGA				0x0080
 #define NGBE_WOL_SUP				0x4000
 #define NGBE_NCSI_SUP				0x8000
 
diff --git a/drivers/net/ngbe/base/ngbe_hw.c b/drivers/net/ngbe/base/ngbe_hw.c
index 22ccdb0b7d..4dced0d328 100644
--- a/drivers/net/ngbe/base/ngbe_hw.c
+++ b/drivers/net/ngbe/base/ngbe_hw.c
@@ -173,6 +173,9 @@ s32 ngbe_reset_hw_em(struct ngbe_hw *hw)
 	ngbe_reset_misc_em(hw);
 	hw->mac.clear_hw_cntrs(hw);
 
+	if (!((hw->sub_device_id & NGBE_OEM_MASK) == NGBE_RGMII_FPGA))
+		hw->phy.set_phy_power(hw, false);
+
 	msec_delay(50);
 
 	/* Store the permanent mac address */
-- 
2.27.0


  parent reply	other threads:[~2024-06-18  7:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240618071150.21564-1-jiawenwu@trustnetic.com>
2024-06-18  7:11 ` [PATCH 01/19] net/txgbe: fix to parse tunnel packets Jiawen Wu
2024-06-18  7:11 ` [PATCH 02/19] net/txgbe: fix flow filters in VT mode Jiawen Wu
2024-06-18  7:11 ` [PATCH 03/19] net/txgbe: fix Tx hang on queue disable Jiawen Wu
2024-06-18  7:11 ` [PATCH 04/19] net/txgbe: restrict the configuration of VLAN strip offload Jiawen Wu
2024-06-18  7:11 ` [PATCH 05/19] net/txgbe: reconfigure more MAC Rx registers Jiawen Wu
2024-06-18  7:11 ` [PATCH 06/19] net/txgbe: fix VF promiscuous and allmulticast Jiawen Wu
2024-06-18  7:11 ` [PATCH 07/19] net/ngbe: special config for YT8531SH-CA PHY Jiawen Wu
2024-06-18  7:11 ` Jiawen Wu [this message]
2024-06-18  7:11 ` [PATCH 10/19] net/txgbe: fix hotplug remove Jiawen Wu
2024-06-18  7:11 ` [PATCH 11/19] net/ngbe: " Jiawen Wu
2024-06-18  7:11 ` [PATCH 12/19] net/txgbe: correct valid MTU range Jiawen Wu
2024-06-18  7:11 ` [PATCH 13/19] net/ngbe: " Jiawen Wu
2024-06-18  7:11 ` [PATCH 14/19] net/txgbe: fix memory leak Jiawen Wu
2024-06-18  7:11 ` [PATCH 15/19] net/ngbe: " Jiawen Wu
2024-06-18  7:11 ` [PATCH 16/19] net/txgbe: fix Rx interrupt Jiawen Wu
     [not found] <20240617095319.16664-1-jiawenwu@trustnetic.com>
2024-06-17  9:53 ` [PATCH 08/19] net/ngbe: keep PHY power down while device probing 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=20240618071150.21564-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).