/[packages]/cauldron/kernel/current/PATCHES/patches/0070-net-hns3-Fix-for-vf-vlan-delete-failed-problem.patch
ViewVC logotype

Annotation of /cauldron/kernel/current/PATCHES/patches/0070-net-hns3-Fix-for-vf-vlan-delete-failed-problem.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1329221 - (hide annotations) (download)
Fri Nov 9 22:05:45 2018 UTC (5 years, 10 months ago) by tmb
File size: 1939 byte(s)
add fixes from sashas autosel queue
1 tmb 1329221 From e5ffaa9cf9d2389184a89f67e63b98077bed9d10 Mon Sep 17 00:00:00 2001
2     From: Yunsheng Lin <linyunsheng@huawei.com>
3     Date: Mon, 3 Sep 2018 11:21:46 +0100
4     Subject: [PATCH 070/145] net: hns3: Fix for vf vlan delete failed problem
5    
6     [ Upstream commit 41dafea2af781d8e3ab8626d236b52e4172905a3 ]
7    
8     There are only 128 entries in vf vlan table, if user has added
9     more than 128 vlan, fw will ignore it and disable the vf vlan
10     table. So when user deletes the vlan entry that has not been
11     set to vf vlan table, fw will return not found result and driver
12     treat that as error, which will cause vlan delete failed problem.
13    
14     This patch fixes it by returning ok when fw returns not found
15     result.
16    
17     Fixes: 6c251711b37f ("net: hns3: Disable vf vlan filter when vf vlan table is full")
18     Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
19     Signed-off-by: Peng Li <lipeng321@huawei.com>
20     Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
21     Signed-off-by: David S. Miller <davem@davemloft.net>
22     Signed-off-by: Sasha Levin <sashal@kernel.org>
23     ---
24     drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 8 ++++++++
25     1 file changed, 8 insertions(+)
26    
27     diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
28     index 2d58726893f4..db763450e5e3 100644
29     --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
30     +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
31     @@ -4693,9 +4693,17 @@ static int hclge_set_vf_vlan_common(struct hclge_dev *hdev, int vfid,
32     "Add vf vlan filter fail, ret =%d.\n",
33     req0->resp_code);
34     } else {
35     +#define HCLGE_VF_VLAN_DEL_NO_FOUND 1
36     if (!req0->resp_code)
37     return 0;
38    
39     + if (req0->resp_code == HCLGE_VF_VLAN_DEL_NO_FOUND) {
40     + dev_warn(&hdev->pdev->dev,
41     + "vlan %d filter is not in vf vlan table\n",
42     + vlan);
43     + return 0;
44     + }
45     +
46     dev_err(&hdev->pdev->dev,
47     "Kill vf vlan filter fail, ret =%d.\n",
48     req0->resp_code);
49     --
50     2.19.1
51    

  ViewVC Help
Powered by ViewVC 1.1.30