Skip to content

Commit

Permalink
phb4: Workaround phy lockup by doing full PHB reset on retry
Browse files Browse the repository at this point in the history
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@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
mikey authored and stewartsmith committed Jul 13, 2017
1 parent bdefdf2 commit 17b6f2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/phb4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 17b6f2b

Please sign in to comment.