Commit ecb73902 authored by Richard A Lary's avatar Richard A Lary Committed by Benjamin Herrenschmidt

powerpc/pseries/eeh: Handle functional reset on non-PCIe device

  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: default avatarRichard A Lary <rlary@linux.vnet.ibm.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 308fc4f8
...@@ -728,15 +728,24 @@ rtas_pci_slot_reset(struct pci_dn *pdn, int state) ...@@ -728,15 +728,24 @@ rtas_pci_slot_reset(struct pci_dn *pdn, int state)
if (pdn->eeh_pe_config_addr) if (pdn->eeh_pe_config_addr)
config_addr = 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, config_addr,
BUID_HI(pdn->phb->buid), BUID_HI(pdn->phb->buid),
BUID_LO(pdn->phb->buid), BUID_LO(pdn->phb->buid),
state); state);
if (rc)
printk (KERN_WARNING "EEH: Unable to reset the failed slot," /* Fundamental-reset not supported on this PE, try hot-reset */
" (%d) #RST=%d dn=%s\n", if (rc == -8 && state == 3) {
rc, state, pdn->node->full_name); rc = rtas_call(ibm_set_slot_reset, 4, 1, NULL,
config_addr,
BUID_HI(pdn->phb->buid),
BUID_LO(pdn->phb->buid), 1);
if (rc)
printk(KERN_WARNING
"EEH: Unable to reset the failed slot,"
" #RST=%d dn=%s\n",
rc, pdn->node->full_name);
}
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment