[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221222064343.61537-2-lanhao@huawei.com>
Date: Thu, 22 Dec 2022 14:43:41 +0800
From: Hao Lan <lanhao@...wei.com>
To: <davem@...emloft.net>, <kuba@...nel.org>
CC: <yisen.zhuang@...wei.com>, <salil.mehta@...wei.com>,
<edumazet@...gle.com>, <pabeni@...hat.com>,
<richardcochran@...il.com>, <huangguangbin2@...wei.com>,
<wangjie125@...wei.com>, <shenjian15@...wei.com>,
<netdev@...r.kernel.org>
Subject: [PATCH net 1/3] net: hns3: add interrupts re-initialization while doing VF FLR
From: Jie Wang <wangjie125@...wei.com>
Currently keep alive message between PF and VF may be lost and the VF is
unalive in PF. So the VF will not do reset during PF FLR reset process.
This would make the allocated interrupt resources of VF invalid and VF
would't receive or respond to PF any more.
So this patch adds VF interrupts re-initialization during VF FLR for VF
recovery in above cases.
Fixes: 862d969a3a4d ("net: hns3: do VF's pci re-initialization while PF doing FLR")
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 | 3 ++-
1 file changed, 2 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 db6f7cdba958..081bd2c3f289 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
@@ -2767,7 +2767,8 @@ static int hclgevf_pci_reset(struct hclgevf_dev *hdev)
struct pci_dev *pdev = hdev->pdev;
int ret = 0;
- if (hdev->reset_type == HNAE3_VF_FULL_RESET &&
+ if ((hdev->reset_type == HNAE3_VF_FULL_RESET ||
+ hdev->reset_type == HNAE3_FLR_RESET) &&
test_bit(HCLGEVF_STATE_IRQ_INITED, &hdev->state)) {
hclgevf_misc_irq_uninit(hdev);
hclgevf_uninit_msi(hdev);
--
2.30.0
Powered by blists - more mailing lists