aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2009-09-14 16:25:11 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-09-14 16:38:55 -0400
commite9d8288871efa0d98a1d1d1f17976b5b00a0234d (patch)
treed446e04d904afeb5bda9598ec526d9beef2c5e95
parent7f53866932fd08add06ee2f93ead129949158490 (diff)
PCI / PCIe portdrv: Fix pcie_portdrv_slot_reset()
After commit c82f63e411f1b58427c103bd95af2863b1c96dd1 (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: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
-rw-r--r--drivers/pci/pcie/portdrv_pci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
index 091ce70051e0..6df5c984a791 100644
--- a/drivers/pci/pcie/portdrv_pci.c
+++ b/drivers/pci/pcie/portdrv_pci.c
@@ -205,6 +205,7 @@ static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev)
205 205
206 /* If fatal, restore cfg space for possible link reset at upstream */ 206 /* If fatal, restore cfg space for possible link reset at upstream */
207 if (dev->error_state == pci_channel_io_frozen) { 207 if (dev->error_state == pci_channel_io_frozen) {
208 dev->state_saved = true;
208 pci_restore_state(dev); 209 pci_restore_state(dev);
209 pcie_portdrv_restore_config(dev); 210 pcie_portdrv_restore_config(dev);
210 pci_enable_pcie_error_reporting(dev); 211 pci_enable_pcie_error_reporting(dev);