diff mbox

PCI / PCIe portdrv: Fix pcie_portdrv_slot_reset()

Message ID 200909142225.11874.rjw@sisk.pl
State Accepted, archived
Headers show

Commit Message

Rafael Wysocki Sept. 14, 2009, 8:25 p.m. UTC
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(+)

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Jesse Barnes Sept. 14, 2009, 8:39 p.m. UTC | #1
On Mon, 14 Sep 2009 22:25:11 +0200
"Rafael J. Wysocki" <rjw@sisk.pl> wrote:

> 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>

Applied to linux-next, thanks.
Daniel Walker Sept. 14, 2009, 8:51 p.m. UTC | #2
On Mon, 2009-09-14 at 22:25 +0200, Rafael J. Wysocki wrote:
> 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>
> ---

No sign off?

Daniel

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafael Wysocki Sept. 14, 2009, 9:03 p.m. UTC | #3
On Monday 14 September 2009, Daniel Walker wrote:
> On Mon, 2009-09-14 at 22:25 +0200, Rafael J. Wysocki wrote:
> > 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>
> > ---
> 
> No sign off?

The second From: should be s-o-b, copy-paste mistake.

Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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);