[Skiboot] [RFC PATCH 16/23] hw/phb4: Something to do with link retries, dunno if required

Oliver O'Halloran oohall at gmail.com
Wed Apr 3 20:09:13 AEDT 2019


---
 hw/phb4.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/phb4.c b/hw/phb4.c
index 591872c31c02..c63e916da0b7 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -2368,6 +2368,7 @@ static int64_t phb4_retry_state(struct pci_slot *slot)
 		return OPAL_HARDWARE;
 	}
 
+	slot->link_retries--;
 	pci_slot_set_state(slot, PHB4_SLOT_CRESET_START);
 	return pci_slot_set_sm_timeout(slot, msecs_to_tb(1));
 }
@@ -2856,7 +2857,7 @@ static int64_t phb4_poll_link(struct pci_slot *slot)
 			PHBDBG(p, "LINK: Link is stable\n");
 			if (!phb4_link_optimal(slot, &vdid)) {
 				PHBDBG(p, "LINK: Link degraded\n");
-				if (slot->link_retries) {
+				if (slot->link_retries > 0) {
 					phb4_lane_eq_change(p, vdid);
 					return phb4_retry_state(slot);
 				}
-- 
2.20.1



More information about the Skiboot mailing list