[08/19] net/ngbe: keep PHY power down while device probing
Checks
Commit Message
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(+)
@@ -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
@@ -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 */