From 84aa25921a09c7c6b703cf56a9396e2d55d49223 Mon Sep 17 00:00:00 2001 From: Oliver O'Halloran Date: Mon, 18 Mar 2019 17:10:58 +1100 Subject: core/pcie-slot: Don't bail early in the power on case Exiting early in the power off case makes sense since we can't disable slot power (or assert PERST) for suprise hotplug slots. However, we should not exit early in the power-on case since it's possible slot power may have been disabled (or just not enabled at boot time). Signed-off-by: Oliver O'Halloran Signed-off-by: Stewart Smith --- core/pcie-slot.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'core') diff --git a/core/pcie-slot.c b/core/pcie-slot.c index 8696129..e7013d1 100644 --- a/core/pcie-slot.c +++ b/core/pcie-slot.c @@ -234,10 +234,11 @@ static int64_t pcie_slot_set_power_state_ext(struct pci_slot *slot, uint8_t val, if (val == PCI_SLOT_POWER_OFF) return OPAL_SUCCESS; - if (!pci_slot_has_flags(slot, PCI_SLOT_FLAG_FORCE_POWERON)) { - pci_slot_set_state(slot, PCI_SLOT_STATE_SPOWER_DONE); - return OPAL_ASYNC_COMPLETION; - } + /* + * Some systems have the slot power disabled by default + * so we always perform the power-on step. This is not + * *strictly* required, but it's probably a good idea. + */ } pci_slot_set_state(slot, PCI_SLOT_STATE_SPOWER_START); -- cgit v1.1