[07/24] net/axgbe: check fluctuations for 1G BELFUSE SFP

Message ID 20240412125249.10625-7-VenkatKumar.Ande@amd.com (mailing list archive)
State Changes Requested
Delegated to: Ferruh Yigit
Series [01/24] net/axgbe: remove use of comm_owned field |


Context Check Description
ci/checkpatch success coding style OK

Commit Message

Venkat Kumar Ande April 12, 2024, 12:52 p.m. UTC
  Frequent link up/down events can happen when a Bel Fuse SFP part is
connected to the amd-xgbe device. Try to avoid the frequent link
issues by resetting the PHY as documented in Bel Fuse SFP datasheets.

Signed-off-by: Venkat Kumar Ande <VenkatKumar.Ande@amd.com>
 drivers/net/axgbe/axgbe_phy_impl.c | 3 +++
 1 file changed, 3 insertions(+)


diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index 968ff1f867..1ccb95334e 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -563,6 +563,9 @@  static bool axgbe_phy_belfuse_parse_quirks(struct axgbe_port *pdata)
 	/* For Bel-Fuse, use the extra AN flag */
 	pdata->an_again = 1;
+	/* Reset PHY - wait for self-clearing reset bit to clear */
+	pdata->phy_if.phy_impl.reset(pdata);
 	if (!memcmp(&sfp_eeprom->base[AXGBE_SFP_BASE_VENDOR_PN],
 		phy_data->sfp_base = AXGBE_SFP_BASE_1000_SX;