[Skiboot] [PATCH] Revert "pci: Shared slot state synchronisation for hot reset"

Russell Currey ruscur at russell.cc
Tue Feb 20 11:02:11 AEDT 2018


An issue was found in shared slot reset where the system can be stuck in
an infinite loop, pull the code out until there's a proper fix.

This reverts commit 1172a6c57ff3c66f6361e572a1790cbcc0e5ff37.

Signed-off-by: Russell Currey <ruscur at russell.cc>
---
 core/pci-slot.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/core/pci-slot.c b/core/pci-slot.c
index f8922df5..8bddc147 100644
--- a/core/pci-slot.c
+++ b/core/pci-slot.c
@@ -78,7 +78,6 @@ static void pci_slot_prepare_link_change(struct pci_slot *slot, bool up)
 
 static int64_t pci_slot_run_sm(struct pci_slot *slot)
 {
-	struct pci_slot *peer = slot->peer_slot;
 	uint64_t now = mftb();
 	int64_t ret;
 
@@ -90,23 +89,10 @@ static int64_t pci_slot_run_sm(struct pci_slot *slot)
 	slot->delay_tgt_tb = 0;
 	switch (slot->state & PCI_SLOT_STATE_MASK) {
 	case PCI_SLOT_STATE_LINK:
-		// If the peer slot hasn't finished its hreset, need to wait
-		if (peer && peer->state & PCI_SLOT_STATE_HRESET &&
-		    !pci_slot_has_flags(peer, PCI_SLOT_FLAG_BOOTUP))
-			return slot->ops.hreset(peer);
-
 		ret = slot->ops.poll_link(slot);
-		if (peer && peer->state & PCI_SLOT_STATE_LINK &&
-		    !pci_slot_has_flags(peer, PCI_SLOT_FLAG_BOOTUP))
-			ret = MAX(ret, slot->ops.poll_link(peer));
 		break;
 	case PCI_SLOT_STATE_HRESET:
 		ret = slot->ops.hreset(slot);
-
-		// If the slot has a peer, it needs to hreset as well.
-		if (peer && peer->state == PCI_SLOT_STATE_NORMAL &&
-		    !pci_slot_has_flags(peer, PCI_SLOT_FLAG_BOOTUP))
-			slot->ops.hreset(peer);
 		break;
 	case PCI_SLOT_STATE_FRESET:
 		ret = slot->ops.freset(slot);
-- 
2.14.1



More information about the Skiboot mailing list