[Skiboot] [PATCH] hw/{phb3, p7ioc}: Return success for freset on empty PHB
Gavin Shan
gwshan at linux.vnet.ibm.com
Mon Nov 14 12:58:07 AEDT 2016
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 at linux.vnet.ibm.com>
---
hw/p7ioc-phb.c | 2 +-
hw/phb3.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/p7ioc-phb.c b/hw/p7ioc-phb.c
index 97e4885..4382c1e 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 849b1e2..a1f2719 100644
--- a/hw/phb3.c
+++ b/hw/phb3.c
@@ -2278,7 +2278,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 */
--
2.1.0
More information about the Skiboot
mailing list