Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp373238pxj; Thu, 20 May 2021 11:16:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7aUuyISR7SYolgipzF0MiTqWTBgK/hl9DZjaFs1s2BvXFKGhLO1HMUvwBOmBA/J/Rl85O X-Received: by 2002:a02:6c46:: with SMTP id w67mr7622330jab.41.1621534614519; Thu, 20 May 2021 11:16:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621534614; cv=none; d=google.com; s=arc-20160816; b=QOIcj/c1jqPVNYJN141usNuMCRT5zx/aBnthJz6tDAQhWWjhPCPzDH52weA6v4H7Me SC2dN4e0cOxJwzauyOlN7yZft7Ss9Wjb8C8Aer4i008LIlJxCkzbazFzxTUEpn2EPvPA 8RftxInzdtlOr9M7Q8NVJbWJ1gMI+idcs5tCyfs4R5VQDIjLXa00yj/Zid4JiLyoU23E EgzSVtkg23RMnNrzVWLVA1JnNfdgA1oZBFPELv9HRbFTPeRYS9iCj1Bxd5eE8QwFv8hS nLjPtsPYgG+EQTKj8zHCOQG5TuRmWHw+xIkBbZ+yaUQUQZj4NvE4NTEoDbN/SNGC8A2h HCuA== 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=Xv9QFUoEXgBioKgAPLuHbte3Y1gCSB5T7qCd/pWiucU=; b=ce1opEINphbfDrszz06mpIYaCQtB3nfM7VV9FbJZcdlMaz+GiOTQ05Bdr2e/0X8tW/ zAlV5JL78VUhugA9/c8E5DL1u3adSXYPWSJKh2fpq+eFsa3EswwlRnx0YAHhHIO1DL/N oxaG1E1qLp7K/+yhdj36NCv89EaG2HQROg/bMbAqz+MeJeSy8j20BAEBJKSSOnocg+tc CV8LGcq4rfB15dR/8LRB4dc73qvJ+TFO/lO/yqQjeb1qVfwGtZrZKCfKHVsdXc0kFGoC SVNxfC4+hAtACWhpvHporiEqFCkrU4R8qcZ1SCCqymrYQrUpXG+8Ln60D0eF+RaYwVnW /+WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=doSPsqgv; 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 c15si2989733ilo.151.2021.05.20.11.16.41; Thu, 20 May 2021 11:16:54 -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=doSPsqgv; 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 S235676AbhETKQ2 (ORCPT + 99 others); Thu, 20 May 2021 06:16:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:42308 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235672AbhETKHZ (ORCPT ); Thu, 20 May 2021 06:07:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5883A61945; Thu, 20 May 2021 09:41:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621503709; bh=D+bkgRJxQO/b+9lGgmG3j2SvcHf6Wk6c7K2LayJa5OQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=doSPsqgvEJd6gNlvAuP043gLJNxz9AdYCeRKFfdIdWBuywIOpx4NwNe8AwYaXosp1 2DhQjMOksXJ5fHAov3RjPpHCmf6ZbxaW30/j/bRJ4bvrQYpsco9lwTEzOy0GeDR3Po xmLj2Rguw68RylQiugIWv7H6SQELJYMtcIVrebEk= 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 4.19 345/425] net: hns3: disable phy loopback setting in hclge_mac_start_phy Date: Thu, 20 May 2021 11:21:54 +0200 Message-Id: <20210520092142.749544235@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092131.308959589@linuxfoundation.org> References: <20210520092131.308959589@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 03491e8ebb73..d0fa344f0a84 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c @@ -235,6 +235,8 @@ void hclge_mac_start_phy(struct hclge_dev *hdev) if (!phydev) return; + phy_loopback(phydev, false); + phy_start(phydev); } -- 2.30.2