提交 e107098b 编写于 作者: K Keith Busch 提交者: Yang Yingliang

Intel:PCI/ERR: Always report current recovery status for udev

mainline inclusion
from mainline-v4.20-rc1
commit 7b42d97e
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I47H3V
CVE: NA

--------------------------------

commit 7b42d97e upstream.
Backport summary: for 4.19 kernel ICX PCIe Gen4 support.

A device still participates in error recovery even if it doesn't have
the error callbacks.

Always provide the status for user event watchers.
Signed-off-by: NKeith Busch <keith.busch@intel.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: NSinan Kaya <okaya@kernel.org>
(cherry picked from commit 7b42d97e)
Signed-off-by: NEthan Zhao <haifeng.zhao@intel.com>
Signed-off-by: NJackie Liu <liuyun01@kylinos.cn>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: NXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 87bdac8c
......@@ -72,9 +72,8 @@ static int report_error_detected(struct pci_dev *dev,
} else {
err_handler = dev->driver->err_handler;
vote = err_handler->error_detected(dev, state);
pci_uevent_ers(dev, PCI_ERS_RESULT_NONE);
}
pci_uevent_ers(dev, vote);
*result = merge_result(*result, vote);
device_unlock(&dev->dev);
return 0;
......@@ -142,8 +141,8 @@ static int report_resume(struct pci_dev *dev, void *data)
err_handler = dev->driver->err_handler;
err_handler->resume(dev);
pci_uevent_ers(dev, PCI_ERS_RESULT_RECOVERED);
out:
pci_uevent_ers(dev, PCI_ERS_RESULT_RECOVERED);
device_unlock(&dev->dev);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册