aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2018-04-09 13:41:43 +1000
committerStewart Smith <stewart@linux.ibm.com>2018-04-10 15:38:33 +1000
commitbca7c02f519d468c075912eccbf04bbee4523358 (patch)
tree58e901f47759f33eadf4e3f0649302cfb42ad231 /core
parente5fb3b6d17fb74e11259d6f2287a005278bb1932 (diff)
downloadskiboot-bca7c02f519d468c075912eccbf04bbee4523358.zip
skiboot-bca7c02f519d468c075912eccbf04bbee4523358.tar.gz
skiboot-bca7c02f519d468c075912eccbf04bbee4523358.tar.bz2
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 <benh@kernel.crashing.org> Acked-By: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'core')
-rw-r--r--core/pcie-slot.c2
1 files changed, 1 insertions, 1 deletions
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.