• Huazhong Tan's avatar
    net: hns3: fix interrupt clearing error for VF · 13050921
    Huazhong Tan authored
    Currently, VF driver has two kinds of interrupts, reset & CMDQ RX.
    For revision 0x21, according to the UM, each interrupt should be
    cleared by write 0 to the corresponding bit, but the implementation
    writes 0 to the whole register in fact, it will clear other
    interrupt at the same time, then the VF will loss the interrupt.
    But for revision 0x20, this interrupt clear register is a read &
    write register, for compatible, we just keep the old implementation
    for 0x20.
    
    This patch fixes it, also, adds a new register for reading the interrupt
    status according to hardware user manual.
    
    Fixes: e2cb1dec ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support")
    Fixes: b90fcc5b ("net: hns3: add reset handling for VF when doing Core/Global/IMP reset")
    Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
    Reviewed-by: default avatarYunsheng Lin <linyunsheng@huawei.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    13050921
hclgevf_main.c 79.6 KB