/[packages]/cauldron/kernel/current/PATCHES/patches/0068-net-hns3-Preserve-vlan-0-in-hardware-table.patch
ViewVC logotype

Contents of /cauldron/kernel/current/PATCHES/patches/0068-net-hns3-Preserve-vlan-0-in-hardware-table.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1329221 - (show annotations) (download)
Fri Nov 9 22:05:45 2018 UTC (5 years, 11 months ago) by tmb
File size: 1601 byte(s)
add fixes from sashas autosel queue
1 From 8ba3a489a618fabdccb87e0e1014fd4c8c5e5f8d Mon Sep 17 00:00:00 2001
2 From: Yunsheng Lin <linyunsheng@huawei.com>
3 Date: Mon, 3 Sep 2018 11:21:52 +0100
4 Subject: [PATCH 068/145] net: hns3: Preserve vlan 0 in hardware table
5
6 [ Upstream commit daaa8521760ee4d4e65f309c4c37b3a1e58c9d4e ]
7
8 When netdev is down, the stack will delete the vlan from
9 hardware including vlan0, which will cause problem when
10 doing loopback selftest when netdev is down.
11
12 This patch fixes it by always preserving vlan 0 in hardware,
13 because vlan 0 is defalut vlan, which should always be in
14 hardware.
15
16 Fixes: c39c4d98dc65 ("net: hns3: Add mac loopback selftest support in hns3 driver")
17 Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
18 Signed-off-by: Peng Li <lipeng321@huawei.com>
19 Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
20 Signed-off-by: David S. Miller <davem@davemloft.net>
21 Signed-off-by: Sasha Levin <sashal@kernel.org>
22 ---
23 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +++
24 1 file changed, 3 insertions(+)
25
26 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
27 index dd1e390ed68e..2d58726893f4 100644
28 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
29 +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
30 @@ -4739,6 +4739,9 @@ static int hclge_set_vlan_filter_hw(struct hclge_dev *hdev, __be16 proto,
31 u16 vport_idx, vport_num = 0;
32 int ret;
33
34 + if (is_kill && !vlan_id)
35 + return 0;
36 +
37 ret = hclge_set_vf_vlan_common(hdev, vport_id, is_kill, vlan_id,
38 0, proto);
39 if (ret) {
40 --
41 2.19.1
42

  ViewVC Help
Powered by ViewVC 1.1.30