[Skiboot] [PATCH 8/8] core/pcie-slot: Don't bail early in the power on case

Oliver O'Halloran oohall at gmail.com
Mon Mar 18 17:10:58 AEDT 2019


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 <oohall at gmail.com>
---
 core/pcie-slot.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/core/pcie-slot.c b/core/pcie-slot.c
index 8696129f3a23..e7013d1ebfa2 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);
-- 
2.20.1



More information about the Skiboot mailing list