Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1619817imm; Fri, 6 Jul 2018 03:32:20 -0700 (PDT) X-Google-Smtp-Source: AAOMgpetQXm2Qpsg4dqV5agy4Ic9HhCY9vVACArOmQpPprsYWoGhaV9gsNlx3WHgah+SolkM8+IB X-Received: by 2002:a62:6147:: with SMTP id v68-v6mr10101329pfb.115.1530873140220; Fri, 06 Jul 2018 03:32:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530873140; cv=none; d=google.com; s=arc-20160816; b=C51YbPNX2vsXA0EomYe0M42G4D84ECXbWwKgy71k/DZJicPnwFd/OFzIEwE+UwYdWc IUvUAhyRlZ3OZx/PjA3V4osJQCOOQsha4d+iobaMAhKD+ECQAk9MBQ1LvoGwoO+Lf5S6 u2OgoHpSFGCGzKBVj9Z3lV267lwtE2Bd3+g6NZRlY3a8Jm52Vvhw+C5bIPscgneqlHAN WV55m0d58D9r4IPGv8WO//1Fq9txM0f9aEh6HFr7Fy8ti+ckKvaitnrlxRi4QEWZqnt/ oY8p8YUxq5QN6VwVQRxBBNO1grVpyagm8a1yCJZ3VdtUN7afntpnFGsCr4ZNH7Fw+9Hs fyYg== 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 bg2-v6si7891261plb.243.2018.07.06.03.32.05; Fri, 06 Jul 2018 03:32:20 -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 S932754AbeGFK32 (ORCPT + 99 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 Content-Type: text/plain 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(-) 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) { -- 2.7.4