Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1924764ybk; Thu, 21 May 2020 19:53:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVeGxO/rjyedWFBSdg6+U0VgSI7QOeFcRz0VpiQeFpwOx2PhM+os8+USKDf7a+zhZyijND X-Received: by 2002:a17:906:4e87:: with SMTP id v7mr5788158eju.431.1590115998490; Thu, 21 May 2020 19:53:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590115998; cv=none; d=google.com; s=arc-20160816; b=kXJIaUBgo7sr4Ce84fllceJZ4wjcJ5u9090eJXwzOhMabs7J6ZjepkqE7ngxw71o7k 5+anySoN+x0gOPXRqK5Bqb7huen/LuHNuXWXOSODXIM6pjc9xD7eDfQXMd1BVNb9Z/QY 0+9ydE31WdW+oyjQ/8ws5RgX96KrnswuQdfwKdu4Rav/m01RFty9ahBbAPi/MTK0E9lv T7B6MYDxplDJZAvYurjFIVGFRqmlWK/SxKZwWlVOfKy86n2a882PaoISCGzm4iu6Q0RY Q8Dkdk6VbdaZNFV5cs/47AnwmXs6dAw6ehESitcfkDABDybaGsA0OThJeflpr2Qo9j6v 1xiQ== 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=ypQ/uZ7CTfVBFGm+ClIRtrSICEKxVizkS+h7yp2A/RlUQgxhHPN91OjWsujYqKRz7l em51Qbw0yRpoH7scbzrl3Bzd8l82fmtcs1ivAd1Z+VAQk3nMc1CSQWlTNVsN0BasS6z1 f8TkdNnVBYAC1MbF+ZShT15EutRUwKAk0Kt83ijQTGZZqfu5t1l0Zy6RohaxA+2tYqGX qRIAFccxF294oDbijDxDFK4WNceL9mibwds8lGKMBo4qFKLMhBIb7x96mYoDTgelnA/b 2XvZiczNrA5Agoa+PhCC9O93G6EHDg3ykULwS4RcBexhhXiyYBEp4gQaH3LOjsB6F+Gj tzog== 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 d1si4768330edo.148.2020.05.21.19.52.56; Thu, 21 May 2020 19:53:18 -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 S1727940AbgEVCvP (ORCPT + 99 others); Thu, 21 May 2020 22:51:15 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:4881 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727024AbgEVCvO (ORCPT ); Thu, 21 May 2020 22:51:14 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id AD3EBD66CACCBD24277F; Fri, 22 May 2020 10:51:11 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Fri, 22 May 2020 10:51:03 +0800 From: Huazhong Tan To: CC: , , , , , , Yufeng Mo , Huazhong Tan Subject: [PATCH net-next 4/5] net: hns3: remove unnecessary MAC enable in app loopback Date: Fri, 22 May 2020 10:49:45 +0800 Message-ID: <1590115786-9940-5-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1590115786-9940-1-git-send-email-tanhuazhong@huawei.com> References: <1590115786-9940-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