• H
    net: hns3: fix some reset handshake issue · 6b428b4f
    Huazhong Tan 提交于
    Currently, the driver sets handshake status to tell the hardware
    that the driver have downed the netdev and it can continue with
    reset process. The driver will clear the handshake status when
    re-initializing the CMDQ, and does not recover this status
    when reset fail, which may cause the hardware to wait for
    the handshake status to be set and not being able to continue
    with reset process.
    
    So this patch delays clearing handshake status just before UP,
    and recovers this status when reset fail.
    
    BTW, this patch adds a new function hclge(vf)_reset_handshake() to
    deal with the reset handshake issue, and renames
    HCLGE(VF)_NIC_CMQ_ENABLE to HCLGE(VF)_NIC_SW_RST_RDY which
    represents this register bit more accurately.
    
    Fixes: ada13ee3 ("net: hns3: add handshake with hardware while doing reset")
    Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
    Reviewed-by: NPeng Li <lipeng321@huawei.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    6b428b4f
hclgevf_main.c 78.9 KB