net: hns3: code optimizaition of hclge_handle_hw_ras_error()
driver inclusion category: bugfix bugzilla: NA CVE: NA This patch syncronizes some difference from kernel-dev branch, which optimizes hclge_handle_hw_ras_error() to make the code logic clearer. 1. If there was no NIC or Roce RAS when we read HCLGE_RAS_PF_OTHER_INT_STS_REG, we return directly. 2. Because NIC and Roce RAS may occurs at the same time, so we should check value of revision at first before we handle Roce RAS instead of only checking it in branch of no NIC RAS is detected. 3. Check HCLGE_STATE_RST_HANDLING each time before we want to return PCI_ERS_RESULT_NEED_RESET. 4. Remove checking of HCLGE_RAS_REG_NFE_MASK and HCLGE_RAS_REG_ROCEE_ERR_MASK because if hw_err_reset_req is not zero, it proves that we have set it in handling of NIC or Roce RAS. 5. Remove override_pci_need_reset, because hw_err_reset_req can be used to record reset level that we need to recover from a RAS error. Feature or Bugfix:Bugfix Signed-off-by: NWeihang Li <liweihang@hisilicon.com> Signed-off-by: NYufeng Mo <moyufeng@huawei.com> Reviewed-by: Ntanhuazhong <tanhuazhong@huawei.com> Reviewed-by: Nlipeng <lipeng321@huawei.com> Reviewed-by: NYunsheng Lin <linyunsheng@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录