diff options
author | Linas Vepstas <linas@austin.ibm.com> | 2006-04-28 18:39:38 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-05-18 23:51:12 -0400 |
commit | 4240545661fc0ac25122f166e96633527150300c (patch) | |
tree | 9be44f79aa0a37d49744ce5a685ec41d057c60f3 | |
parent | 877fbae3d51ba792639535bfc0f428154b8da605 (diff) |
[PATCH] powerpc/pseries: Increment fail counter in PCI recovery
When a PCI device driver does not support PCI error recovery,
the powerpc/pseries code takes a walk through a branch of code
that resets the failure counter. Because of this, if a broken
PCI card is present, the kernel will attempt to reset it an
infinite number of times. (This is annoying but mostly harmless:
each reset takes about 10-20 seconds, and uses almost no CPU time).
This patch preserves the failure count across resets.
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r-- | arch/powerpc/platforms/pseries/eeh_driver.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c index 2a9eb2630730..4d45347afabc 100644 --- a/arch/powerpc/platforms/pseries/eeh_driver.c +++ b/arch/powerpc/platforms/pseries/eeh_driver.c | |||
@@ -201,7 +201,11 @@ static void eeh_report_failure(struct pci_dev *dev, void *userdata) | |||
201 | 201 | ||
202 | static int eeh_reset_device (struct pci_dn *pe_dn, struct pci_bus *bus) | 202 | static int eeh_reset_device (struct pci_dn *pe_dn, struct pci_bus *bus) |
203 | { | 203 | { |
204 | int rc; | 204 | int cnt, rc; |
205 | |||
206 | /* pcibios will clear the counter; save the value */ | ||
207 | cnt = pe_dn->eeh_freeze_count; | ||
208 | |||
205 | if (bus) | 209 | if (bus) |
206 | pcibios_remove_pci_devices(bus); | 210 | pcibios_remove_pci_devices(bus); |
207 | 211 | ||
@@ -240,6 +244,7 @@ static int eeh_reset_device (struct pci_dn *pe_dn, struct pci_bus *bus) | |||
240 | ssleep (5); | 244 | ssleep (5); |
241 | pcibios_add_pci_devices(bus); | 245 | pcibios_add_pci_devices(bus); |
242 | } | 246 | } |
247 | pe_dn->eeh_freeze_count = cnt; | ||
243 | 248 | ||
244 | return 0; | 249 | return 0; |
245 | } | 250 | } |