Skip to content

Commit

Permalink
powerpc/pseries/eeh: Handle functional reset on non-PCIe device
Browse files Browse the repository at this point in the history
  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>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Richard A Lary authored and Benjamin Herrenschmidt committed May 4, 2011
1 parent 308fc4f commit ecb7390
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions arch/powerpc/platforms/pseries/eeh.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,15 +728,24 @@ rtas_pci_slot_reset(struct pci_dn *pdn, int state)
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) {
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);
}
}

/**
Expand Down

0 comments on commit ecb7390

Please sign in to comment.