From patchwork Fri Oct 12 14:34:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 148768 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp811183lji; Fri, 12 Oct 2018 07:35:06 -0700 (PDT) X-Google-Smtp-Source: ACcGV62FiGIGMZW7BScdZeOsGqYmposFQFK+2CGOYDq5fhurVtvFDGH1tUkGVbRHZ3MR4ykgShNV X-Received: by 2002:a62:384c:: with SMTP id f73-v6mr6386018pfa.242.1539354906272; Fri, 12 Oct 2018 07:35:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539354906; cv=none; d=google.com; s=arc-20160816; b=QdCiD35O661ILgwVitCCna/EcVAVUKFupMAAdH6Y/yHibtqNZNsoLGj9DbEqQ12xoY 8tdIK22pGA1O3I4e9kLZRKb9LNjxWe92gI594SBdEdpsPAkcUBPvi+EIcyLBTo9dnTiD 9TCTPFyFHmyirPH6Gm0ZLt4X0ilOiLPiVGMl//9gk3EE/JgIX+cuFsVHx9hXBDXlF2AQ CT+CCReh/23jmrIMShMhuKPhEXTy5OdPEHup7zTnE49YrAI7Ilhsl39HA54fwjkGC56G klMbKsWiIeg3BYsapI76W8sLJX99vJP1hxbITFmlVBo/nL1Yx+ba3DlOTAf47ozIH+Ii ngNQ== 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=CA5B1bVTxz5SAvwWv1wu3jq4MK/u3xkzuMfB9o+SUz8=; b=hSD5taKZM4YP+qnjuG+cYf+s3no5bs2GwZEg5LAsvW4I//vrwxthwOkPICou6+eOa4 67QwgxmyJeelHC7OQeuf2R8zXkMyowgF9y13XhtlO9SxIRy7d86ir8zNKQRx6JBcSlqE yt1E206pYrdKEvrLvCuY8U0274ZcyrItPGP06RE4R6uaddOU6P33J2JcP4j19qrUuXzX 5GL4y9hBCiIA8prXD2fhOTwdgtE35gPSuZiMifw9/ytbxGD/UnNeVhJCEXzMeyrdHh1P 9pUIDjA36ceSO+VMkk+G03xeFKsOQfhOns7jHGTMjWFrrdP+TP1hKLqfneJA8OhcAkTA wb4Q== 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 a10-v6si1391350pgk.365.2018.10.12.07.35.06; Fri, 12 Oct 2018 07:35:06 -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 S1728973AbeJLWHf (ORCPT + 32 others); Fri, 12 Oct 2018 18:07:35 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13628 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728616AbeJLWHe (ORCPT ); Fri, 12 Oct 2018 18:07:34 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 5548F976BD933; Fri, 12 Oct 2018 22:34:43 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.202.226.54) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.399.0; Fri, 12 Oct 2018 22:34:39 +0800 From: Salil Mehta To: CC: , , , , , , , Jian Shen Subject: [PATCH net-next 2/3] net: hns3: Resume promisc mode and vlan filter status after reset Date: Fri, 12 Oct 2018 15:34:05 +0100 Message-ID: <20181012143406.22600-3-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20181012143406.22600-1-salil.mehta@huawei.com> References: <20181012143406.22600-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 This patch resumes promisc mode and vlan filter status after reset. Signed-off-by: Jian Shen Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index bbd6197..ce93fcc 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -3665,11 +3665,15 @@ static int hns3_reset_notify_init_enet(struct hnae3_handle *handle) { struct net_device *netdev = handle->kinfo.netdev; struct hns3_nic_priv *priv = netdev_priv(netdev); + bool vlan_filter_enable; int ret; hns3_init_mac_addr(netdev, false); - hns3_nic_set_rx_mode(netdev); hns3_recover_hw_addr(netdev); + hns3_update_promisc_mode(netdev, handle->netdev_flags); + vlan_filter_enable = netdev->flags & IFF_PROMISC ? false : true; + hns3_enable_vlan_filter(netdev, vlan_filter_enable); + /* Hardware table is only clear when pf resets */ if (!(handle->flags & HNAE3_SUPPORT_VF))