Skip to content

Commit 0770063

Browse files
Jie WangPaolo Abeni
authored andcommitted
net: hns3: add 5ms delay before clear firmware reset irq source
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. Fixes: c1a8161 ("net: hns3: Add mailbox interrupt handling to PF driver") Signed-off-by: Jie Wang <wangjie125@huawei.com> Signed-off-by: Jijie Shao <shaojijie@huawei.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent 1a7be66 commit 0770063

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3564,9 +3564,14 @@ static u32 hclge_check_event_cause(struct hclge_dev *hdev, u32 *clearval)
35643564
static void hclge_clear_event_cause(struct hclge_dev *hdev, u32 event_type,
35653565
u32 regclr)
35663566
{
3567+
#define HCLGE_IMP_RESET_DELAY 5
3568+
35673569
switch (event_type) {
35683570
case HCLGE_VECTOR0_EVENT_PTP:
35693571
case HCLGE_VECTOR0_EVENT_RST:
3572+
if (regclr == BIT(HCLGE_VECTOR0_IMPRESET_INT_B))
3573+
mdelay(HCLGE_IMP_RESET_DELAY);
3574+
35703575
hclge_write_dev(&hdev->hw, HCLGE_MISC_RESET_STS_REG, regclr);
35713576
break;
35723577
case HCLGE_VECTOR0_EVENT_MBX:

0 commit comments

Comments
 (0)