[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230512100014.2522-4-lanhao@huawei.com>
Date: Fri, 12 May 2023 18:00:13 +0800
From: Hao Lan <lanhao@...wei.com>
To: <netdev@...r.kernel.org>
CC: <yisen.zhuang@...wei.com>, <salil.mehta@...wei.com>,
<davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
<pabeni@...hat.com>, <lanhao@...wei.com>, <huangguangbin2@...wei.com>,
<simon.horman@...igine.com>, <shaojijie@...wei.com>, <chenhao418@...wei.com>,
<shenjian15@...wei.com>, <liuyonglong@...wei.com>, <wangjie125@...wei.com>,
<yuanjilin@...rlc.com>, <cai.huoqing@...ux.dev>, <xiujianfeng@...wei.com>,
<tanhuazhong@...wei.com>
Subject: [PATCH net 3/4] net: hns3: fix reset delay time to avoid configuration timeout
From: Jie Wang <wangjie125@...wei.com>
Currently the hns3 vf function reset delays 5000ms before vf rebuild
process. In product applications, this delay is too long for application
configurations and causes configuration timeout.
According to the tests, 500ms delay is enough for reset process except PF
FLR. So this patch modifies delay to 500ms in these scenarios.
Fixes: 6988eb2a9b77 ("net: hns3: Add support to reset the enet/ring mgmt layer")
Signed-off-by: Jie Wang <wangjie125@...wei.com>
Signed-off-by: Hao Lan <lanhao@...wei.com>
---
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 f24046250341..dd08989a4c7c 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
@@ -1436,7 +1436,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;
}
--
2.30.0
Powered by blists - more mailing lists