Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp730206imm; Thu, 13 Sep 2018 06:57:47 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ+IQI69RNCkwuj0Vr7y+jDbDdVPkdVh2AwfF8V/9qbS1OHPKHnIvsayE8lZjQ6yZ3jeGsA X-Received: by 2002:a17:902:286a:: with SMTP id e97-v6mr7496217plb.340.1536847067502; Thu, 13 Sep 2018 06:57:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536847067; cv=none; d=google.com; s=arc-20160816; b=uE1lA6X0Qp0Jbq8iGOHT//1neF20+KY6Iri1qwGew1NgacutHUeEaP2+EpXO6oZhFM o/KwaA9ThRZBLm+pvRJMOvXH+rUeERRXP/cPHx6cPmUFIZBAfC2jTJyIAZAed5kiRgqG W6/D97ZLUTX1mQOWkxFmw7OIm46idy+FsTZGAZg4CefonN7LaPJlKX89/v0EWQYFxnqd zbWW9aofHBsWpalLz7lYH8yo3NiZ+nmBUdOPTT2DAKwfpPbUPa87A61ucT1oCPScUL6z TdPRndfrRj6XbHSi05i65N4zsA1F8jHDaK/f/DWtvxMcF8YItQLZEJUCwMT20SX155Wk iavA== 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=gGZ+6r79Mj+lPOkLtjuQEk1DK+sDI/hJPg9ni9nyOX4=; b=mlyyNwnFnXBPQEpCxeUXLIWW4uEwq+/RUp2YThjQhN9PzoH96jlNoZhFKN+chht7bK yB49l0xcyg++fgAp5eoxd+asPrNfsgVBLA0GP519SND67mrYp28Rtmw//8A1Av8EoZ7x nIa4YXU1OJ08g7XqFQ3X7s7VFICvhC4naiyQSEth+bYL8z+Dr8MVntQXRAApQraZnRls mZj7RUtmAqmH7r8FPhCS/Fd0ky3zFepUZM1cQ9k2VM6vHYGa9HSBQdNL4YpCq9ipYc5n r6WndhJo86JC7puwfY7WI7aln8eRivXmPDsn/sahKyvq46TfajZb+5y/GfKjt5KHSlht aRbQ== 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 o20-v6si4159077pgd.58.2018.09.13.06.57.32; Thu, 13 Sep 2018 06:57:47 -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 S1731343AbeIMTFm (ORCPT + 99 others); Thu, 13 Sep 2018 15:05:42 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34102 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730589AbeIMTFl (ORCPT ); Thu, 13 Sep 2018 15:05:41 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 0CA2FD10; Thu, 13 Sep 2018 13:56:04 +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.18 083/197] net: hns3: Fix for phy link issue when using marvell phy driver Date: Thu, 13 Sep 2018 15:30:32 +0200 Message-Id: <20180913131844.853111537@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131841.568116777@linuxfoundation.org> References: <20180913131841.568116777@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.18-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 @@ -208,6 +208,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);