Skip to content

Commit

Permalink
[PATCH] powerpc/pseries: Increment fail counter in PCI recovery
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Linas Vepstas authored and Paul Mackerras committed May 19, 2006
1 parent 877fbae commit 4240545
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion arch/powerpc/platforms/pseries/eeh_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,11 @@ static void eeh_report_failure(struct pci_dev *dev, void *userdata)

static int eeh_reset_device (struct pci_dn *pe_dn, struct pci_bus *bus)
{
int rc;
int cnt, rc;

/* pcibios will clear the counter; save the value */
cnt = pe_dn->eeh_freeze_count;

if (bus)
pcibios_remove_pci_devices(bus);

Expand Down Expand Up @@ -240,6 +244,7 @@ static int eeh_reset_device (struct pci_dn *pe_dn, struct pci_bus *bus)
ssleep (5);
pcibios_add_pci_devices(bus);
}
pe_dn->eeh_freeze_count = cnt;

return 0;
}
Expand Down

0 comments on commit 4240545

Please sign in to comment.