[Skiboot] [PATCH] phb4: Be more conservative on link presence timeout

Michael Neuling mikey at neuling.org
Fri Jul 28 09:34:30 AEST 2017


In this patch we tuned our link timing to be more agressive:
  cf960e2884 phb4: Improve reset and link training timing

Cards should take only 32ms but unfortunately we've seen some take
up to 440ms. Hence bump our timer up to 1000ms.

This can hurt boot times on systems where slots indicate a hotplug
status but no electrical link is present (which we've seen). Since we
have to wait 1 second between PERST and touching config space anyway,
it shouldn't hurt too much.

Signed-off-by: Michael Neuling <mikey at neuling.org>
---
 hw/phb4.c      | 3 ++-
 include/phb4.h | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/hw/phb4.c b/hw/phb4.c
index a9f9c05fc0..122de4e495 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -54,7 +54,8 @@
  *          Fundamental Reset
  *     2) Receiver detect pulse are every 12ms
  *      - Hence minimum wait time 20 + 12 = 32ms
- *   o Hence we are conservative and poll here for 100ms (> 32ms)
+ *   o Unfortunatey, we've seen cards take 440ms
+ *   o Hence we are conservative and poll here for 1000ms (> 440ms)
  * - If no inband presence after 100ms -> Bail out (Slot is broken)
  *   o PHB_PCIE_DLP_TRAIN_CTL bit PHB_PCIE_DLP_INBAND_PRESENCE
  *
diff --git a/include/phb4.h b/include/phb4.h
index b04e3f5465..eb292cde16 100644
--- a/include/phb4.h
+++ b/include/phb4.h
@@ -215,7 +215,7 @@ struct phb4_err {
 };
 
 /* Link timeouts, increments of 10ms */
-#define PHB4_LINK_ELECTRICAL_RETRIES	20
+#define PHB4_LINK_ELECTRICAL_RETRIES	100
 #define PHB4_LINK_WAIT_RETRIES		200
 #define PHB4_LINK_STABLE_RETRIES	0
 
-- 
2.11.0



More information about the Skiboot mailing list