[Skiboot] [PATCH 14/16] phb4: Workaround phy lockup by doing full PHB reset on retry

Michael Neuling mikey at neuling.org
Wed Jul 12 12:06:53 AEST 2017

For PHB4 it's possible that the phy may end up in a bad state where it
can no longer recieve data. This can manifest as the link not
retraining. A simple PERST will not clear this. The PHB must be
completely reset.

This changes the retry state to CRESET to do this.

This issue may also manifest itself as the link training in a degraded
state (lower speed or narrower width). This patch doesn't attempt to
fix that (will come later).

Signed-off-by: Michael Neuling <mikey at neuling.org>
 hw/phb4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/phb4.c b/hw/phb4.c
index 91da17d961..55b5695179 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -2325,7 +2325,7 @@ static int64_t phb4_freset(struct pci_slot *slot)
 		PHBDBG(p, "FRESET: Prepare for link down\n");
-		slot->retry_state = PHB4_SLOT_FRESET_START;
+		slot->retry_state = PHB4_SLOT_CRESET_START;
 		if (slot->ops.prepare_link_change)
 			slot->ops.prepare_link_change(slot, false);
 		/* fall through */

More information about the Skiboot mailing list