Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3978496pxb; Tue, 2 Mar 2021 03:42:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/AJbCzU8j/QmWGfB/hPbfmmMtKn5UnXh0F0EcC+qyxNNI+S+bwSa4HCO6UGVSicKQIG63 X-Received: by 2002:aa7:c7c8:: with SMTP id o8mr9668233eds.176.1614685374886; Tue, 02 Mar 2021 03:42:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614685374; cv=none; d=google.com; s=arc-20160816; b=cgAqsFJzeeYDF7niGcu2AvU7v0Fx4PK9YmfCOgdIwiUmnoTXWlFRyD6p/eLaY1PukR xnqugrdrEm8AMvYFXlb85SQWDS3uwhZ97XLB5giyrEByhAgcDss+6pSFO0rU20YW+8Qd 84Vq/XmdufIRvugPMtm+9bx+EsopGbVpZeL1w7DLEvRgf2ywRH/YFjK0+OsfORAAcL1r x4o338jPneFftBzwJj0Q2uFX6FMPtcImhK3YmZTu5EWB1id4YtY/gwyhBLy1fJH0FrF4 a8UF2jyo+j/jVPa6TecwIBQv7/T4lgLsk+K+h8/DtRTPq9GveccSq3UgLD+tgXwBO3KE WBhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aoqOiJ57OXKHJfRRSl6KbYdRhVrlu3xv/BR8Foc6lgo=; b=xFfJu3LTc2I6DzThWHZcb0dTKsuKj0UMFhEisdXo8eoILxRTJKnymBNGQpZXfdD0Eo QZctaEJX8OkhXxBQLMqzrEUP1ePh8ydmQZyDPzxyyyb29l0zE83vh/aQUKdPxIyL/k77 EYLA54sIAKfVaZ2uK7+6lPUYtVBjMN033P1M3wTolmq5GQDAJ4fFq3KEwg7WTIC20UlR o9wOKt2IGyCdQqWySSjHSlBBnfgNiYuD0tLMV6c6bvLw2FEG4SYtwGjH3wV4ha31NV3I 3sXFThYQSavCyBtJ+fFGljQBw+cBkwFY+/8uu5cLvjTjMYhNjvHAX3xMLkh3Hbzb/SKu O8vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=k01oHBfA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c21si12314516edt.47.2021.03.02.03.42.31; Tue, 02 Mar 2021 03:42:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=k01oHBfA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241952AbhCBCKr (ORCPT + 99 others); Mon, 1 Mar 2021 21:10:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:51202 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242164AbhCATfd (ORCPT ); Mon, 1 Mar 2021 14:35:33 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8257D65010; Mon, 1 Mar 2021 17:10:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614618646; bh=zTCer9CEjzzvigX66N3JVX3LNdsvI6xdRW08i/j+1S4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k01oHBfAad1BU9WNSUgIBMWMGUH2ztZ4mfMlYc2Jp8UA7fmLY70qy1CqiJ7cO/cTv QrgMMg6jbCQZtbfDBCN1q8fjDNmnDCTZpBg4Wu/T7/eG5V71nPm+vBlf7uxtH1k4wM la7yFlGZ/mH0CYMO9PXjOflIQpNxfmpXAL7U3aw4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sudheesh Mavila , Shyam Sundar S K , Tom Lendacky , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 133/663] net: amd-xgbe: Fix network fluctuations when using 1G BELFUSE SFP Date: Mon, 1 Mar 2021 17:06:21 +0100 Message-Id: <20210301161148.332958239@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161141.760350206@linuxfoundation.org> References: <20210301161141.760350206@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shyam Sundar S K [ Upstream commit 9eab3fdb419916f66a72d1572f68d82cd9b3f963 ] 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 Signed-off-by: Sudheesh Mavila Signed-off-by: Shyam Sundar S K Acked-by: Tom Lendacky Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c index d3f72faecd1da..18e48b3bc402b 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c @@ -922,6 +922,9 @@ static bool xgbe_phy_belfuse_phy_quirks(struct xgbe_prv_data *pdata) 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); -- 2.27.0