aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVaibhav Jain <vaibhav@linux.ibm.com>2018-08-14 16:49:11 +0530
committerStewart Smith <stewart@linux.ibm.com>2018-08-16 18:26:24 +1000
commit509d687c96234e95e023d810e02cdadf56d1b24f (patch)
tree071bd7f402959c042213c6bad52bf42ccb168b6b
parent9bcde78b4e83ef75bd0a6a5a4c3c5311891ae516 (diff)
downloadskiboot-509d687c96234e95e023d810e02cdadf56d1b24f.zip
skiboot-509d687c96234e95e023d810e02cdadf56d1b24f.tar.gz
skiboot-509d687c96234e95e023d810e02cdadf56d1b24f.tar.bz2
capp: Fix the capp recovery timeout comparison
The current capp recovery timeout control loop in do_capp_recovery_scoms() uses a wrong comparison for return value of tb_compare(). This may cause do_capp_recovery_scoms() to report an timeout earlier than the 168ms stipulated time. The patch fixes this by updating the loop timeout control branch in do_capp_recovery_scoms() to use the correct enum tb_cmpval. Cc: Stable #6.0+ Fixes: 09b853cae0aa0("capi: Poll Err/Status register during CAPP recovery") Reported-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com> Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Reviewed-by: Christophe Lombard <clombard@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com> (cherry picked from commit ec954f764efe064d7fc99e8a21a0ebdb7b8a3c91) Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
-rw-r--r--hw/phb4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/phb4.c b/hw/phb4.c
index 8c94940..61ee54a 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -2905,7 +2905,7 @@ static int do_capp_recovery_scoms(struct phb4 *p)
time_wait_ms(5);
xscom_read(p->chip_id, CAPP_ERR_STATUS_CTRL + offset, &reg);
- if (end && tb_compare(mftb(), end) != TB_AAFTERB) {
+ if (tb_compare(mftb(), end) != TB_ABEFOREB) {
PHBERR(p, "CAPP: Capp recovery Timed-out.\n");
end = 0;
break;