From 7fe3de438b19545471d2fb72e54ed01a40b12706 Mon Sep 17 00:00:00 2001 From: Andrew Donnellan Date: Fri, 9 Dec 2016 16:01:22 +1100 Subject: [PATCH] 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 permanently broken. Set the state to PHB3_STATE_FENCED so that the kernel can retry the complete reset. Reported-by: Pradipta Ghosh Suggested-by: Gavin Shan Signed-off-by: Andrew Donnellan Acked-by: Gavin Shan Signed-off-by: Stewart Smith --- hw/phb3.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/phb3.c b/hw/phb3.c index da54bd07957d..27bbe94e49d7 100644 --- a/hw/phb3.c +++ b/hw/phb3.c @@ -2643,9 +2643,8 @@ static int64_t phb3_creset(struct pci_slot *slot) slot->state); } - /* Mark the PHB as dead and expect it to be removed */ error: - p->state = PHB3_STATE_BROKEN; + p->state = PHB3_STATE_FENCED; return OPAL_HARDWARE; }