Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp479725pxj; Tue, 18 May 2021 07:39:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8lPOV2qV3zDopZkaO+CyNzlc6WpVPEIXeXMm7/TJxmAx+o1wYaKZshPYPODOJk4JuUiaH X-Received: by 2002:a05:6402:1295:: with SMTP id w21mr7269823edv.60.1621348762397; Tue, 18 May 2021 07:39:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621348762; cv=none; d=google.com; s=arc-20160816; b=FTeGA6TZ4f6MuAPSfTU7bF1yvbwS7bgGBMiPU1/oc7MDHlgwW02hdFrkAbSDfykkkX T5maAd0k6mBTL+oqweMGnyKJryvROdBXr0Sfxpn8CWSsW/fLuzPHbAVadDdRvvWnILC5 7kDoaKI8chsmCa46fKAb8bYNAMHELs+X3XWzmyhOMOU7Yo1UI82388CVLE90B3ghmKX2 D7Zm4UPflAKtZvztPM0L/+GQYoQLSok9Fp7E0p1XpUiZv+DAuGGLDnWMgi6bSu3wkLsY u9f1amn0kVeLX0bTdF483JVrxjcPQD9fiFx0DzjzYwTijwAkKHAk6qpsuqG05uWZFcUJ d8Cg== 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=uk3dElIcM2ZrpmcQ+vcI6S1nKlk6ZC7JHkOeQ5SnSKY=; b=KJiRa54/n7bQHtoR+OT8rE8Tguue7Ki1gzjL0tgPNeRzMyY9S6AMqLAL3U1lMKhNZg 7sx9f2Hr8QMr4P1yyIVMi/qDzHeND5GV2NOypg8xFydAON+ffg8cTCJKKUvyioLOfBTt rT5q3wil/3hDVc3lN1cpqA2tkqpzR8fHzOKQfv6l9XTR6BL+Z1rsfQsyiJl6DYhkay9c lWFvvlKBnKbhM2Ng5+wzmSVnBffQ1Gf4FHmDeuSb94twCQNNCrr6glF92M86O1xAK1cn s+CiWKNXW0hnLry2qD/d4vthBK+4lwsOpIAuT2mG346zvNFUMUtGBCf8RsD2pfCA65AQ 9ExA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=X9pGwQMT; 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 d11si203096edq.190.2021.05.18.07.38.57; Tue, 18 May 2021 07:39:22 -0700 (PDT) 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=X9pGwQMT; 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 S1344857AbhEQPpp (ORCPT + 99 others); Mon, 17 May 2021 11:45:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:54844 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245647AbhEQPaO (ORCPT ); Mon, 17 May 2021 11:30:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 22E0961CC3; Mon, 17 May 2021 14:37:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621262271; bh=Y/n4T2711BR/Em/i97lCqubjvDBR4y1g7v/IQE6yZ64=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X9pGwQMTkwQ60DLm9BSpr36rnOqXdsGPwMnU5kjXihfeDwtSZThOAhUUH4AuYC+Sx /RjMRziHGpMC+Sea8ZKT/tYdWQu/BpFMNhGwUaqnh3WvAA8Va01Ioya5f4LXQwlmep UGOSQ0BLR7uiP+LG6qUyk4YBP+CVf5g1PCWj9ohU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yufeng Mo , Huazhong Tan , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 150/289] net: hns3: disable phy loopback setting in hclge_mac_start_phy Date: Mon, 17 May 2021 16:01:15 +0200 Message-Id: <20210517140310.198749264@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140305.140529752@linuxfoundation.org> References: <20210517140305.140529752@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: Yufeng Mo [ Upstream commit 472497d0bdae890a896013332a0b673f9acdf2bf ] If selftest and reset are performed at the same time, the phy loopback setting may be still in enable state after the reset, and device cannot link up. So fix this issue by disabling phy loopback before phy_start(). Fixes: 256727da7395 ("net: hns3: Add MDIO support to HNS3 Ethernet driver for hip08 SoC") Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c index e89820702540..c194bba187d6 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c @@ -255,6 +255,8 @@ void hclge_mac_start_phy(struct hclge_dev *hdev) if (!phydev) return; + phy_loopback(phydev, false); + phy_start(phydev); } -- 2.30.2