aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVaibhav Jain <vaibhav@linux.vnet.ibm.com>2018-01-18 11:36:28 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2018-01-30 20:42:38 -0600
commite05798d8757159f621d62f35913eb0bdee2636bf (patch)
tree54734b72021663bae8316bc0963543f0564f4c0e
parent4a12d6deb045688ab56fa3654cc57eb479bc7686 (diff)
downloadskiboot-e05798d8757159f621d62f35913eb0bdee2636bf.zip
skiboot-e05798d8757159f621d62f35913eb0bdee2636bf.tar.gz
skiboot-e05798d8757159f621d62f35913eb0bdee2636bf.tar.bz2
capi: Perform capp recovery sequence only when PBCQ is idle
Presently during a CRESET the CAPP recovery sequence can be executed multiple times in case PBCQ on the PEC is still busy processing in/out bound inflight transactions. This patch updates phb4_creset() to perform capp-recovery sequence via do_capp_recovery_scoms() only when PBCQ General Status Register reports no pending transactions. Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Reviewed-by: Christophe Lombard clombard@linux.vnet.ibm.com Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--hw/phb4.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/phb4.c b/hw/phb4.c
index ff912e1..21c7951 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -2899,15 +2899,16 @@ static int64_t phb4_creset(struct pci_slot *slot)
slot->retries = 500;
return pci_slot_set_sm_timeout(slot, msecs_to_tb(10));
case PHB4_SLOT_CRESET_WAIT_CQ:
- /* capp recovery */
- if (p->flags & PHB4_CAPP_RECOVERY)
- do_capp_recovery_scoms(p);
// Wait until operations are complete
xscom_read(p->chip_id, p->pe_stk_xscom + 0xc, &pbcq_status);
if (!(pbcq_status & 0xC000000000000000)) {
PHBDBG(p, "CRESET: No pending transactions\n");
+ /* capp recovery */
+ if (p->flags & PHB4_CAPP_RECOVERY)
+ do_capp_recovery_scoms(p);
+
/* Clear errors in PFIR and NFIR */
xscom_write(p->chip_id, p->pci_stk_xscom + 0x1,
~p->pfir_cache);