Received: by 2002:a4a:311b:0:0:0:0:0 with SMTP id k27-v6csp4693453ooa; Tue, 14 Aug 2018 09:16:09 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzBaZyEXMvA+ogV2TbdF/dekgFPW0ByxYnuVwSivAjOJ9ep9Te7gtyVlPaHvoX0SyHFRgUN X-Received: by 2002:a63:eb0e:: with SMTP id t14-v6mr21550480pgh.198.1534263369069; Tue, 14 Aug 2018 09:16:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534263369; cv=none; d=google.com; s=arc-20160816; b=L1O20D+snWlZ90Ym0vF6CSBM6VKuMQq/CxioP+8qDoClXd2dGkga6S0doeN6EJhDwz FGfWWDAjTX3t9DFVrHdt4LLjTKtvEBynzSxTRkpktXePtFw0KtaM5o/P5eZhsxSFbqvH 17UbDG7nib8rYzRX/LnNUvVYADFUvFtw/kNnFpWOnE+M49G/ByLCc5pAMOtkbWISThYk bwQ+1BBy6SMuB9KOaOWshf4rb0gWkFXme91xN0anoTVerRvx02GUITRc7xX4uV6AIp5E n0w568TH7CaL4wW4Sb+Hx/7iQBNtDDo0dgk3bv4icxiYXEMkL46JzYfGRZEhoFt4TELY x6Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=OSOIMfim0oFUnUUPKTJsN6W2c5gL9u7UD79wfwyJbKU=; b=jTeSaUCaxjJYrRt37CQ3YgJMkgHm+WcKolXeVe+Aa8uYfrFpPZ2WF/FbBMmtlTLLIv aM4kqw4rNiYwQZ+6+XPqDRVMXjGauZFkm5fmW3yhqohL/4HICEBQiQnSoSwh6Eb5XoHu NgtMMe3K8h/+3vK0DxKUDYnIXpR56/UktSGHAJnzIllOYPUECR1MJNMVHOJLCF6ES5Ss cK9gNpDbT7Z8FztknZJBXGmMWJChWpg+a1pR0nFxDfrd/r53b8e/FNd7YqMhAtVP4QZJ 7Q1bE/y7RAGGc4BkcNCy+iV3rIivLite9jYyx79iMFvy+zGIpxz/yLKRgVao7Mx8LsPJ zn4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l63-v6si21614263pfg.326.2018.08.14.09.15.54; Tue, 14 Aug 2018 09:16:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733067AbeHNTCN (ORCPT + 99 others); Tue, 14 Aug 2018 15:02:13 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:11109 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732514AbeHNTCK (ORCPT ); Tue, 14 Aug 2018 15:02:10 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 8B9B7B61671D1; Wed, 15 Aug 2018 00:14:16 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.202.226.54) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.399.0; Wed, 15 Aug 2018 00:14:08 +0800 From: Salil Mehta To: CC: , , , , , , , Jian Shen Subject: [PATCH V2 net-next 4/8] net: hns3: Fix for phy link issue when using marvell phy driver Date: Tue, 14 Aug 2018 17:13:15 +0100 Message-ID: <20180814161319.16392-5-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20180814161319.16392-1-salil.mehta@huawei.com> References: <20180814161319.16392-1-salil.mehta@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.202.226.54] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jian Shen For marvell phy m88e1510, bit SUPPORTED_FIBRE of phydev->supported is default on. Both phy_resume() and phy_suspend() will check the SUPPORTED_FIBRE bit and write register of fibre page. Currently in hns3 driver, the SUPPORTED_FIBRE bit will be cleared after phy_connect_direct() finished. Because phy_resume() is called in phy_connect_direct(), and phy_suspend() is called when disconnect phy device, so the operation for fibre page register is not symmetrical. It will cause phy link issue when reload hns3 driver. This patch fixes it by disable the SUPPORTED_FIBRE before connecting phy. Fixes: 256727da7395 ("net: hns3: Add MDIO support to HNS3 Ethernet driver for hip08 SoC") Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- 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 85a123d..398971a 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c @@ -202,6 +202,8 @@ int hclge_mac_connect_phy(struct hclge_dev *hdev) if (!phydev) return 0; + phydev->supported &= ~SUPPORTED_FIBRE; + ret = phy_connect_direct(netdev, phydev, hclge_mac_adjust_link, PHY_INTERFACE_MODE_SGMII); -- 2.7.4