From bca7c02f519d468c075912eccbf04bbee4523358 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Mon, 9 Apr 2018 13:41:43 +1000 Subject: pcie-slot: Don't fail powering on an already on switch 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 Acked-By: Michael Neuling Signed-off-by: Stewart Smith --- core/pcie-slot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/pcie-slot.c b/core/pcie-slot.c index c306904..4599634 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. -- cgit v1.1