net: hns3: remove unnecessary MAC enable in app loopback
authorYufeng Mo <moyufeng@huawei.com>
Wed, 27 May 2020 00:59:16 +0000 (08:59 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 May 2020 21:56:08 +0000 (14:56 -0700)
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 <moyufeng@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c

index 6e1e2cf385c8da8b90b5d35280c4774c3ee56e98..7c9f2ba1f27248620a7207aac2a3bae812526b82 100644 (file)
@@ -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);