diff options
author | Andrew Donnellan <andrew.donnellan@au1.ibm.com> | 2016-09-13 17:50:54 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-12-02 16:17:56 +1100 |
commit | f993fd53f4d5f79f1f94245803422f26d6e41e67 (patch) | |
tree | ca02409289fde1ad1e191cacd70626caae77ab9b | |
parent | e162f880d3ad9797e35796aef6e4a6bf02bd0d2f (diff) | |
download | skiboot-f993fd53f4d5f79f1f94245803422f26d6e41e67.zip skiboot-f993fd53f4d5f79f1f94245803422f26d6e41e67.tar.gz skiboot-f993fd53f4d5f79f1f94245803422f26d6e41e67.tar.bz2 |
hw/phb3: set PHB retry state correctly when fresetting during a creset
When we're doing a complete reset, after we complete the ETU reset and wait
for the PHB to return, we need to do a fundamental reset.
When we do the fundamental reset, we poll for a link up. This isn't always
successful on the first attempt. In phb3_sm_link_poll(), if we time out
while waiting for the link to come up, we call phb3_retry_state() to reset
p->state back to p->retry_state and poll again. On the second poll, we
clear the retry state so we don't retry again.
However, when we do the fundamental reset as part of a complete reset, we
don't explicitly set the retry state. This means that we only retry if
there wasn't an earlier fundamental reset that had to retry and thus
cleared the retry state. This reduces the reliability of the complete reset
process.
In phb3_sm_complete_reset(), when in state PHB3_STATE_CRESET_FRESET,
set the retry state to PHB3_STATE_FRESET_START, as is done in
phb3_fundamental_reset().
Reported-by: Pradipta Ghosh <pradghos@in.ibm.com>
Suggested-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Cc: Uma Krishnan <ukrishn@linux.vnet.ibm.com>
Cc: Matthew Ochs <mrochs@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.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -2478,6 +2478,7 @@ static int64_t phb3_sm_complete_reset(struct phb3 *p) return phb3_set_sm_timeout(p, msecs_to_tb(100)); case PHB3_STATE_CRESET_FRESET: p->state = PHB3_STATE_FUNCTIONAL; + p->retry_state = PHB3_STATE_FRESET_START; p->flags |= PHB3_CFG_BLOCKED; return phb3_sm_fundamental_reset(p); default: |