From patchwork Tue Apr 30 11:39:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 163103 Delivered-To: patch@linaro.org Received: by 2002:a92:7e86:0:0:0:0:0 with SMTP id q6csp3116973ill; Tue, 30 Apr 2019 04:48:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqzU0S79LYhQu6cjkOB9VJ3pCvbmHYeCVvXw++wBBAqi9ilkuBEs1MxwK4XsCWXuew9oRyWy X-Received: by 2002:a17:902:b589:: with SMTP id a9mr44861627pls.66.1556624882347; Tue, 30 Apr 2019 04:48:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556624882; cv=none; d=google.com; s=arc-20160816; b=ObhUoICTfDycQINna6/MVS7F72NgHwsQDoj5tf9uLJ2t/mhIfuBrH5FmttyNuxJnph lWfxgnMThoS+IPqbtl2kfPcw4W41KE1ZmAU6yrpW1sbz98Ehune6QfEmOZc3HIvXPayb sAoJR3n+nJlbdEbx+LGRB7aBmbPBe/TCvOgg6rSED8RFddGXIpHAuL93wDDrc/r+dyDS 8Ki1Xd9C0LwXSmLUxEKq4HxwEPBMHBOO+BCqc8gvoLLlp/diCCxx0k/pNsu2CIqmFCa6 flfneJ8+wQd9zteFIYfpggGAV5nyCX07Ckxtilb7eQlwL7nF1KuMONjdllAOflSZTjYT LQVw== 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:dkim-signature; bh=PIMUeIIKv3RixluFUflwDNGwl1gPh51io9RzreQBZMA=; b=OXbKjmVRwJuRiH/pklwg2VC3UE/ZE+xan4tEyRDawJbNZOkuOSMVlzBxIkghcevu80 H3H/Lf59KpphyxrpmMphMQIt4I4Ukk5G5aMuGtngQ7YTfRjURe8XtUgQImrCUN4hoBKn UmFr4G6BMuV/W2VG0mL2qp0c6mVYVIGqP2t+LE7jDn+mVFr5hyVpfyCbo+sXng30G/v/ lKj/tHSJRZCt4E4ABen2w2mtiI4gJLYLJhnVZCvfEZ+1mCRgvSEcrpXv93E+IdiJ+HtN A5hOQTBAUpjZIcxjgqrJkJIGAVghVpkEkwmLSx9mHDSmXxDO1q/dHhXfPy1Ga7oJFA+g yE5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=htdQ6KY5; 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 v11si11197632plo.205.2019.04.30.04.48.02; Tue, 30 Apr 2019 04:48:02 -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; dkim=pass header.i=@kernel.org header.s=default header.b=htdQ6KY5; 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 S1730781AbfD3LsA (ORCPT + 30 others); Tue, 30 Apr 2019 07:48:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:33752 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730772AbfD3Lr4 (ORCPT ); Tue, 30 Apr 2019 07:47:56 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2510E2054F; Tue, 30 Apr 2019 11:47:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556624875; bh=yge4E7KebFg2Quye//YHCc98uYDAOoFCwRnlY9Uh2dw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=htdQ6KY5tN52tz+9B6MQ2wb61xNYIqiZz+uxWAb7Vz3a1+fvndfEPrLAaZyH0YnMr opofe0DO+Y1onQO/yEvG86jj8tYGZgLXUNLODMh4MOey3gy5niCJ3HNkWk50V4qDfz rlFknkB9FxrZtRDdbKzweHonLTbmp9zREr3Zy/MA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yonglong Liu , Jun Xiao Subject: [PATCH 4.19 094/100] net: hns: Fix WARNING when hns modules installed Date: Tue, 30 Apr 2019 13:39:03 +0200 Message-Id: <20190430113613.268465382@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190430113608.616903219@linuxfoundation.org> References: <20190430113608.616903219@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jun Xiao Commit dfdf26babc98 upstream this patch need merge to 4.19.y stable kernel Fix Conflict:already fixed the confilct dfdf26babc98 with Yonglong Liu stable candidate:user cannot connect to the internet via hns dev by default setting without this patch we have already verified this patch on kunpeng916 platform, and it works well. Signed-off-by: Yonglong Liu Signed-off-by: Jun Xiao Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/hisilicon/hns/hns_enet.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) --- a/drivers/net/ethernet/hisilicon/hns/hns_enet.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_enet.c @@ -1169,6 +1169,12 @@ int hns_nic_init_phy(struct net_device * if (!h->phy_dev) return 0; + phy_dev->supported &= h->if_support; + phy_dev->advertising = phy_dev->supported; + + if (h->phy_if == PHY_INTERFACE_MODE_XGMII) + phy_dev->autoneg = false; + if (h->phy_if != PHY_INTERFACE_MODE_XGMII) { phy_dev->dev_flags = 0; @@ -1180,15 +1186,6 @@ int hns_nic_init_phy(struct net_device * if (unlikely(ret)) return -ENODEV; - phy_dev->supported &= h->if_support; - phy_dev->advertising = phy_dev->supported; - - if (h->phy_if == PHY_INTERFACE_MODE_XGMII) - phy_dev->autoneg = false; - - if (h->phy_if == PHY_INTERFACE_MODE_SGMII) - phy_stop(phy_dev); - return 0; }