• Jiaran Zhang's avatar
    net: hns3: fix the timing issue of VF clearing interrupt sources · 427900d2
    Jiaran Zhang authored
    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: b90fcc5b ("net: hns3: add reset handling for VF when doing Core/Global/IMP reset")
    Signed-off-by: default avatarJiaran Zhang <zhangjiaran@huawei.com>
    Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    427900d2
hclgevf_main.c 104 KB