Message ID | 20230915095305.422328-6-shaojijie@huawei.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | There are some bugfix for the HNS3 ethernet driver | expand |
On Fri, Sep 15, 2023 at 05:53:05PM +0800, Jijie Shao wrote: > From: Jie Wang <wangjie125@huawei.com> > > Currently the reset process in hns3 and firmware watchdog init process is > asynchronous. we think firmware watchdog initialization is completed > before hns3 clear the firmware interrupt source. However, firmware > initialization may not complete early. > > so we add delay before hns3 clear firmware interrupt source and 5 ms delay > is enough to avoid second firmware reset interrupt. > > Signed-off-by: Jie Wang <wangjie125@huawei.com> > Signed-off-by: Jijie Shao <shaojijie@huawei.com> Hi Jijie Shao, is it appropriate to add the following tag? Fixes: c1a81619d73a ("net: hns3: Add mailbox interrupt handling to PF driver")
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 2bd77871f3bf..c42574e29747 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -3564,9 +3564,14 @@ static u32 hclge_check_event_cause(struct hclge_dev *hdev, u32 *clearval) static void hclge_clear_event_cause(struct hclge_dev *hdev, u32 event_type, u32 regclr) { +#define HCLGE_IMP_RESET_DELAY 5 + switch (event_type) { case HCLGE_VECTOR0_EVENT_PTP: case HCLGE_VECTOR0_EVENT_RST: + if (regclr == BIT(HCLGE_VECTOR0_IMPRESET_INT_B)) + mdelay(HCLGE_IMP_RESET_DELAY); + hclge_write_dev(&hdev->hw, HCLGE_MISC_RESET_STS_REG, regclr); break; case HCLGE_VECTOR0_EVENT_MBX: