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.
Fixes: e722ec82374b ("amd-xgbe: Update the BelFuse quirk to support SGMII")
Co-developed-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
        if ((phy_id & 0xfffffff0) != 0x03625d10)
                return false;
 
+       /* Reset PHY - wait for self-clearing reset bit to clear */
+       genphy_soft_reset(phy_data->phydev);
+
        /* Disable RGMII mode */
        phy_write(phy_data->phydev, 0x18, 0x7007);
        reg = phy_read(phy_data->phydev, 0x18);