[Skiboot] [PATCH 1/2] pcie-slot: Don't fail powering on an already on switch

Benjamin Herrenschmidt benh at kernel.crashing.org
Mon Apr 9 13:41:43 AEST 2018


If the power state is already the required value, return
OPAL_SUCCESS rather than OPAL_PARAMETER to avoid spurrious
errors during boot.

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
 core/pcie-slot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/pcie-slot.c b/core/pcie-slot.c
index c3069040..45996342 100644
--- a/core/pcie-slot.c
+++ b/core/pcie-slot.c
@@ -205,7 +205,7 @@ static int64_t pcie_slot_set_power_state_ext(struct pci_slot *slot, uint8_t val,
 	uint16_t state;
 
 	if (slot->power_state == val)
-		return OPAL_PARAMETER;
+		return OPAL_SUCCESS;
 
 	/* Update the power state and return immediately if the power
 	 * control functionality isn't supported on the PCI slot.
-- 
2.14.3



More information about the Skiboot mailing list