Skip to content

Commit

Permalink
hw/phb3: fix error handling in complete reset
Browse files Browse the repository at this point in the history
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 <pradghos@in.ibm.com>
Suggested-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Acked-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
ajdlinux authored and stewartsmith committed Dec 13, 2016
1 parent 2bcffb9 commit 7fe3de4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions hw/phb3.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit 7fe3de4

Please sign in to comment.