Message ID | 20180409034144.22477-1-benh@kernel.crashing.org |
---|---|
State | Accepted |
Headers | show |
Series | [1/2] pcie-slot: Don't fail powering on an already on switch | expand |
On Mon, 2018-04-09 at 13:41 +1000, Benjamin Herrenschmidt wrote: > 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> > --- > 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.
Benjamin Herrenschmidt <benh@kernel.crashing.org> writes: > 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> > --- > core/pcie-slot.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Merged to master as of bca7c02f519d468c075912eccbf04bbee4523358 Added bonus of we now seem to conform to our own API docs.
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.
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> --- core/pcie-slot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)