From: Shengzui You youshengzui@huawei.com
driver inclusion category: bugfix bugzilla: NA CVE: NA
------------------------------
If two interrupts are triggered continuously within 15 seconds, modify the timer and reset again after 15 seconds.
Signed-off-by: Shengzui You youshengzui@huawei.com Reviewed-by: Weiwei Deng dengweiwei@huawei.com Reviewed-by: Zhaohui Zhong zhongzhaohui@huawei.com Reviewed-by: Junxin Chen chenjunxin1@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- .../hisilicon/hns3/hns-customer/hns3pf/hclge_main_it.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns-customer/hns3pf/hclge_main_it.c b/drivers/net/ethernet/hisilicon/hns3/hns-customer/hns3pf/hclge_main_it.c index b8cab1665385..01f0e19f1e50 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns-customer/hns3pf/hclge_main_it.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns-customer/hns3pf/hclge_main_it.c @@ -115,13 +115,15 @@ void hclge_reset_event_it(struct pci_dev *pdev, struct hnae3_handle *handle) * not allow it again before 12*HZ times. */ if (time_before(jiffies, (hdev->last_reset_time + - HCLGE_RESET_INTERVAL))) + HCLGE_RESET_INTERVAL))) { + mod_timer(&hdev->reset_timer, jiffies + HCLGE_RESET_INTERVAL); return; - else if (hdev->default_reset_request) + } else if (hdev->default_reset_request) { hdev->reset_level = hclge_get_reset_level(ae_dev, &hdev->default_reset_request); - else if (time_after(jiffies, (hdev->last_reset_time + 4 * 5 * HZ))) + } else if (time_after(jiffies, (hdev->last_reset_time + 4 * 5 * HZ))) { hdev->reset_level = HNAE3_FUNC_RESET; + }
dev_info(&hdev->pdev->dev, "IT received reset event, reset type is %d", hdev->reset_level);