aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2017-07-20 16:22:13 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-07-25 15:42:30 +1000
commitd392d5b100829f3f6a99424b3dbeb6a61e0d2bd3 (patch)
tree8a686c94c0ffa36b64903f53e70b6f2d987dd2a8 /hw
parent092bd64568a4373bd7304fd3346c044fac4ba2e6 (diff)
downloadskiboot-d392d5b100829f3f6a99424b3dbeb6a61e0d2bd3.zip
skiboot-d392d5b100829f3f6a99424b3dbeb6a61e0d2bd3.tar.gz
skiboot-d392d5b100829f3f6a99424b3dbeb6a61e0d2bd3.tar.bz2
phb4: Better logs why the slot didn't work
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>
Diffstat (limited to 'hw')
-rw-r--r--hw/phb4.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/hw/phb4.c b/hw/phb4.c
index 16304d5..48c591f 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -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;
}