Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp844279imm; Fri, 12 Oct 2018 07:36:10 -0700 (PDT) X-Google-Smtp-Source: ACcGV62rt3fFvQ8ioomiT+J1ZleUTdELjMWwvc0jBd1E42g9fMHFhhXCZIcFc81oLr+/X7jigeQ+ X-Received: by 2002:a63:eb07:: with SMTP id t7-v6mr5722837pgh.441.1539354970737; Fri, 12 Oct 2018 07:36:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539354970; cv=none; d=google.com; s=arc-20160816; b=XJDpOln216eELskIfCPZMOyLz77vlk+EY5OqYhI94dGmQlBZYH4pkAHe6u8EmKuhR4 HnBM/TE9qmER108d09sZkRXKSQqX8FrAwFIlb05x4E1nf1NpU/eOM+wimyoEnEjvJuHt Ai7cWdJORBa+6KGLhUp6K4LVOOrd1NzfRkmHlZnniXrsUjx0/X7eRo4IupbNGFjJDz92 KTOdRMEMMaIfLdQx/T8Z1gj9JLmFGNHQapQJt2ukyhs61yzqPCUS8izNJZruh/94I0X+ mWjfdcOzKbP1eRZxVl51t5BHqyxbwcUgctMXvI1QBWafGQvfkq94/c/tXopvt8TbxOXj pdkg== 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 p18-v6si1435632pgb.217.2018.10.12.07.35.55; Fri, 12 Oct 2018 07:36:10 -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 S1728958AbeJLWHf (ORCPT + 99 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 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 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(-) 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)) -- 2.7.4