提交 e9d82888 编写于 作者: R Rafael J. Wysocki 提交者: Jesse Barnes

PCI / PCIe portdrv: Fix pcie_portdrv_slot_reset()

After commit c82f63e4
(PCI: check saved state before restore) pcie_portdrv_slot_reset()
may not work correctly if dev->error_state is equal to
pci_channel_io_frozen, because dev->state_saved need not be set at
that time.  Fix this issue by setting dev->state_saved before
pci_restore_state() is called in pcie_portdrv_slot_reset().
Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
上级 7f538669
...@@ -205,6 +205,7 @@ static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev) ...@@ -205,6 +205,7 @@ static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev)
/* If fatal, restore cfg space for possible link reset at upstream */ /* If fatal, restore cfg space for possible link reset at upstream */
if (dev->error_state == pci_channel_io_frozen) { if (dev->error_state == pci_channel_io_frozen) {
dev->state_saved = true;
pci_restore_state(dev); pci_restore_state(dev);
pcie_portdrv_restore_config(dev); pcie_portdrv_restore_config(dev);
pci_enable_pcie_error_reporting(dev); pci_enable_pcie_error_reporting(dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册