Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp885265pxb; Wed, 3 Mar 2021 19:42:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJwNCD9xlpZgSZRCr1Ao99YlLB/XtVhKzhlhA3MqgbOXDW2WZRLIVTB16zZsH/fAEqTaQB1y X-Received: by 2002:a17:906:d8d3:: with SMTP id re19mr2060826ejb.440.1614829361719; Wed, 03 Mar 2021 19:42:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614829361; cv=none; d=google.com; s=arc-20160816; b=dH0wYI9qxMCBc7EmbjmG4XW5QYjtl/svwIPAjVZSTQhdDR9lvZ3yXTCvIc8JHcjdNa E7CFiRwzPk3U3kKmn2kfi0UQhEAAIe5QELtsBPizRp39E9muk6bqS1G33yNs3Qx0EPyO eiLrh0fqHzLbD309Neop7APQxxBWjmNY34HFtjtce93FVIcTLq630uItzGgVxOvrxvKF Keq2JrezwjhPc4oS1RcQKXBIy/DpOy0SV65nYKmGq/LyQIM7vwI8lJ0pqpSFE8zlHvd7 p23SuO9bbgiZQv7lxH5Sa5uTYIBzOStv23uBLpOqAJryYFWP3rOv3WGhby/zYO2veyxj jNAw== 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=BLZz5vdyqVwlKPMwbXT5VGwL6GwqUQ3i+PQuXEPDDD8=; b=PN1H9FAi2JzbXv3C1+Q9NkvLoYaLXIlEaJbNEklsgsvPvLPphY6lSUZ5nkkkwHICEp Ml7oEArYRAgfvmjCo3YnYaeVWAO2fCFRNSThMozEjINY1ZM4m7JBcgfzjOI5Xpd0jAZY Wfy9FomjSQv7Yqn2CPIpF8S528OIRGHEWj7V0nMIJ7cTY/PN4Vzxw6Q7ZxOAEB5zgigg 0JijILuoxrbSae7QnESXk7IoaY815Vg2BxVLlDB3zedWzSUxQSJCXz37C7OocZYUVQeD rHc+a8KKlPRaJQFUEP44co7wLSif+QmqrLAibiH4/+ZORKkL2exl0ZEkXZNh6TT/iCwU VRxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=a8HXnER4; 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 h19si2237480edb.134.2021.03.03.19.42.19; Wed, 03 Mar 2021 19:42:41 -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=a8HXnER4; 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 S1379702AbhCBBak (ORCPT + 99 others); Mon, 1 Mar 2021 20:30:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:43774 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241288AbhCATS4 (ORCPT ); Mon, 1 Mar 2021 14:18:56 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 179C564EC6; Mon, 1 Mar 2021 16:38:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614616715; bh=OM5otCY188Tdzt1LZzQFuh8666Jfaz3kboPyyro1mVQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a8HXnER4bF/cD2vwlb5t4sq5+c+Pw0CdgZAaIFJXczfQg4pctOOBqr/vhMQ4hamfy csE41F9HtRMmn1v4vCh+Pbx6qCj/f2K6/paucDlLOGvNgThrc5JyMFOK+55dHjHQTu L4gbZGVD2IuNInu76QoXCMgBgKqF4fggfjFLKy+Y= 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 4.19 071/247] net: amd-xgbe: Fix network fluctuations when using 1G BELFUSE SFP Date: Mon, 1 Mar 2021 17:11:31 +0100 Message-Id: <20210301161035.161862212@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161031.684018251@linuxfoundation.org> References: <20210301161031.684018251@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 1a617d6d2bf86..54753c8a6a9d7 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c @@ -912,6 +912,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