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: sta...@dpdk.org Signed-off-by: Jiawen Wu <jiawe...@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