Received: by 10.213.65.68 with SMTP id h4csp1030873imn; Wed, 21 Mar 2018 00:20:33 -0700 (PDT) X-Google-Smtp-Source: AG47ELsI8KpdvnXzxpCeoKfYRb7azNh7IjbOtAqBYBibRNkkRpvOOuotuww/uFqKaPntOYmZS2Aj X-Received: by 2002:a17:902:bb81:: with SMTP id m1-v6mr19210854pls.71.1521616833232; Wed, 21 Mar 2018 00:20:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521616833; cv=none; d=google.com; s=arc-20160816; b=xgyea1vzJMzLpW9oI5rzcicAourBXRAKaHJi/FHkVnd2b3+InmZHFtgbI5078OQoNv tAtwYXXczsObMZ73gTHNucBqS//36NaIDm7cKJVQX0BoYDkdY+u3wJv5OURh9ySna7Ws Oj/Bt9r9qoNf8bSwgW1tWQ0NYzp5yXxepMJ0WyhUAr54ifRQgDsoysl82QHbScwRH4Fc 8KxJkyJapLdf3UPSCLyCpNVZ6Ggk5ozPVGsR5bYm5ETc75SUsz6demt6+VNxuQWwYm47 Q0grnV3ppuqBMQfjkeRh1mM/9J5aQUNufevGk5YbGU/npLjdIO8xWxkOl6LHjMvO54h/ YN3A== 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=6u4droLI4N9WdXsYRhWhYSdvGttSN/EsGpFt00bo30s=; b=GGf1BBL+fYejTUs1a5q/VGQFVYOQupSY0AYCKyDhzbuoo03hllMhyV3ljdLH5s+YhW xzGg/AZqIAAFwgK/LT8/dXSx34o/Xe6X+xG5ZV88OtnrZXLTYtayRI/PNz02k0RVtZ4e r4tuSf+90zyVdmqFozlmoySh42nDw/sxL4BW4SJicMxlGbZgCb982BCXYiIC4jGRP8Lm c1+UMlI/+W6LMTzBGzHTBZyDpaXVBGit477rtXQQwxYsIlBUI7bKu2RhPNiULI/1bSwF n6qG0dtEYjVDuy2XltR10m8t2bUgDA6ie0cpUv7ioVfZfGzqf6mZfY5S4aHLZJ1WzTbk J2/Q== 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 q4si2376900pgc.746.2018.03.21.00.20.04; Wed, 21 Mar 2018 00:20:33 -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 S1751817AbeCUHSf (ORCPT + 99 others); Wed, 21 Mar 2018 03:18:35 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6665 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751542AbeCUHST (ORCPT ); Wed, 21 Mar 2018 03:18:19 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 5C065786FD934; Wed, 21 Mar 2018 15:18:01 +0800 (CST) Received: from linux-ioko.site (10.71.200.31) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.361.1; Wed, 21 Mar 2018 15:17:54 +0800 From: Peng Li To: CC: , , , , Subject: [PATCH net-next 09/11] net: hns3: add get_link support to VF Date: Wed, 21 Mar 2018 15:49:28 +0800 Message-ID: <1521618570-129694-10-git-send-email-lipeng321@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1521618570-129694-1-git-send-email-lipeng321@huawei.com> References: <1521618570-129694-1-git-send-email-lipeng321@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.71.200.31] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Fuyun Liang This patch adds ethtool_ops.get_link support to VF. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 1 + drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c index 502f347..513d8d6 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c @@ -1053,6 +1053,7 @@ static const struct ethtool_ops hns3vf_ethtool_ops = { .get_channels = hns3_get_channels, .get_coalesce = hns3_get_coalesce, .set_coalesce = hns3_set_coalesce, + .get_link = hns3_get_link, }; static const struct ethtool_ops hns3_ethtool_ops = { diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c index 14b0e26..f917a1e 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c @@ -1468,6 +1468,13 @@ static void hclgevf_get_tqps_and_rss_info(struct hnae3_handle *handle, *max_rss_size = hdev->rss_size_max; } +static int hclgevf_get_status(struct hnae3_handle *handle) +{ + struct hclgevf_dev *hdev = hclgevf_ae_get_hdev(handle); + + return hdev->hw.mac.link; +} + static const struct hnae3_ae_ops hclgevf_ops = { .init_ae_dev = hclgevf_init_ae_dev, .uninit_ae_dev = hclgevf_uninit_ae_dev, @@ -1500,6 +1507,7 @@ static const struct hnae3_ae_ops hclgevf_ops = { .set_vlan_filter = hclgevf_set_vlan_filter, .get_channels = hclgevf_get_channels, .get_tqps_and_rss_info = hclgevf_get_tqps_and_rss_info, + .get_status = hclgevf_get_status, }; static struct hnae3_ae_algo ae_algovf = { -- 2.9.3