From patchwork Fri Jul 6 10:27:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 141283 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2944658ljj; Fri, 6 Jul 2018 03:29:04 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcVQb3ajNHdqCTYL4smBK9JiLH0gqhO+LnHRhyUnw65GPxod1Uw9WhgmJVT9T7ghUZ+EJSq X-Received: by 2002:a63:314f:: with SMTP id x76-v6mr8770928pgx.373.1530872944627; Fri, 06 Jul 2018 03:29:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530872944; cv=none; d=google.com; s=arc-20160816; b=zdOdElKPwMhPzt+LvikwfYHvRH/0CutFVOyqUMxgzZT21PPBAZFLJkBohf195nihJ8 P2SmyDuhYQBRc4NtveupNXyzKmIBGbH+mfiKRpIgsFRAyOpB1br0HffzgkDtAJwDYalE PqFGMct9pCUK2Q975IBTU8CUpQZgFeW9lGInIFAPyiN/L52IgaHawsDrzFPm0j9/tz27 TQ9mixJNFBMETP9v1nrqEtE2i4KHTfgPehTWvrsnZVcoDSohyZ7xYhNGVAzIRw2ZtUnb Y89/iv9/XcRzq2lQhLf2sPh13v3h02KJ1fDAe9+xHWFZOzYtWG6dKQ5+8aZhkCvOacAO CNnw== 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=dRs2luLPirK4FQlI5FY4dVs3aws+rwgyvx9EMLP8iVA=; b=Z1rWfHHUcSH5XeTjR92yDx7fL3QLuVvInP2ZZHbAGcVzjXVOaKadEVp6ZkeMFTRxA6 He89Btt6F9g18mhrfspw+sKUMuVWSyQxRjAO0kERCywAv/3G+hoVUUYuFqBRJyEMMHvV Bcoljdkuen9mi0L3Mpon8Jg0F0bczEQ4KRKRWyeQ7HsGs+51kQg1H7KfV5/jl61pWBCq mT1D8tlZF5Pm4J+WgTeYqXVqwLej56CW9AU015aYUQ/QxA9SMTwfe4ABXWPkadBrWIMd 7UMTlHka4Sw//0pQ7KnpI5IoDUZL0ZKWJ2AgJ17EyynSGxjPnxs88h+4lcMnVkuRhYx6 /HCw== 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 e62-v6si8282948pfe.327.2018.07.06.03.29.04; Fri, 06 Jul 2018 03:29:04 -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 S932300AbeGFK3C (ORCPT + 30 others); Fri, 6 Jul 2018 06:29:02 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:55983 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753348AbeGFK27 (ORCPT ); Fri, 6 Jul 2018 06:28:59 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 2EA2AE23E89A4; Fri, 6 Jul 2018 18:28:56 +0800 (CST) Received: from S00293818-DELL1.huawei.com (10.202.226.54) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.382.0; Fri, 6 Jul 2018 18:28:49 +0800 From: Salil Mehta To: CC: , , , , , , , Yunsheng Lin Subject: [PATCH net-next 01/10] net: hns3: Fix tc setup when netdev is first up Date: Fri, 6 Jul 2018 11:27:55 +0100 Message-ID: <20180706102804.196-2-salil.mehta@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180706102804.196-1-salil.mehta@huawei.com> References: <20180706102804.196-1-salil.mehta@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.202.226.54] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yunsheng Lin Currently, tc related configuration is not setup when the netdev is first up, which cause the stack only using tc 0 problem. This patch fixes it by setting the tc related configuration using the info from NCL_CONFIG when netdev is first up. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 78 ++++++++++--------------- 1 file changed, 31 insertions(+), 47 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index f73c9df..e5e51e8 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -239,7 +239,28 @@ static int hns3_nic_set_real_num_queue(struct net_device *netdev) struct hnae3_handle *h = hns3_get_handle(netdev); struct hnae3_knic_private_info *kinfo = &h->kinfo; unsigned int queue_size = kinfo->rss_size * kinfo->num_tc; - int ret; + int i, ret; + + if (kinfo->num_tc <= 1) { + netdev_reset_tc(netdev); + } else { + ret = netdev_set_num_tc(netdev, kinfo->num_tc); + if (ret) { + netdev_err(netdev, + "netdev_set_num_tc fail, ret=%d!\n", ret); + return ret; + } + + for (i = 0; i < HNAE3_MAX_TC; i++) { + if (!kinfo->tc_info[i].enable) + continue; + + netdev_set_tc_queue(netdev, + kinfo->tc_info[i].tc, + kinfo->tc_info[i].tqp_count, + kinfo->tc_info[i].tqp_offset); + } + } ret = netif_set_real_num_tx_queues(netdev, queue_size); if (ret) { @@ -312,7 +333,9 @@ static int hns3_nic_net_up(struct net_device *netdev) static int hns3_nic_net_open(struct net_device *netdev) { struct hns3_nic_priv *priv = netdev_priv(netdev); - int ret; + struct hnae3_handle *h = hns3_get_handle(netdev); + struct hnae3_knic_private_info *kinfo; + int i, ret; netif_carrier_off(netdev); @@ -327,6 +350,12 @@ static int hns3_nic_net_open(struct net_device *netdev) return ret; } + kinfo = &h->kinfo; + for (i = 0; i < HNAE3_MAX_USER_PRIO; i++) { + netdev_set_prio_tc_map(netdev, i, + kinfo->prio_tc[i]); + } + priv->ae_handle->last_reset_time = jiffies; return 0; } @@ -1307,7 +1336,6 @@ static int hns3_setup_tc(struct net_device *netdev, void *type_data) u16 mode = mqprio_qopt->mode; u8 hw = mqprio_qopt->qopt.hw; bool if_running; - unsigned int i; int ret; if (!((hw == TC_MQPRIO_HW_OFFLOAD_TCS && @@ -1331,24 +1359,6 @@ static int hns3_setup_tc(struct net_device *netdev, void *type_data) if (ret) goto out; - if (tc <= 1) { - netdev_reset_tc(netdev); - } else { - ret = netdev_set_num_tc(netdev, tc); - if (ret) - goto out; - - for (i = 0; i < HNAE3_MAX_TC; i++) { - if (!kinfo->tc_info[i].enable) - continue; - - netdev_set_tc_queue(netdev, - kinfo->tc_info[i].tc, - kinfo->tc_info[i].tqp_count, - kinfo->tc_info[i].tqp_offset); - } - } - ret = hns3_nic_set_real_num_queue(netdev); out: @@ -3202,7 +3212,6 @@ static int hns3_client_setup_tc(struct hnae3_handle *handle, u8 tc) struct net_device *ndev = kinfo->netdev; bool if_running; int ret; - u8 i; if (tc > HNAE3_MAX_TC) return -EINVAL; @@ -3212,10 +3221,6 @@ static int hns3_client_setup_tc(struct hnae3_handle *handle, u8 tc) if_running = netif_running(ndev); - ret = netdev_set_num_tc(ndev, tc); - if (ret) - return ret; - if (if_running) { (void)hns3_nic_net_stop(ndev); msleep(100); @@ -3226,27 +3231,6 @@ static int hns3_client_setup_tc(struct hnae3_handle *handle, u8 tc) if (ret) goto err_out; - if (tc <= 1) { - netdev_reset_tc(ndev); - goto out; - } - - for (i = 0; i < HNAE3_MAX_TC; i++) { - struct hnae3_tc_info *tc_info = &kinfo->tc_info[i]; - - if (tc_info->enable) - netdev_set_tc_queue(ndev, - tc_info->tc, - tc_info->tqp_count, - tc_info->tqp_offset); - } - - for (i = 0; i < HNAE3_MAX_USER_PRIO; i++) { - netdev_set_prio_tc_map(ndev, i, - kinfo->prio_tc[i]); - } - -out: ret = hns3_nic_set_real_num_queue(ndev); err_out: From patchwork Fri Jul 6 10:27:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 141284 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2944918ljj; Fri, 6 Jul 2018 03:29:20 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeUGb/LdcG+iuUcW7vob/VpaIxVqjOguE9fhu2N0yH3yM8q7te/C1J9YddYgF3Cs4OxuXJj X-Received: by 2002:a17:902:8a87:: with SMTP id p7-v6mr9655483plo.281.1530872959982; Fri, 06 Jul 2018 03:29:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530872959; cv=none; d=google.com; s=arc-20160816; b=nApD7y9Wmrc7aflj+3nhtXhCRffdLGbyJneMYexWiUhTyvxZEmzdIOl9y4MSaYHLUP jqNk0hLWbq4wIMMkYZXiUG0z4tQxTsTAY/PsoIihdedxWKFgP1PhTrh8gx5oNp25ulSR RvUORO1bQ+ID+4C67ofX+rPC5LuD5d1k6QFWCKY9kShAL2otYiFKFarOCMrxkOeHswzT FnlpSuD5t6w3eT9Y1EJ0vH4i7IZxvnt/MGV/jCpOaDEeCIYcDxN0uK2KEjvkHJxHkigd OF2Zkc97zdl3hcRM34HCj+dzNp6e3TyOGkzSBNw1s+3g0KzwJuNwYnb56qxB+FGAzpBS QtGw== 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=fB2/YtZGJ/2ystkT7xMqnIsyIpUpYBtoKKviVmQN0ME=; b=BkuaIyCxlHosACf7x7/J1yk7vMeugW7JBtja34AeLPBpqyzTIRWNLpAIy+m1bXF5wZ cFqZ0nQVdzb8Y49SQzB7epZw8Wqqbno8PKBptrTeO7eFl6I/DHZ85I3nIBhsYoYmaazd prtS9uiUh+knNvWPl3ACiVWmHl5TFrNkyPahvX9+qfVEZuyuIRISPhPsWmk4PE9foZ6x 0m3e2q3v60StKCDARTb50ohrzk63MIZtWuQgtxC+bro1uKj8xVVLGY4JHfHa21Kr7k8n ntJuYLC21i2MdIsgn42TIub8bjdnyXJGnko25d/vR9Ya4IT4jBPtT31O/TZbphCWe/VG 4aYA== 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 y23-v6si7793590pgk.427.2018.07.06.03.29.19; Fri, 06 Jul 2018 03:29:19 -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 S932429AbeGFK3R (ORCPT + 30 others); Fri, 6 Jul 2018 06:29:17 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:9159 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932310AbeGFK3P (ORCPT ); Fri, 6 Jul 2018 06:29:15 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 9976DCDAE9C65; Fri, 6 Jul 2018 18:29:00 +0800 (CST) Received: from S00293818-DELL1.huawei.com (10.202.226.54) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.382.0; Fri, 6 Jul 2018 18:28:52 +0800 From: Salil Mehta To: CC: , , , , , , , Yunsheng Lin Subject: [PATCH net-next 02/10] net: hns3: Fix for mac pause not disable in pfc mode Date: Fri, 6 Jul 2018 11:27:56 +0100 Message-ID: <20180706102804.196-3-salil.mehta@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180706102804.196-1-salil.mehta@huawei.com> References: <20180706102804.196-1-salil.mehta@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.202.226.54] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yunsheng Lin When pfc pause mode is enable, the mac pause mode need to be disabled, otherwise the pfc pause packet will not be sent when congestion happens. This patch fixes by disabling the mac pause when pfc pause is enabled. Fixes: 848440544b41 ("net: hns3: Add support of TX Scheduler & Shaper to HNS3 driver") Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c index 82bc30f..e2acf3b 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c @@ -1223,6 +1223,10 @@ static int hclge_mac_pause_setup_hw(struct hclge_dev *hdev) tx_en = true; rx_en = true; break; + case HCLGE_FC_PFC: + tx_en = false; + rx_en = false; + break; default: tx_en = true; rx_en = true; @@ -1240,8 +1244,9 @@ int hclge_pause_setup_hw(struct hclge_dev *hdev) if (ret) return ret; - if (hdev->tm_info.fc_mode != HCLGE_FC_PFC) - return hclge_mac_pause_setup_hw(hdev); + ret = hclge_mac_pause_setup_hw(hdev); + if (ret) + return ret; /* Only DCB-supported dev supports qset back pressure and pfc cmd */ if (!hnae3_dev_dcb_supported(hdev)) From patchwork Fri Jul 6 10:27:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 141292 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2947361ljj; Fri, 6 Jul 2018 03:31:42 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdR88rS2ATMUhWvqxxgXGUlbBDsxkWU4DYNmfKoDa9rNLG+nfv5Q7O/zaV9McjV3g+XOpPu X-Received: by 2002:a63:d518:: with SMTP id c24-v6mr2864065pgg.357.1530873102315; Fri, 06 Jul 2018 03:31:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530873102; cv=none; d=google.com; s=arc-20160816; b=SaeKNymc12lPlZNiE7nIqKW5NPoZmlfhQ08xwUEHtKD2xomweC1xy1xi0g9ma3wCEV XDRMnxCiDvP7v+PvAWGoonQCq/LBBG6Ron8Cfw3lPbwQ/DVeqimggClsnylu56nYJ+Vw aWgDkjQWnQoiIMcj2l0N2q9oON//06CDXBdwdBsqKz56Vm59JJ/CxU25PckPfOC1P27H Dhm4hVfmxv5Ht+Wzx496LRYkMiUv0xc1tAa/HFGAWfDjrXaTUfXUH4Zbcykp1TruhWMy FqwIbJKa7lofx4uA5x2NVzr/exl8XNtD1LA9os8jYzhCoNauPi5QqywkChzxXBl04Epn eSJg== 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=uvlPd2uKNE5dZdzrXLHXeRTbtEPzs9hL8lEjcett4nE=; b=zGcNf1+QQKjNHx7FAIeWvH0F1N5Trt+6BP2GmUeoaeQW2OK+IrVslSgPs7ITvA2jRf DLWF8CcOs+bZHBpZZFdmd+rUpDIOWedDz2hDk/NAkQbkRCjt6spZ8c2IZtUHcxmzUfWm Pzd+hC2/r1nEi3e6UosloG3miDd+LEVvYPFlRPxXJ6ri/GyiLUjmf/S4caWz3YU8L9E+ sAPG5ky4zx9+JdW32Ow50iH5JtWLG0bvjN+d7BPfjP9H0qPFPFfq7T+a1v/6dVu5CjOo //tnUiv19GT/j2A3fELNE13h/2Pe2wn6ygz87Ric6+uWvHtfmVgQBiYpjdhSmgfs5pE1 a9Ag== 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 n9-v6si7708093plp.166.2018.07.06.03.31.42; Fri, 06 Jul 2018 03:31:42 -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 S932642AbeGFKbl (ORCPT + 30 others); Fri, 6 Jul 2018 06:31:41 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:9158 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932318AbeGFK3P (ORCPT ); Fri, 6 Jul 2018 06:29:15 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 8B0196BC1C80; Fri, 6 Jul 2018 18:29:00 +0800 (CST) Received: from S00293818-DELL1.huawei.com (10.202.226.54) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.382.0; Fri, 6 Jul 2018 18:28:55 +0800 From: Salil Mehta To: CC: , , , , , , , Yunsheng Lin Subject: [PATCH net-next 03/10] net: hns3: Fix for waterline not setting correctly Date: Fri, 6 Jul 2018 11:27:57 +0100 Message-ID: <20180706102804.196-4-salil.mehta@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180706102804.196-1-salil.mehta@huawei.com> References: <20180706102804.196-1-salil.mehta@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.202.226.54] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yunsheng Lin The HCLGE_RX_PRIV_EN_B is used to tell the firmware whether to update the specific waterline value, if the is not set, the firmware will ignore the value. This patch fixes by setting the HCLGE_RX_PRIV_EN_B even if the updated value is zero. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 6fffc69..dae1aa5 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -1834,8 +1834,6 @@ static int hclge_rx_priv_buf_alloc(struct hclge_dev *hdev, return 0; } -#define HCLGE_PRIV_ENABLE(a) ((a) > 0 ? 1 : 0) - static int hclge_rx_priv_wl_config(struct hclge_dev *hdev, struct hclge_pkt_buf_alloc *buf_alloc) { @@ -1863,13 +1861,11 @@ static int hclge_rx_priv_wl_config(struct hclge_dev *hdev, req->tc_wl[j].high = cpu_to_le16(priv->wl.high >> HCLGE_BUF_UNIT_S); req->tc_wl[j].high |= - cpu_to_le16(HCLGE_PRIV_ENABLE(priv->wl.high) << - HCLGE_RX_PRIV_EN_B); + cpu_to_le16(BIT(HCLGE_RX_PRIV_EN_B)); req->tc_wl[j].low = cpu_to_le16(priv->wl.low >> HCLGE_BUF_UNIT_S); req->tc_wl[j].low |= - cpu_to_le16(HCLGE_PRIV_ENABLE(priv->wl.low) << - HCLGE_RX_PRIV_EN_B); + cpu_to_le16(BIT(HCLGE_RX_PRIV_EN_B)); } } @@ -1911,13 +1907,11 @@ static int hclge_common_thrd_config(struct hclge_dev *hdev, req->com_thrd[j].high = cpu_to_le16(tc->high >> HCLGE_BUF_UNIT_S); req->com_thrd[j].high |= - cpu_to_le16(HCLGE_PRIV_ENABLE(tc->high) << - HCLGE_RX_PRIV_EN_B); + cpu_to_le16(BIT(HCLGE_RX_PRIV_EN_B)); req->com_thrd[j].low = cpu_to_le16(tc->low >> HCLGE_BUF_UNIT_S); req->com_thrd[j].low |= - cpu_to_le16(HCLGE_PRIV_ENABLE(tc->low) << - HCLGE_RX_PRIV_EN_B); + cpu_to_le16(BIT(HCLGE_RX_PRIV_EN_B)); } } @@ -1943,14 +1937,10 @@ static int hclge_common_wl_config(struct hclge_dev *hdev, req = (struct hclge_rx_com_wl *)desc.data; req->com_wl.high = cpu_to_le16(buf->self.high >> HCLGE_BUF_UNIT_S); - req->com_wl.high |= - cpu_to_le16(HCLGE_PRIV_ENABLE(buf->self.high) << - HCLGE_RX_PRIV_EN_B); + req->com_wl.high |= cpu_to_le16(BIT(HCLGE_RX_PRIV_EN_B)); req->com_wl.low = cpu_to_le16(buf->self.low >> HCLGE_BUF_UNIT_S); - req->com_wl.low |= - cpu_to_le16(HCLGE_PRIV_ENABLE(buf->self.low) << - HCLGE_RX_PRIV_EN_B); + req->com_wl.low |= cpu_to_le16(BIT(HCLGE_RX_PRIV_EN_B)); ret = hclge_cmd_send(&hdev->hw, &desc, 1); if (ret) { From patchwork Fri Jul 6 10:27:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 141291 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2946791ljj; Fri, 6 Jul 2018 03:31:11 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfRkKBmbTGlmuPLij7bYmnPX1ctim/h+1hdTliaonRXXOkhHis3OPLZt8qFibMlZVdkYqLT X-Received: by 2002:a63:9311:: with SMTP id b17-v6mr8925299pge.261.1530873071046; Fri, 06 Jul 2018 03:31:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530873071; cv=none; d=google.com; s=arc-20160816; b=rFAss8TgINIChZrAs4ds7Qlv5ex99DAjfjjm1f3QCnD7U8MOnlR6+6bRtkI8C+ngvP n01+eb1Is/2KY5O5fV/J4Vljk+ExZNAr0/fV1Py/UwPxfNMPtnwOypxSguqfx0wE3Mrl wKstYohYEWN76eKvfZq8nyfT4RGKajpoUqJNNOepKb05QpCXQGeiSY1/YG0SKwxV4Wgj 4MzKtoBL5nhn9G5UQYZiMIjPSmEU36+eFoOdGFzY3cQHFKr66aMYonoMKzJs2qsuy+fm +6FIy4iLiIaODDLd3cySxmw1QoRdVR/qWOCD/igYyJoYSdgjMlVBJU6x0iygQA7+IqMQ fiaw== 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=7H5g8SOL+BObaxpfQ3ewPRG6nyJ40q+EBK9xzBR+KW0=; b=00txZCaof0CsbC23jYctEpysvdtnaCvWWWaEabclUiNWNO7JddaPXFsFeI4MDgoJmY tJ/IgSHl9nORsEswo3JZXzc4/T6rOPXRzaY++vWxn0bYNwqssevSg9NC8soIdzxO9htB b6aq+ShC/JXxo6TTZdk11nsVsvhTzqYPXidxArDTcKSusJmmcYfxEUBYEVdyWIFgJeWx ty6GIKwdw5zYvHJLdgiVsw/TJqJISIN2jHcqRsriA56FNPgroCUabu3bpVQ4+9MFrlqy SL6c6LN7PTR+YX+CxvhluLevRlmHnu6pzFaVPp0wtP8T0U7LQ14MZMY1bVgrKh/KpeUE CS/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 e20-v6si8923127pfm.177.2018.07.06.03.31.10; Fri, 06 Jul 2018 03:31:11 -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 S932537AbeGFK3V (ORCPT + 30 others); Fri, 6 Jul 2018 06:29:21 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:9161 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932439AbeGFK3T (ORCPT ); Fri, 6 Jul 2018 06:29:19 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 93EFD6ABBC82C; Fri, 6 Jul 2018 18:29:05 +0800 (CST) Received: from S00293818-DELL1.huawei.com (10.202.226.54) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.382.0; Fri, 6 Jul 2018 18:28:58 +0800 From: Salil Mehta To: CC: , , , , , , , Yunsheng Lin Subject: [PATCH net-next 04/10] net: hns3: Fix for l4 checksum offload bug Date: Fri, 6 Jul 2018 11:27:58 +0100 Message-ID: <20180706102804.196-5-salil.mehta@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180706102804.196-1-salil.mehta@huawei.com> References: <20180706102804.196-1-salil.mehta@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.202.226.54] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yunsheng Lin Hardware only support tcp/udp/sctp l4 checksum offload, but the driver currently tell hardware to do l4 checksum offlad when l3 is IPv4 or IPv6, which may cause checksumm error. This patch fixes it by only enabling the l4 offload when l4 is tcp/udp/sctp. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index e5e51e8..c211450 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -791,16 +791,14 @@ static int hns3_set_l3l4_type_csum(struct sk_buff *skb, u8 ol4_proto, */ if (skb_is_gso(skb)) hnae3_set_bit(*type_cs_vlan_tso, HNS3_TXD_L3CS_B, 1); - - hnae3_set_bit(*type_cs_vlan_tso, HNS3_TXD_L4CS_B, 1); } else if (l3.v6->version == 6) { hnae3_set_field(*type_cs_vlan_tso, HNS3_TXD_L3T_M, HNS3_TXD_L3T_S, HNS3_L3T_IPV6); - hnae3_set_bit(*type_cs_vlan_tso, HNS3_TXD_L4CS_B, 1); } switch (l4_proto) { case IPPROTO_TCP: + hnae3_set_bit(*type_cs_vlan_tso, HNS3_TXD_L4CS_B, 1); hnae3_set_field(*type_cs_vlan_tso, HNS3_TXD_L4T_M, HNS3_TXD_L4T_S, @@ -810,12 +808,14 @@ static int hns3_set_l3l4_type_csum(struct sk_buff *skb, u8 ol4_proto, if (hns3_tunnel_csum_bug(skb)) break; + hnae3_set_bit(*type_cs_vlan_tso, HNS3_TXD_L4CS_B, 1); hnae3_set_field(*type_cs_vlan_tso, HNS3_TXD_L4T_M, HNS3_TXD_L4T_S, HNS3_L4T_UDP); break; case IPPROTO_SCTP: + hnae3_set_bit(*type_cs_vlan_tso, HNS3_TXD_L4CS_B, 1); hnae3_set_field(*type_cs_vlan_tso, HNS3_TXD_L4T_M, HNS3_TXD_L4T_S, From patchwork Fri Jul 6 10:27:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 141285 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2944997ljj; Fri, 6 Jul 2018 03:29:25 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeqTCJQeGkRCbD5HDLhOuyWEohadIn6cNthPy4wkv5GwK8N5h6yvYj/BV8G2oLguAX6rB1t X-Received: by 2002:a17:902:7606:: with SMTP id k6-v6mr9628525pll.56.1530872965469; Fri, 06 Jul 2018 03:29:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530872965; cv=none; d=google.com; s=arc-20160816; b=QYC7Prxz0OQzgMDkFJwWzM+XeiQxIS0Kd2jS2VMmCJiZmS7y07t5lugweroQbQeE0M PuUs9vAcJdwOIoNMQZgI6oFLjnNTPoH9yMeAF8pKCF0qMzXkkQ9Uhq7hrqi9BMEZu6Q/ 3tGCRIC4XfcKVZBYFX1K5ONMZAqZo8WdWWuBFER4dH23zQS3Q0W7dmwaov906eojUupv VBRcAuTO2lPbZJ+F2C3CxTmPz3yilbkw7Ti8kVIZHIH5x3kIVlqYZkQ/6YXD2wMSS/K+ jxnR5kvv6p+7YwLzliJpWKHz0UWDp1QKRSfbxU8ZI5JUCGQhF66Dzz07M628vPdrp6KT 8EfA== 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=kYOWaJ7ruQIUBIDNNhMhnAZOFopMK8CEOt8DvfMjKLA=; b=SSjP9ZCAzT0o9MF54xoTDxr1tzwUc1s7m7VCgh7g5AYMG3vDadR2XUDtwsB4T+njpg HKUwY3Guwz7RJ5qNpzLyLDzuDZcdTJ/Ub4ZssC896a8j5jt4twDMwAEEi/P83LgTGG0Z n7Qlmv5wogpXxfOiKIgkxE0zKxzlbUDgYU+ljwivSofEWrDGOwgYOd8nxpwLbT6Alko0 hthfeVMs2E62hdIjbdvzFDMM8IaXEzkcV7MdGF6gDhLZb4lWdjx+rhNbN1RuAA6vFS4D 4UHgYSWkTX05kUfaB4hk9SVXRmAJZrf52zD6w0I0vL/dkqvP0TGWYKeq8W5Xdy8ree7a oarQ== 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 y23-v6si7793590pgk.427.2018.07.06.03.29.25; Fri, 06 Jul 2018 03:29:25 -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 S932603AbeGFK3W (ORCPT + 30 others); Fri, 6 Jul 2018 06:29:22 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:9160 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932310AbeGFK3T (ORCPT ); Fri, 6 Jul 2018 06:29:19 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 855D3DEFA62C6; Fri, 6 Jul 2018 18:29:05 +0800 (CST) Received: from S00293818-DELL1.huawei.com (10.202.226.54) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.382.0; Fri, 6 Jul 2018 18:29:01 +0800 From: Salil Mehta To: CC: , , , , , , , Fuyun Liang Subject: [PATCH net-next 05/10] net: hns3: Fix for mailbox message truncated problem Date: Fri, 6 Jul 2018 11:27:59 +0100 Message-ID: <20180706102804.196-6-salil.mehta@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180706102804.196-1-salil.mehta@huawei.com> References: <20180706102804.196-1-salil.mehta@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.202.226.54] 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 The payload of mailbox message is 16 byte and the value of HCLGE_MBX_MAX_ARQ_MSG_SIZE is 8. A message truncated problem will happen when mailbox message is converted to ARQ message. This patch replaces HCLGE_MBX_MAX_ARQ_MSG_SIZE with the size of ARQ message in hclgevf_mbx_handler to fix this problem. Fixes: b11a0bb231f3 ("net: hns3: Add mailbox support to VF driver") Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c index 173ca27..e9d5a4f 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c @@ -208,7 +208,8 @@ void hclgevf_mbx_handler(struct hclgevf_dev *hdev) /* tail the async message in arq */ msg_q = hdev->arq.msg_q[hdev->arq.tail]; - memcpy(&msg_q[0], req->msg, HCLGE_MBX_MAX_ARQ_MSG_SIZE); + memcpy(&msg_q[0], req->msg, + HCLGE_MBX_MAX_ARQ_MSG_SIZE * sizeof(u16)); hclge_mbx_tail_ptr_move_arq(hdev->arq); hdev->arq.count++; From patchwork Fri Jul 6 10:28:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 141289 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2945791ljj; Fri, 6 Jul 2018 03:30:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdAsTo3tOJ7sZ7T0PJWsbnwT9lOQybRHIdRYxEwmmIgsdr2PciLDRy6BhwhmH+zX5WrdZZB X-Received: by 2002:a17:902:8ecb:: with SMTP id x11-v6mr9995756plo.308.1530873015724; Fri, 06 Jul 2018 03:30:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530873015; cv=none; d=google.com; s=arc-20160816; b=DVcKQfg7ebxLcjSvEHUzjTuaV3NJO8Z06fXfO00BqpipTC9s31vjmFSY4qOEa70F1W q7X9ag4wIfjlgag7ouqZtWx49QBHPNtx/6MJJTZjw8ckjV1MHip0BhxGqEVgfWIOZEWs A+0y+H4cost6YoVcGy7qpe06gOj5nc1LqBVGfgR5atdYtiRxm2Tm/IVDEOiTf6ZMYScH 3lMTOujeiN7tkoWprZXVgeJrcU18iPWQHmO3OVumVfqABN7I3hqbZ6ze7Z+mOweqZtEg nKS/K/6vtDE2+LWUnbWYoc+9sEuc4MG9ibIpDRgdAdiNJehBALPVQzywCH4Miej7DUR7 YIFQ== 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=6n5pFZMPY+YYZ/PQcR2ERxfkLdwq16C/iIC5oavsgtw=; b=TBPI+q+NDktljIgc0TJBIG7/+chYK7+R4Dw6gVgtJDTwTpTnnwsi7dvhPkQgXl9DOZ i8jl4g4nKWOZohsJ998/QdQKuLgACPuNYTlKkvXSb0oaqriK/UNSlDS7tYqCXMzcVlud Z1FWvr3ZkJnzb1oJ1TObkVi3XJmSutHMiw1DpcZQA5xkHCkT51MxhByBzu2uBUpALIgY vXNhrhYF+bgCWH/HTAVsfFF+ptAwk/kg0NjpFKmxd98AwwT0g602RyVG+DR11bMfGghJ H05Jtu3+zR4gP9TGUT4tAzSxAjJsaYHY+TUsEjUUvwsMgui04FXxURw8mKyCUEf99wjY I9xw== 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 k18-v6si7460857pgl.364.2018.07.06.03.30.15; Fri, 06 Jul 2018 03:30:15 -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 S932767AbeGFK32 (ORCPT + 30 others); Fri, 6 Jul 2018 06:29:28 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:9162 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932310AbeGFK3Y (ORCPT ); Fri, 6 Jul 2018 06:29:24 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 9A8A450F31356; Fri, 6 Jul 2018 18:29:10 +0800 (CST) Received: from S00293818-DELL1.huawei.com (10.202.226.54) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.382.0; Fri, 6 Jul 2018 18:29:04 +0800 From: Salil Mehta To: CC: , , , , , , , Jian Shen Subject: [PATCH net-next 06/10] net: hns3: Add configure for mac minimal frame size Date: Fri, 6 Jul 2018 11:28:00 +0100 Message-ID: <20180706102804.196-7-salil.mehta@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180706102804.196-1-salil.mehta@huawei.com> References: <20180706102804.196-1-salil.mehta@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.202.226.54] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jian Shen When change the mtu, the minimal frame size of mac will be set to zero, it is incorrect. This patch fixes it by set it to the default value. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 3 ++- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h index d9aaa76..656c3e6 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h @@ -571,7 +571,8 @@ struct hclge_config_auto_neg_cmd { struct hclge_config_max_frm_size_cmd { __le16 max_frm_size; - u8 rsv[22]; + u8 min_frm_size; + u8 rsv[21]; }; enum hclge_mac_vlan_tbl_opcode { diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index dae1aa5..df6a7a1 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -4987,6 +4987,7 @@ static int hclge_set_mac_mtu(struct hclge_dev *hdev, int new_mtu) req = (struct hclge_config_max_frm_size_cmd *)desc.data; req->max_frm_size = cpu_to_le16(max_frm_size); + req->min_frm_size = HCLGE_MAC_MIN_FRAME; ret = hclge_cmd_send(&hdev->hw, &desc, 1); if (ret) { From patchwork Fri Jul 6 10:28:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 141288 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2945371ljj; Fri, 6 Jul 2018 03:29:54 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfIWhTt09du6WGTwBuJg0YmL2+MXC3+KFUOC3Ms2h+HlhGNMhQpDL0/pfAsJ4KKssUr1A3k X-Received: by 2002:a63:6243:: with SMTP id w64-v6mr4278355pgb.179.1530872994176; Fri, 06 Jul 2018 03:29:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530872994; cv=none; d=google.com; s=arc-20160816; b=FxhnkPMmN2+wfSfka0jKxE3s2+hIV/Im7bs+0o27V1mPAE1RSrzW/QtG1d9rM0k8VA AE1DyvJQQdcXDZBu06lc9Y1+gE/1a8inQN47a0fqP7J0ZmzCWHLIXb/+HakO+pQ9H6nY M2x9wuLTBq1LziXxrl+vEh3LEBJs7Bf4bfoy6w6LzkGnzB6CcQR8iFaTUvdhqJGSvbYK fihK64GuGaI/BLcle31R66r9O2VxnXV1Xk3+TMDPz984g+Z9vkiw05fID/E8+m366W9c i+uyrcu7PvVrtD9W//kjBv/CNHT0aV2aTBNEi/pO4IuGTEGzdV+vGwKHW0M08Pic9FZe csiA== 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=wfabwEU0sZmhLEXFLx88Hamq/pImkXTVbB6+TnQ/yQ0=; b=OxS0iWbiUZee39ZAjKjh5XBApaKWJtGPX2l0tOTv3w7CpzFy36fMPYTTN7V4KpXWgM uHoQ/IRVxttZ+6udpFvKsvO/ywBetw7ifWsmZJKSibM6PA/WI5J8sA9a1gnD/3I9fPjM Lkvtpc9p20ejG2ax3X7GS6hT6hzn16n8DJ9tWB5eCPa+w67tktQs/b0LxfMnO73mOGhL RBE5GDqkPE6pMd9OLAVPmv18RxHwgxS8BFGskyC1ecKtTmP2PfscFFfvQ0mtBFD/XCq3 KGv+/Oisoltz6FnLw0on2HLxGZLJxKNVPMGyLS899Vuo+WUDkQPlZL0X64R489rq2lnL l1jw== 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 k18-v6si7460857pgl.364.2018.07.06.03.29.53; Fri, 06 Jul 2018 03:29:54 -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 S1753854AbeGFK3w (ORCPT + 30 others); Fri, 6 Jul 2018 06:29:52 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:9208 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932310AbeGFK33 (ORCPT ); Fri, 6 Jul 2018 06:29:29 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 6B0C4A868C1AC; Fri, 6 Jul 2018 18:29:15 +0800 (CST) Received: from S00293818-DELL1.huawei.com (10.202.226.54) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.382.0; Fri, 6 Jul 2018 18:29:07 +0800 From: Salil Mehta To: CC: , , , , , , , Yunsheng Lin Subject: [PATCH net-next 07/10] net: hns3: Fix warning bug when doing lp selftest Date: Fri, 6 Jul 2018 11:28:01 +0100 Message-ID: <20180706102804.196-8-salil.mehta@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180706102804.196-1-salil.mehta@huawei.com> References: <20180706102804.196-1-salil.mehta@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.202.226.54] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yunsheng Lin The napi_alloc_skb is excepted to be called under the non-preemptible code path when it is called by hns3_clean_rx_ring during loopback selftest, otherwise the below warning will be logged: [ 92.420780] BUG: using smp_processor_id() in preemptible [00000000] code: ethtool/1873 [ 92.463202] check_preemption_disabled+0xf8/0x100 [ 92.467893] debug_smp_processor_id+0x1c/0x28 [ 92.472239] __napi_alloc_skb+0x30/0x130 [ 92.476158] hns3_clean_rx_ring+0x118/0x5f0 [hns3] [ 92.480941] hns3_self_test+0x32c/0x4d0 [hns3] [ 92.485375] ethtool_self_test+0xdc/0x1e8 [ 92.489372] dev_ethtool+0x1020/0x1da8 [ 92.493109] dev_ioctl+0x188/0x3a0 [ 92.496499] sock_do_ioctl+0xf4/0x208 [ 92.500148] sock_ioctl+0x228/0x3e8 [ 92.503626] do_vfs_ioctl+0xc4/0x880 [ 92.507189] SyS_ioctl+0x94/0xa8 [ 92.510404] el0_svc_naked+0x30/0x34 This patch fix it by disabling preemption when calling hns3_clean_rx_ring during loopback selftest. Fixes: c39c4d98dc65 ("net: hns3: Add mac loopback selftest support in hns3 driver") Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.7.4 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c index 40c0425..11620e0 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c @@ -201,7 +201,9 @@ static u32 hns3_lb_check_rx_ring(struct hns3_nic_priv *priv, u32 budget) rx_group = &ring->tqp_vector->rx_group; pre_rx_pkt = rx_group->total_packets; + preempt_disable(); hns3_clean_rx_ring(ring, budget, hns3_lb_check_skb_data); + preempt_enable(); rcv_good_pkt_total += (rx_group->total_packets - pre_rx_pkt); rx_group->total_packets = pre_rx_pkt; From patchwork Fri Jul 6 10:28:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 141290 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2946126ljj; Fri, 6 Jul 2018 03:30:34 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfhISGgX0yfaO/2TXZ5nWApBhhOJ6qhBxS9RLnCd6wN+2TtB+pRdQGElQ3QSEWTfPjFobSS X-Received: by 2002:a17:902:8506:: with SMTP id bj6-v6mr6301470plb.210.1530873034084; Fri, 06 Jul 2018 03:30:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530873034; cv=none; d=google.com; s=arc-20160816; b=Ra9/v8UBWIg6g79LnucSrRN8QsataCG74Kt6to0vyf1rjs4UYPmwYmoNF8T2QSAJEo 2TN50xx3mafZRUAUAb+fNhJg+/9UEur4qrYOK2IDiH0/MAE6PLD0PcYzxGRWe1m3f/W3 SVWquwS2N/2z2ZhV7z6j1KI2THiqZAKpe8KvqVP5B3awcVuwp9eGzlQ3qx41agLSQ1kC IDR42R4knDeldt0f0OPwMVA38MrvLq9fcbMYoW78sud4ulB9T5YqdLZBz/VxODRvPeHe omSTfuxyH9ekGFSgF9D7MxJjBCAFOEZr21vkB4wKuimDSrjs5YLRXNmrDM+grKLzLGv3 YGaw== 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=bHJOWDssDiJj0eGnmPnXr/kvT/vN2wLLEVcuwZ2gjNU=; b=S/pEscu5uvS58VaJrgPPG6EPt/7QjLXrW2pNSIZSzPwtAGG6L9UuJkQRcgrqmO966J xnvqDE15mZD7gqg/vO5uUfnboOYdQL612lN5vZgLK+Pu4ELHH/HUQlBROVG0o6ckXNO2 8NqMppAFQUMaN153UuG9J4AFCGPhCWqYld0ogNZb8oG71qfw99QBTtV6yIJ9CdTOwJcN lVH9DdZNvfmNBtqSi2XGkhDXwU1ebi6RnmnH5VC9qSeUkRJbllB+IL+ca7vUxhGeoZ62 FOVZMl9iRlVp74ZTamJDkeVt+8R9yEXUp2nJ0xIrG4HJWA/P1de3UON6S3zTP0n/mLdL HZoQ== 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 31-v6si8224915plc.173.2018.07.06.03.30.33; Fri, 06 Jul 2018 03:30:34 -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 S932702AbeGFK30 (ORCPT + 30 others); Fri, 6 Jul 2018 06:29:26 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:36156 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S932612AbeGFK3Y (ORCPT ); Fri, 6 Jul 2018 06:29:24 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 20AE4B636EF85; Fri, 6 Jul 2018 18:29:21 +0800 (CST) Received: from S00293818-DELL1.huawei.com (10.202.226.54) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.382.0; Fri, 6 Jul 2018 18:29:12 +0800 From: Salil Mehta To: CC: , , , , , , Subject: [PATCH net-next 09/10] net: hns3: Remove the warning when clear reset cause Date: Fri, 6 Jul 2018 11:28:03 +0100 Message-ID: <20180706102804.196-10-salil.mehta@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180706102804.196-1-salil.mehta@huawei.com> References: <20180706102804.196-1-salil.mehta@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.202.226.54] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Li Only the core/global/IMP reset need clear cause, other type does not need do it. The warning may be treated as error as it is normal. This patch removes the warning. Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 -- 1 file changed, 2 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index df6a7a1..4ca3e6b 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -2805,8 +2805,6 @@ static void hclge_clear_reset_cause(struct hclge_dev *hdev) clearval = BIT(HCLGE_VECTOR0_CORERESET_INT_B); break; default: - dev_warn(&hdev->pdev->dev, "Unsupported reset event to clear:%d", - hdev->reset_type); break; } From patchwork Fri Jul 6 10:28:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 141286 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2945102ljj; Fri, 6 Jul 2018 03:29:32 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd+8ymJslwde5nq1NCnJexYUQtINbJCw0lV0Zh8NvVj3DofrVrpT7XK++2mA8/MJaL7MDiF X-Received: by 2002:aa7:8591:: with SMTP id w17-v6mr10121260pfn.77.1530872972558; Fri, 06 Jul 2018 03:29:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530872972; cv=none; d=google.com; s=arc-20160816; b=ZK/ufCr3HKvqV4Bx+JTUdG2S7u67sLInVXGD4wHCvRYrEe/G7g0xVg1nO8O7WrqhQL tKAYOdOGiKYvHmXryXWXXzZCrXAsQuiGj2jn/wAPuxCO1DZU1a1SI7iG7vTfMQiu76J8 WPuqQVAh6zkDB9S71FDr4GUb2nYzqWI4zzcXRHGpSzkIlorW2FgM/NImEk51fP4g0SyZ ihl5SgZb8w6njmvng85B+W3ZSAnyh8P6Ejhwv0nHJoyFiUZFQmytG/YMuAosqSrjC3Xl Ce1iX7H3K899B+nLxRL4XLYB85bEFnAjphMadWa7uQqm1UOPmDqaBjVmEEdcKPACeFa3 r4fg== 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=4yNqWYAa1QeTuF+SZAviKfKDwNW3O9Dtcbdoxyu3+YA=; b=YP8sjTQguv75Ksv/mX41Lq6KtVx26xtpeRfc6irmm0NKCTjdiIrL+Rdu+i/7naounS RsvPeQLa6eRvnCqljNUQlGsMuzF0lEVIFnpLtvc4Bmq/ptVwLnmgQECh81uIuhchVPeb CZfAbCPxdAgFROy3NBqYXvKEjd5jvshY8JMG1zKVGWkm0VaGTo0CyrDrYjJP5btRguEQ htHjkXLer45/dkUuoU8Y75KHzlJbdCdFjgR1dhANZC1Z529BnRSZAk1c/HAJv/whlH+m N+2+5qsEh+cI8ARUm0EMjVcofJeDiOFN0fpkkqBoSaWROqAKWFpdpTt7EW+ZgOgIJ0o7 Tsgg== 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 y23-v6si7793590pgk.427.2018.07.06.03.29.32; Fri, 06 Jul 2018 03:29:32 -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 S932810AbeGFK3a (ORCPT + 30 others); Fri, 6 Jul 2018 06:29:30 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:36163 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S932614AbeGFK3Z (ORCPT ); Fri, 6 Jul 2018 06:29:25 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 2EF3CCAD09844; Fri, 6 Jul 2018 18:29:21 +0800 (CST) Received: from S00293818-DELL1.huawei.com (10.202.226.54) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.382.0; Fri, 6 Jul 2018 18:29:15 +0800 From: Salil Mehta To: CC: , , , , , , , Huazhong Tan Subject: [PATCH net-next 10/10] net: hns3: Prevent sending command during global or core reset Date: Fri, 6 Jul 2018 11:28:04 +0100 Message-ID: <20180706102804.196-11-salil.mehta@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180706102804.196-1-salil.mehta@huawei.com> References: <20180706102804.196-1-salil.mehta@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.202.226.54] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huazhong Tan According to hardware's description, driver should not send command to IMP while hardware doing global or core reset. Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 4 +++- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 ++ drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c index 82cf12a..eca4b23 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c @@ -206,7 +206,8 @@ int hclge_cmd_send(struct hclge_hw *hw, struct hclge_desc *desc, int num) spin_lock_bh(&hw->cmq.csq.lock); - if (num > hclge_ring_space(&hw->cmq.csq)) { + if (num > hclge_ring_space(&hw->cmq.csq) || + test_bit(HCLGE_STATE_CMD_DISABLE, &hdev->state)) { spin_unlock_bh(&hw->cmq.csq.lock); return -EBUSY; } @@ -346,6 +347,7 @@ int hclge_cmd_init(struct hclge_dev *hdev) spin_lock_init(&hdev->hw.cmq.crq.lock); hclge_cmd_init_regs(&hdev->hw); + clear_bit(HCLGE_STATE_CMD_DISABLE, &hdev->state); ret = hclge_cmd_query_firmware_version(&hdev->hw, &version); if (ret) { diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 4ca3e6b..8bbf4e5 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -2507,12 +2507,14 @@ static u32 hclge_check_event_cause(struct hclge_dev *hdev, u32 *clearval) /* check for vector0 reset event sources */ if (BIT(HCLGE_VECTOR0_GLOBALRESET_INT_B) & rst_src_reg) { + set_bit(HCLGE_STATE_CMD_DISABLE, &hdev->state); set_bit(HNAE3_GLOBAL_RESET, &hdev->reset_pending); *clearval = BIT(HCLGE_VECTOR0_GLOBALRESET_INT_B); return HCLGE_VECTOR0_EVENT_RST; } if (BIT(HCLGE_VECTOR0_CORERESET_INT_B) & rst_src_reg) { + set_bit(HCLGE_STATE_CMD_DISABLE, &hdev->state); set_bit(HNAE3_CORE_RESET, &hdev->reset_pending); *clearval = BIT(HCLGE_VECTOR0_CORERESET_INT_B); return HCLGE_VECTOR0_EVENT_RST; diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h index 71d38b8..20abe82 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h @@ -128,6 +128,7 @@ enum HCLGE_DEV_STATE { HCLGE_STATE_MBX_SERVICE_SCHED, HCLGE_STATE_MBX_HANDLING, HCLGE_STATE_STATISTICS_UPDATING, + HCLGE_STATE_CMD_DISABLE, HCLGE_STATE_MAX };