2009-09-14 20:24:18

by Rafael J. Wysocki

[permalink] [raw]
Subject: [PATCH] PCI / PCIe portdrv: Fix pcie_portdrv_slot_reset()

From: Rafael J. Wysocki <[email protected]>

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 <[email protected]>
---
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);


2009-09-14 20:39:14

by Jesse Barnes

[permalink] [raw]
Subject: Re: [PATCH] PCI / PCIe portdrv: Fix pcie_portdrv_slot_reset()

On Mon, 14 Sep 2009 22:25:11 +0200
"Rafael J. Wysocki" <[email protected]> wrote:

> From: Rafael J. Wysocki <[email protected]>
>
> 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 <[email protected]>

Applied to linux-next, thanks.

--
Jesse Barnes, Intel Open Source Technology Center

2009-09-14 20:50:59

by Daniel Walker

[permalink] [raw]
Subject: Re: [PATCH] PCI / PCIe portdrv: Fix pcie_portdrv_slot_reset()

On Mon, 2009-09-14 at 22:25 +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <[email protected]>
>
> 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 <[email protected]>
> ---

No sign off?

Daniel

2009-09-14 21:02:27

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH] PCI / PCIe portdrv: Fix pcie_portdrv_slot_reset()

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 <[email protected]>
> >
> > 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 <[email protected]>
> > ---
>
> No sign off?

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

Rafael