[Skiboot] [PATCH] capp: Fix the capp recovery timeout comparison
Vaibhav Jain
vaibhav at linux.ibm.com
Tue Aug 14 21:19:11 AEST 2018
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 at linux.vnet.ibm.com>
Signed-off-by: Vaibhav Jain <vaibhav at linux.ibm.com>
---
hw/phb4.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/phb4.c b/hw/phb4.c
index 707ef2ee..56f89006 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -3034,7 +3034,7 @@ static int do_capp_recovery_scoms(struct phb4 *p)
time_wait_ms(5);
xscom_read(p->chip_id, CAPP_ERR_STATUS_CTRL + offset, ®);
- 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;
--
2.17.1
More information about the Skiboot
mailing list