Received: by 10.223.164.200 with SMTP id h8csp679990wrb; Sun, 5 Nov 2017 18:32:41 -0800 (PST) X-Google-Smtp-Source: ABhQp+R/cOTIZ4diMRS5wu865TY/BZASHj10Fo6TBUjmWBobD1ChImGmCwSi60OnWsCx76S/6YAT X-Received: by 10.98.249.5 with SMTP id o5mr15314971pfh.54.1509935561247; Sun, 05 Nov 2017 18:32:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509935561; cv=none; d=google.com; s=arc-20160816; b=gi0AiqROgeKXRrnHV4BHh+PhbpCvCo+jPm3WRhgnPnKytcvkjrGLhMSSKptv2KQFmw cpu9BHHmqdNn3rhMRlLTHVvmXMF32i0M8jpQvO4f9Y0W8eL7hhCKnSvkbB2z0EBf1k3w IClEaMgu/qFhaexIHt/nHhwTy//368RBA38UBt4nuBnpp58DXC9mDhJjG5BhesTne3+7 V4ypn9EzSUjlt9N8OiPVFPHcKa7QXf1LWKCUVEMgmH7pjvP4SbFG+0WU5FOJNuh2FscJ 1VNdWwq4UzgJm3UIsbRXNjrteGAK54D2JxKtfR1o69EJIv0RedGFP/4kHxkxTzl/GtG1 RwFg== 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:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:arc-authentication-results; bh=bLZWWoh0NBmrgRFI3u16tC0rDwll5cyDYko/giX4muc=; b=DoXYfXIJjkI0Hkje2cQBIVQ0AOdxtZ6pgrfAG6BmmjVXG5fplPepw44+LX7wMt+8ct qXX5fU839uCcV6pwIBaNBfZ3jo7Yrq74ZihT0ub/z/naIGigs8I/TZV3OaX8Gzdw4y27 wXfaceIaFhUzVtyGYk5ztdPzJeOnFfGKhDIWr1oE9vY7q/l2p+DhTWtu3nPL+ykcg1Ir l0TZBOzbLNhPIRRnb3KoVYfBWkIoBDoaMVjJQF2C/zz9kdpOxDE3rxqliPeb1vQo57A8 Jhyhgf5bHnYtITOUnql1R/mEwHAnnUq4nG9WdhhM08RTyX5QsdpzA9uozQFRb9MuzFQ7 LfoA== 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 v143si10194794pgb.209.2017.11.05.18.32.27; Sun, 05 Nov 2017 18:32:41 -0800 (PST) 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 S1751942AbdKFCaj (ORCPT + 96 others); Sun, 5 Nov 2017 21:30:39 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:10012 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751734AbdKFCaN (ORCPT ); Sun, 5 Nov 2017 21:30:13 -0500 Received: from 172.30.72.58 (EHLO DGGEMS409-HUB.china.huawei.com) ([172.30.72.58]) by dggrg05-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id DKL06991; Mon, 06 Nov 2017 10:30:07 +0800 (CST) Received: from [127.0.0.1] (10.63.173.108) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.361.1; Mon, 6 Nov 2017 10:28:59 +0800 Subject: Re: [PATCH net-next 4/6] net: hns3: add support for set_link_ksettings To: Florian Fainelli , References: <1509682710-94908-1-git-send-email-lipeng321@huawei.com> <1509682710-94908-5-git-send-email-lipeng321@huawei.com> <926ca4e8-78af-d442-38c5-bf38141051b5@gmail.com> CC: , , , From: "lipeng (Y)" Message-ID: <7f3846c6-0725-2cae-b1e6-f4519234331a@huawei.com> Date: Mon, 6 Nov 2017 10:28:58 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <926ca4e8-78af-d442-38c5-bf38141051b5@gmail.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.63.173.108] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090202.59FFC931.0027,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: e9c88317ee2afdf070776cbdac9c0f1f Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017/11/4 3:52, Florian Fainelli wrote: > On 11/02/2017 09:18 PM, Lipeng wrote: >> From: Fuyun Liang >> >> This patch adds set_link_ksettings support for ethtool cmd. >> >> Signed-off-by: Fuyun Liang >> Signed-off-by: Lipeng >> --- >> drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 11 +++++++++++ >> 1 file changed, 11 insertions(+) >> >> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c >> index c7b8ebd..7fe193b 100644 >> --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c >> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c >> @@ -653,6 +653,16 @@ static int hns3_get_link_ksettings(struct net_device *netdev, >> return 0; >> } >> >> +static int hns3_set_link_ksettings(struct net_device *netdev, >> + const struct ethtool_link_ksettings *cmd) >> +{ >> + /* Only support ksettings_set for netdev with phy attached for now */ >> + if (netdev->phydev) >> + return phy_ethtool_ksettings_set(netdev->phydev, cmd); >> + >> + return -EOPNOTSUPP; > Consider using phy_ethtool_get_link_ksettings() which already checks for > netdev->phydev. agree, Thanks for your comment. as this patch has been applied to net-next, we will push another cleanup patch. From 1583075895004028493@xxx Fri Nov 03 19:53:41 +0000 2017 X-GM-THRID: 1583015474965024164 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread