Skip to content

Commit

Permalink
phb4: Better logs why the slot didn't work
Browse files Browse the repository at this point in the history
Better logs why the slot didn't work and make it a PR_ERR so users
see it by default.

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 25, 2017
1 parent 092bd64 commit d392d5b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion hw/phb4.c
Expand Up @@ -2167,7 +2167,16 @@ static int64_t phb4_retry_state(struct pci_slot *slot)
struct phb4 *p = phb_to_phb4(slot->phb);

if (!slot->link_retries--) {
PHBERR(p, "Link detected but won't train\n");
switch (slot->state) {
case PHB4_SLOT_LINK_WAIT_ELECTRICAL:
PHBERR(p, "Presence detected but no electrical link\n");
break;
case PHB4_SLOT_LINK_WAIT:
PHBERR(p, "Electrical link detected but won't train\n");
break;
default:
PHBERR(p, "Unknown link issue\n");
}
return OPAL_HARDWARE;
}

Expand Down

0 comments on commit d392d5b

Please sign in to comment.