diff options
author | Mike Mason <mmlnx@us.ibm.com> | 2009-07-30 18:42:39 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-09-09 16:29:41 -0400 |
commit | 6e19314cc98ab9ccc22c30d1c414984ac6de5ce2 (patch) | |
tree | 2e83662e5e8cc1a0c30bba06008fe1b955c94cd5 /arch/powerpc | |
parent | fe14acd4e7c8178dfb172c1e7a88356657378128 (diff) |
PCI/powerpc: support PCIe fundamental reset
By default, the EEH framework on powerpc does what's known as a "hot
reset" during recovery of a PCI Express device. We've found a case
where the device needs a "fundamental reset" to recover properly. The
current PCI error recovery and EEH frameworks do not support this
distinction.
The attached patch makes changes to EEH to utilize the new bit field.
Signed-off-by: Mike Mason <mmlnx@us.ibm.com>
Signed-off-by: Richard Lary <rlary@us.ibm.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/pci_64.c | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/eeh.c | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 9e8902fa14c7..b6e9ea45a719 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -143,6 +143,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node, | |||
143 | dev->dev.bus = &pci_bus_type; | 143 | dev->dev.bus = &pci_bus_type; |
144 | dev->devfn = devfn; | 144 | dev->devfn = devfn; |
145 | dev->multifunction = 0; /* maybe a lie? */ | 145 | dev->multifunction = 0; /* maybe a lie? */ |
146 | dev->needs_freset = 0; /* pcie fundamental reset required */ | ||
146 | 147 | ||
147 | dev->vendor = get_int_prop(node, "vendor-id", 0xffff); | 148 | dev->vendor = get_int_prop(node, "vendor-id", 0xffff); |
148 | dev->device = get_int_prop(node, "device-id", 0xffff); | 149 | dev->device = get_int_prop(node, "device-id", 0xffff); |
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 989d6462c154..ccd8dd03b8c9 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c | |||
@@ -744,7 +744,15 @@ int pcibios_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state stat | |||
744 | 744 | ||
745 | static void __rtas_set_slot_reset(struct pci_dn *pdn) | 745 | static void __rtas_set_slot_reset(struct pci_dn *pdn) |
746 | { | 746 | { |
747 | rtas_pci_slot_reset (pdn, 1); | 747 | struct pci_dev *dev = pdn->pcidev; |
748 | |||
749 | /* Determine type of EEH reset required by device, | ||
750 | * default hot reset or fundamental reset | ||
751 | */ | ||
752 | if (dev->needs_freset) | ||
753 | rtas_pci_slot_reset(pdn, 3); | ||
754 | else | ||
755 | rtas_pci_slot_reset(pdn, 1); | ||
748 | 756 | ||
749 | /* The PCI bus requires that the reset be held high for at least | 757 | /* The PCI bus requires that the reset be held high for at least |
750 | * a 100 milliseconds. We wait a bit longer 'just in case'. */ | 758 | * a 100 milliseconds. We wait a bit longer 'just in case'. */ |