All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI / PCIe portdrv: Fix pcie_portdrv_slot_reset()
@ 2009-09-14 20:25 Rafael J. Wysocki
  2009-09-14 20:39 ` Jesse Barnes
  2009-09-14 20:51 ` Daniel Walker
  0 siblings, 2 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2009-09-14 20:25 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: LKML, Linux PCI

From: Rafael J. Wysocki <rjw@sisk.pl>

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().

From: Rafael J. Wysocki <rjw@sisk.pl>
---
 drivers/pci/pcie/portdrv_pci.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux-2.6/drivers/pci/pcie/portdrv_pci.c
===================================================================
--- linux-2.6.orig/drivers/pci/pcie/portdrv_pci.c
+++ linux-2.6/drivers/pci/pcie/portdrv_pci.c
@@ -205,6 +205,7 @@ static pci_ers_result_t pcie_portdrv_slo
 
 	/* If fatal, restore cfg space for possible link reset at upstream */
 	if (dev->error_state == pci_channel_io_frozen) {
+		dev->state_saved = true;
 		pci_restore_state(dev);
 		pcie_portdrv_restore_config(dev);
 		pci_enable_pcie_error_reporting(dev);

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-09-14 21:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-14 20:25 [PATCH] PCI / PCIe portdrv: Fix pcie_portdrv_slot_reset() Rafael J. Wysocki
2009-09-14 20:39 ` Jesse Barnes
2009-09-14 20:51 ` Daniel Walker
2009-09-14 21:03   ` Rafael J. Wysocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.