Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp415004ybm; Tue, 26 May 2020 21:30:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGbCWNK71r/o6KB2R7I/OsrnI6wJU8uZKSNd6l97AdqpFUezDTtvWw9rwN70xNK9960bYX X-Received: by 2002:a1c:56c1:: with SMTP id k184mr2161228wmb.183.1590553810316; Tue, 26 May 2020 21:30:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590553810; cv=none; d=google.com; s=arc-20160816; b=NwuKrDvgzsXpGl6jStnDKNR1PqvlxlEooZr+lcnSKAudItbcoqlmOiWmSV2QLhKy4o 8Ebx56POD7QrRWxZeLhjABBvOdzuAIIJ1fxol2iV8xeKXKNSdIoxe2dRUrK7HjT0VY2P YTJDKu/5Cm/BpcFBvY0/Oy0Idbnt+N82PW6BRJp2YdLq+g0nmPNZ482ctbgzOJ+SHbIy M+BkThnawq3InwQy5R3Mp1AJLTzhy+TbkfqWDn3kkrpVwuydiMJ3SqF3stvRs9vO/ZFR 8YdQv7KFO3gUfQNUX2DdQEfHdKY7a91e/FxJ2UDFZxi1HC/5m5EhPrgCvqWSTIEFpMyL jekw== 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; bh=om6cBmfnveP2rYyIGUfNwY5tXosCk+2s5FAgbeSKECc=; b=VlPQTgO53YPSq95kfHtMn0zVFHf7YpR55bz4cKk7FMhLLACLUvAK3ILk6HdUGsq41a fcC5naRqFIEjQSpRWIqJNLO4hB2xR4kpJjys9i1rh3EU9P6UFM9b92zJ2Aa9Cw8ALhPW 6g1oyqb/keFPQPRT7HVAZmpaeXIevF95cs3upih8rYoL8n9lYick9vvIPO+3i9jrJcN8 +Quw44CaX0AnAy0jtZ1k1+DzPQbPib64OVjr7pGM3mUJCtgnD2X6dMVCCsGqU7zEtPCS QP/UbjsSSV7hQP5sXwhMZeUQvHqPciQOlRW2/NTyf2wg59b5isuIyv6QxpY/L0ddj4y3 Wj7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z10si295406ejb.517.2020.05.26.21.29.47; Tue, 26 May 2020 21:30:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727882AbgE0BAr (ORCPT + 99 others); Tue, 26 May 2020 21:00:47 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:5343 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727811AbgE0BAp (ORCPT ); Tue, 26 May 2020 21:00:45 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id DA0EFCB0F61D4C4A5F25; Wed, 27 May 2020 09:00:41 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Wed, 27 May 2020 09:00:34 +0800 From: Huazhong Tan To: CC: , , , , , , Yufeng Mo , Huazhong Tan Subject: [PATCH V2 net-next 3/4] net: hns3: remove unnecessary MAC enable in app loopback Date: Wed, 27 May 2020 08:59:16 +0800 Message-ID: <1590541157-6803-4-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1590541157-6803-1-git-send-email-tanhuazhong@huawei.com> References: <1590541157-6803-1-git-send-email-tanhuazhong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yufeng Mo Packets will not pass through MAC during app loopback. Therefore, it is meaningless to enable MAC while doing app loopback. This patch removes this unnecessary action. Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 6e1e2cf..7c9f2ba 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -6583,8 +6583,6 @@ static int hclge_set_app_loopback(struct hclge_dev *hdev, bool en) /* 2 Then setup the loopback flag */ loop_en = le32_to_cpu(req->txrx_pad_fcs_loop_en); hnae3_set_bit(loop_en, HCLGE_MAC_APP_LP_B, en ? 1 : 0); - hnae3_set_bit(loop_en, HCLGE_MAC_TX_EN_B, en ? 1 : 0); - hnae3_set_bit(loop_en, HCLGE_MAC_RX_EN_B, en ? 1 : 0); req->txrx_pad_fcs_loop_en = cpu_to_le32(loop_en); -- 2.7.4