From e1e5cdf4e359c9eef7e785e7e7d1b90c90daec3c Mon Sep 17 00:00:00 2001 From: Jie Wang Date: Mon, 3 Apr 2023 14:11:07 +0800 Subject: [PATCH] net: hns3: modify reset delay time to avoid configuration timeout driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6SLBO CVE: NA ---------------------------------------------------------------------- Currently the vf function reset needs to delay 5000ms for stack recovery. This is too long for product configurations and cause configuration failures. According to the tests, 500ms delay is enough for reset process except PF FLR. So this patch adapts this delay in these scenarios. Signed-off-by: Jie Wang --- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c index 789be62a105c..b5738a7e260a 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c @@ -1504,7 +1504,10 @@ static int hclgevf_reset_wait(struct hclgevf_dev *hdev) * might happen in case reset assertion was made by PF. Yes, this also * means we might end up waiting bit more even for VF reset. */ - msleep(5000); + if (hdev->reset_type == HNAE3_VF_FULL_RESET) + msleep(5000); + else + msleep(500); return 0; } -- GitLab