aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2016-11-14 12:58:07 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-12-21 15:26:15 +1100
commit16f37ceeec4fe41b83a58de51f146fa597e76af7 (patch)
treee2a2a47b7d2618ddcc87f8a58d4fa182e91a3dce
parent284c4651bbd2c8ceb3f52a3192ff991053f94370 (diff)
downloadskiboot-16f37ceeec4fe41b83a58de51f146fa597e76af7.zip
skiboot-16f37ceeec4fe41b83a58de51f146fa597e76af7.tar.gz
skiboot-16f37ceeec4fe41b83a58de51f146fa597e76af7.tar.bz2
hw/{phb3, p7ioc}: Return success for freset on empty PHB
OPAL_CLOSED is returned when fundamental reset is issued on the PHB who doesn't have subordinate devices (root port excluded). The kernel raises an error message, which is unnecessary. This returns OPAL_SUCCESS for this case to avoid the error message. The code change included in this has been upstream because of below commits since skiboot-5.3.0. So this is only applied to stable releases equal or ealier than skiboot-5.2.5. commit 3d3303734d1 ("hw/p7ioc: Support PHB slot) commit e1922cba179 ("hw/phb3: Support PHB slot") Cc: stable # 5.2.5- Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--hw/p7ioc-phb.c2
-rw-r--r--hw/phb3.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/hw/p7ioc-phb.c b/hw/p7ioc-phb.c
index 5167832..ec470a3 100644
--- a/hw/p7ioc-phb.c
+++ b/hw/p7ioc-phb.c
@@ -237,7 +237,7 @@ static int64_t p7ioc_sm_freset(struct p7ioc_phb *p)
reg = in_be64(p->regs + PHB_PCIE_SLOTCTL2);
if (!(reg & PHB_PCIE_SLOTCTL2_PRSTN_STAT)) {
PHBDBG(p, "Slot freset: no device\n");
- return OPAL_CLOSED;
+ return OPAL_SUCCESS;
}
/* Mask PCIE port interrupts and AER receiver error */
diff --git a/hw/phb3.c b/hw/phb3.c
index 85e1e90..b200aea 100644
--- a/hw/phb3.c
+++ b/hw/phb3.c
@@ -2191,7 +2191,7 @@ static int64_t phb3_sm_fundamental_reset(struct phb3 *p)
if (p->state == PHB3_STATE_FUNCTIONAL &&
phb3_presence_detect(&p->phb) != OPAL_SHPC_DEV_PRESENT) {
PHBDBG(p, "Slot freset: no device\n");
- return OPAL_CLOSED;
+ return OPAL_SUCCESS;
}
/* Handle boot time skipping of reset */