• H
    net: hns3: clear reset interrupt status in hclge_irq_handle() · e2f72567
    Huazhong Tan 提交于
    driver inclusion
    category: bugfix
    bugzilla: NA
    CVE: NA
    
    Currently, the reset interrupt is cleared in the reset task, which
    is too late. Since, when the hardware finish the previous reset,
    it can begin to do a new global/IMP reset, if this new coming reset
    type is same as the previous one, the driver will clear them together,
    then driver can not get that there is another reset, but the hardware
    still wait for the driver to deal with the second one.
    
    So this patch clears PF's reset interrupt status in the
    hclge_irq_handle(), the hardware waits for handshaking from
    driver before doing reset, so the driver and hardware deal with reset
    one by one.
    
    BTW, when VF doing global/IMP reset, it reads PF's reset interrupt
    register to get that whether PF driver's re-initialization is done,
    since VF's re-initialization should be done after PF's. So we add
    a new command and a regiter bit to do that. When VF receive reset
    interrupt, it sets up this bit, and PF finishes re-initialization
    send command to clear this bit, then VF do re-initialization.
    
    Feature or Bugfix:Bugfix
    Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
    Reviewed-by: Nlinyunsheng <linyunsheng@huawei.com>
    Reviewed-by: NYunsheng Lin <linyunsheng@huawei.com>
    Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
    Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
    e2f72567
hclge_main.c 264.6 KB