Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3066671pxj; Mon, 17 May 2021 16:55:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvn4obrysNdRtCbSWY2z7ui7+UB7wE7kwJo8Hw2OOJRfmKzZdvgpTjsG0mKU0gv3ksW363 X-Received: by 2002:a17:906:3949:: with SMTP id g9mr2735890eje.7.1621295751823; Mon, 17 May 2021 16:55:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621295751; cv=none; d=google.com; s=arc-20160816; b=KBzLcAMrY7FnTG/qFJ0wc8+jqXvwb50YwSw4tX8yBxeNJhj7slZfisjuYPm68F+Q+/ +McpDA3N46tEav9/BOOEeaRxMZhOFatUKKei9C18t02E1EkTaVEb5+1OK37RQVUJ9MFC M5xF57K9NJz5wp+n5e5tD7f7xJhaizDv69O38RZNZI5m8k9sg30D4sJpITQKyHth2fjR Uy6G/jjhcfBg3KicruvW/VhgAgHmurOlqEs6aVMU4VE9bqGABLHC2Z+wzaX0HbDKRqGy FY6fAaNdDKpcXS6d/PbFNZ7dnoES6A7zkHGrDDtAEicsXczJZvkBdCryg7fhkrEDt0o+ W21w== 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=XfYKpP2wW2P+rrAuTE9Kp+dWLEHulDtUwHKF5ZgKBBIGWFmRItB8uXP+sbaPw4t/Io 1IBcUpt7rLqL0LORJEeDW7emJN8HGR8JVymyqovEnatNCsqVViuPPTAzd3Y17iCJBLe1 hACv78seXnmwtd21evvbxG4r8tE0c1hbXd+XlHOcym5bvFr64EZf/28EuGnV7awi/pfm O1o79rQLtOtw1/uq5xlXOhp3K5Gs+HJsvU4XrR+HUSqu0siC63QAHgqGeUWTwTYMdzou o/+csEARdCDE7xf5ZFTTr/FvpFORnG/dj9X2Wum0JeK7xP5xXngsIhyiIfrtibnqqJqE 9o0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Aay3TZi4; 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 l18si9431841edv.57.2021.05.17.16.55.28; Mon, 17 May 2021 16:55:51 -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=Aay3TZi4; 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 S239620AbhEQOYa (ORCPT + 99 others); Mon, 17 May 2021 10:24:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:60192 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233863AbhEQOVN (ORCPT ); Mon, 17 May 2021 10:21:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D3A7E61074; Mon, 17 May 2021 14:11:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621260695; bh=Y/n4T2711BR/Em/i97lCqubjvDBR4y1g7v/IQE6yZ64=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Aay3TZi4aOGiosY2JozEsG6Z3tzQhxbbURxv7zVLtPvh68A7ELyNyxhId/ENpGMeS Ej66a94pY8NiIJ4MGAxpK8fHqlGh1M6FeTUW8BDI/mEIuMDqoz//D7LoZEjg1oU5/C gLLObTO86mevBUnBDZEU2R57x4bjiEDdywBjzCUI= 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.12 198/363] net: hns3: disable phy loopback setting in hclge_mac_start_phy Date: Mon, 17 May 2021 16:01:04 +0200 Message-Id: <20210517140309.282841137@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.508966430@linuxfoundation.org> References: <20210517140302.508966430@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