/[packages]/cauldron/kernel/current/PATCHES/patches/0055-net-hns3-Set-STATE_DOWN-bit-of-hdev-state-when-stopp.patch
ViewVC logotype

Contents of /cauldron/kernel/current/PATCHES/patches/0055-net-hns3-Set-STATE_DOWN-bit-of-hdev-state-when-stopp.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1329221 - (show annotations) (download)
Fri Nov 9 22:05:45 2018 UTC (5 years, 9 months ago) by tmb
File size: 2366 byte(s)
add fixes from sashas autosel queue
1 From eff978c8a314d6e577522df9f261288c03e9e38a Mon Sep 17 00:00:00 2001
2 From: Fuyun Liang <liangfuyun1@huawei.com>
3 Date: Wed, 19 Sep 2018 18:29:52 +0100
4 Subject: [PATCH 055/145] net: hns3: Set STATE_DOWN bit of hdev state when
5 stopping net
6
7 [ Upstream commit 2f7e489611bc685b8e00aba436032a8aac6cac57 ]
8
9 We clear STATE_DOWN bit of hdev state when starting net, but do not set
10 it again when stopping net. It causes that the net is down, but hdev state
11 is still up. STATE_DOWN bit of hdev state should be set when stopping net.
12
13 Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
14 Fixes: e2cb1dec9779 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support")
15 Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com>
16 Signed-off-by: Peng Li <lipeng321@huawei.com>
17 Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
18 Signed-off-by: David S. Miller <davem@davemloft.net>
19 Signed-off-by: Sasha Levin <sashal@kernel.org>
20 ---
21 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 ++
22 drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 2 ++
23 2 files changed, 4 insertions(+)
24
25 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
26 index 0c64089c914f..dd1e390ed68e 100644
27 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
28 +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
29 @@ -3814,6 +3814,8 @@ static void hclge_ae_stop(struct hnae3_handle *handle)
30 struct hclge_dev *hdev = vport->back;
31 int i;
32
33 + set_bit(HCLGE_STATE_DOWN, &hdev->state);
34 +
35 del_timer_sync(&hdev->service_timer);
36 cancel_work_sync(&hdev->service_task);
37 clear_bit(HCLGE_STATE_SERVICE_SCHED, &hdev->state);
38 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
39 index d78064bb718a..320043e87fc6 100644
40 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
41 +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
42 @@ -1451,6 +1451,8 @@ static void hclgevf_ae_stop(struct hnae3_handle *handle)
43 struct hclgevf_dev *hdev = hclgevf_ae_get_hdev(handle);
44 int i, queue_id;
45
46 + set_bit(HCLGEVF_STATE_DOWN, &hdev->state);
47 +
48 for (i = 0; i < hdev->num_tqps; i++) {
49 /* Ring disable */
50 queue_id = hclgevf_get_queue_id(handle->kinfo.tqp[i]);
51 --
52 2.19.1
53

  ViewVC Help
Powered by ViewVC 1.1.30