Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp716039imm; Thu, 13 Sep 2018 06:44:43 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb3Dq+OYptDcoEadlTmYxWJD6ehbaFDGsS6k1PhBr+0q2bCsOtDgi5P/as1uzhIiGTIw44M X-Received: by 2002:a63:cc4f:: with SMTP id q15-v6mr7274299pgi.217.1536846283537; Thu, 13 Sep 2018 06:44:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536846283; cv=none; d=google.com; s=arc-20160816; b=NVkqwe7QyKuFslyeUlAiOFIXEjXfO24kE7d6c3gYEgefOEAafXkoShZumjxNAH3yOq RwYcq1A30nMVk1tR+ptcpOZkpCuXq9o3xx45us2cBVkWP6ZDgj44Izzim0znWv6t1C8Z Kt/gkoB9vzuxUyDciE9dwkyMvx6i53Itms4FYKRuqxgXlGfHWssrmh+tstR5M7RVugT+ XtlHUPlHy1ehCP7uYHlDGNFR2ZHz65vy20pF7449LOk5gYw4PFjNR1R7zZhslPQ8y0fC 1BDdcO7L6Gnfxc9fFa4icYSMl4s4FXp6wshtU9dfzPDmFNYf17FcupqZMqcdsUCXLwc6 /67Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=2bIHNG5X6b98AEzBhy8cVMqYANacABRivvrYGa2dr3k=; b=e9h7xngEpIA4gyJIFy9hdqeHy8y0FUawJ9wTGIyY26FJZQfZmiQlinxexejk5iqSVz XdCxTJx9bPQxhoskmjBFFKnFHn5oyUSW9e7eIALF3QZ69HdKDJ9hpX0kFWlIdv7nwS6J jn562kxSL3p2BQA5hvWOI7LiXRZlc8Dz29FM767dvdLN9TVqKUjP1pesT9GCDBijZSG5 M3xpVpsSa8PibYLL7gBgA6cuoBAivRkIZPwKtUi0N9ukhbuVF606zCnBAKbAls/9EHKz dkHS/K89/gyXzBWFwFKKKiYMZnef9CB7UzKPaXYNa0riSJCaaHvSgvt1Os2/dMET9TxQ 5Eow== 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 a140-v6si4219660pfa.61.2018.09.13.06.44.28; Thu, 13 Sep 2018 06:44:43 -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 S1729994AbeIMSxw (ORCPT + 99 others); Thu, 13 Sep 2018 14:53:52 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:60508 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728768AbeIMSxv (ORCPT ); Thu, 13 Sep 2018 14:53:51 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 4D04ACF3; Thu, 13 Sep 2018 13:44:18 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jian Shen , Peng Li , Salil Mehta , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 047/115] net: hns3: Fix for phy link issue when using marvell phy driver Date: Thu, 13 Sep 2018 15:31:07 +0200 Message-Id: <20180913131826.540735769@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131823.327472833@linuxfoundation.org> References: <20180913131823.327472833@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jian Shen [ Upstream commit 60081dcc4fce385ade26d3145b2479789df0b7e5 ] 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c @@ -187,6 +187,8 @@ int hclge_mac_start_phy(struct hclge_dev if (!phydev) return 0; + phydev->supported &= ~SUPPORTED_FIBRE; + ret = phy_connect_direct(netdev, phydev, hclge_mac_adjust_link, PHY_INTERFACE_MODE_SGMII);