* [PATCH 2/3] powerpc/eeh: Handle functional reset on non-PCIe device
@ 2011-04-22 20:00 Richard A Lary
0 siblings, 0 replies; only message in thread
From: Richard A Lary @ 2011-04-22 20:00 UTC (permalink / raw)
To: linuxppc-dev; +Cc: antonb
From: Richard A Lary <rlary@linux.vnet.ibm.com>
Fundamental reset is an optional reset type supported only by PCIe adapters.
Handle the unexpected case where a non-PCIe device has requested a
fundamental reset. Try hot-reset as a fallback to handle this case.
Signed-off-by: Richard A Lary <rlary@linux.vnet.ibm.com>
---
arch/powerpc/platforms/pseries/eeh.c | 21 16 + 5 - 0 !
1 file changed, 16 insertions(+), 5 deletions(-)
Index: b/arch/powerpc/platforms/pseries/eeh.c
===================================================================
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -725,15 +725,26 @@ rtas_pci_slot_reset(struct pci_dn *pdn,
if (pdn->eeh_pe_config_addr)
config_addr = pdn->eeh_pe_config_addr;
- rc = rtas_call(ibm_set_slot_reset,4,1, NULL,
+ rc = rtas_call(ibm_set_slot_reset, 4, 1, NULL,
config_addr,
BUID_HI(pdn->phb->buid),
BUID_LO(pdn->phb->buid),
state);
- if (rc)
- printk (KERN_WARNING "EEH: Unable to reset the failed slot,"
- " (%d) #RST=%d dn=%s\n",
- rc, state, pdn->node->full_name);
+
+ /* Fundamental-reset not supported on this PE, try hot-reset */
+ if (rc == -8 && state == 3) {
+ state = 1;
+ rc = rtas_call(ibm_set_slot_reset, 4, 1, NULL,
+ config_addr,
+ BUID_HI(pdn->phb->buid),
+ BUID_LO(pdn->phb->buid),
+ state);
+ if (rc)
+ printk(KERN_WARNING
+ "EEH: Unable to reset the failed slot,"
+ " (%d) #RST=%d dn=%s\n",
+ rc, state, pdn->node->full_name);
+ }
}
/**
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-04-22 20:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-22 20:00 [PATCH 2/3] powerpc/eeh: Handle functional reset on non-PCIe device Richard A Lary
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).