]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: fix the timing issue of VF clearing interrupt sources
authorJiaran Zhang <zhangjiaran@huawei.com>
Mon, 13 Sep 2021 13:08:25 +0000 (21:08 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Sep 2021 10:26:43 +0000 (12:26 +0200)
commit34600a326fd578eeb25e1a4dcdb9245d6ee627cd
treed2ffbf16dfb64b5cb503b281b0827f058df92122
parent38c0bc9be8dda157e666048ff2f44817003c6c64
net: hns3: fix the timing issue of VF clearing interrupt sources

commit 427900d27d86b820c559037a984bd403f910860f upstream.

Currently, the VF does not clear the interrupt source immediately after
receiving the interrupt. As a result, if the second interrupt task is
triggered when processing the first interrupt task, clearing the
interrupt source before exiting will clear the interrupt sources of the
two tasks at the same time. As a result, no interrupt is triggered for
the second task. The VF detects the missed message only when the next
interrupt is generated.

Clearing it immediately after executing check_evt_cause ensures that:
1. Even if two interrupt tasks are triggered at the same time, they can
be processed.
2. If the second task is triggered during the processing of the first
task and the interrupt source is not cleared, the interrupt is reported
after vector0 is enabled.

Fixes: 89427b172e06 ("net: hns3: add reset handling for VF when doing Core/Global/IMP reset")
Signed-off-by: Jiaran Zhang <zhangjiaran@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c