Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3486948imu; Sun, 11 Nov 2018 16:12:09 -0800 (PST) X-Google-Smtp-Source: AJdET5fFuKzxZQtCNECpaqaILlUwZ+h+Jh78EeDZ7x0kU0Cpi0V//przx306M+KRNcb7sYWyQvs0 X-Received: by 2002:a63:fb0b:: with SMTP id o11mr15524832pgh.211.1541981529789; Sun, 11 Nov 2018 16:12:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541981529; cv=none; d=google.com; s=arc-20160816; b=J8t1MWZCdekAPtgjqNxfiMeQOtb0o8OJNa1XcAg4M+i3L4xniuoAVz10F/1K4M7E1q XUDTcUrsEJ9NlSGY+X08n02MEop+GwCcUpHdK60EmrEZzRJhoYedbdBR3OClRZK1FrRC qq7SKJFK55Q7jTOPOkFWzoazze+aWbIuYmcPZWKmoR3QhFAL0EFnhQfYyT9SFvM1jWye 5zJCbNy9BiA7M3bM68Nil9Mh+9B+ur8KWSG59fbyD85fTvVnnEApPo6TRTITCal6JQP5 QS/5s1lNkNEFckuLW1obEFHDVfB+RX31e+nujSXUgTEPLS4rnGygNAlqc4nWy24fWcaU sXnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HfIsIJ4ucRpFzBt0rxQamUOyG7XP0kbMjGAJAjHlSQ8=; b=zdRoW6Dx4UvZ6Bj4nbK3a12TuFbPpx2g9b2hZGKt8obAfk4XHU1BVw4A3lO9v/cD1j dq8bQFdBEO1LEiCZmPslKi0fbaMX4XBTen9zBz0Pol3VwiLEJCKC8nn5XNJEl2WazrFm NY4tzSNrm8C1Jit9lEqlSqL9kqh9EdNbPXv0r8JBIX+XY9cCXHOgwjTW/v8bmxwXOhN+ q6mcqznF8sKyuDgyiuwTreRUuvRExp5HmGT/KZlmoaf9PXr5YXmfRlQrheo7273mdktE FpwD79z1ZwT9SVDbq9N1vTa/a8vc/jyvbBwAd8cQGmpgvMhRBZlY+DcCELUILzn919Sk gXHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ImaQUKdq; 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 x87-v6si17600965pfk.54.2018.11.11.16.11.54; Sun, 11 Nov 2018 16:12:09 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=ImaQUKdq; 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 S1731251AbeKLKAs (ORCPT + 99 others); Mon, 12 Nov 2018 05:00:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:59904 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730862AbeKLIR0 (ORCPT ); Mon, 12 Nov 2018 03:17:26 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 76F8221707; Sun, 11 Nov 2018 22:27:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975250; bh=lzyuuNse1K8o7r7gtEj929DT3ByU9ywx9uh8c4sBQ9o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ImaQUKdqJCxTfMl0X7MO0zEtbLPJS3kNcePitdJ4qV95B7+bFKvu+s2Guhk4veEjJ maHFihc5gXGpBN5ZLb9SL5chtiWViT5wqZ3M/O4yaz+Wzuhpije0Ctjiji8e+Nx0WN UXj7WHMV6JhwU4rMr3NxzA8o+wl5YbM8WnaWnCww= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yunsheng Lin , Peng Li , Salil Mehta , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 114/361] net: hns3: Preserve vlan 0 in hardware table Date: Sun, 11 Nov 2018 14:17:41 -0800 Message-Id: <20181111221635.801198247@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yunsheng Lin [ Upstream commit daaa8521760ee4d4e65f309c4c37b3a1e58c9d4e ] When netdev is down, the stack will delete the vlan from hardware including vlan0, which will cause problem when doing loopback selftest when netdev is down. This patch fixes it by always preserving vlan 0 in hardware, because vlan 0 is defalut vlan, which should always be in hardware. Fixes: c39c4d98dc65 ("net: hns3: Add mac loopback selftest support in hns3 driver") Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -4739,6 +4739,9 @@ static int hclge_set_vlan_filter_hw(stru u16 vport_idx, vport_num = 0; int ret; + if (is_kill && !vlan_id) + return 0; + ret = hclge_set_vf_vlan_common(hdev, vport_id, is_kill, vlan_id, 0, proto); if (ret) {