aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Donnellan <andrew.donnellan@au1.ibm.com>2016-11-22 19:55:39 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-12-13 15:32:07 +1100
commit284c4651bbd2c8ceb3f52a3192ff991053f94370 (patch)
tree613d27ce7c345b1f3cfd3423354e80a3ba65d4b1
parentf993fd53f4d5f79f1f94245803422f26d6e41e67 (diff)
downloadskiboot-284c4651bbd2c8ceb3f52a3192ff991053f94370.zip
skiboot-284c4651bbd2c8ceb3f52a3192ff991053f94370.tar.gz
skiboot-284c4651bbd2c8ceb3f52a3192ff991053f94370.tar.bz2
hw/phb3: fix error handling in complete reset
During a complete reset, when we get a timeout waiting for pending transaction in state PHB3_STATE_CRESET_WAIT_CQ, we mark the PHB as broken and return OPAL_PARAMETER. Change the return code to OPAL_HARDWARE which is way more sensible, and set the state to PHB3_STATE_FENCED so that the kernel can retry the complete reset. Reported-by: Pradipta Ghosh <pradghos@in.ibm.com> Suggested-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Acked-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--hw/phb3.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/phb3.c b/hw/phb3.c
index 62b67cb..85e1e90 100644
--- a/hw/phb3.c
+++ b/hw/phb3.c
@@ -2485,10 +2485,9 @@ static int64_t phb3_sm_complete_reset(struct phb3 *p)
assert(false);
}
- /* Mark the PHB as dead and expect it to be removed */
error:
- p->state = PHB3_STATE_BROKEN;
- return OPAL_PARAMETER;
+ p->state = PHB3_STATE_FENCED;
+ return OPAL_HARDWARE;
}
static int64_t phb3_complete_reset(struct phb *phb, uint8_t assert)