From 8b26e29acbc84e8bd5e18af194efd693b8b70912 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 12 Dec 2018 22:26:13 -0600 Subject: Retry link training at PCIe GEN1 if presence detected but training repeatedly failed Certain older PCIe 1.0 devices will not train unless the training process starts at GEN1 speeds. As a last resort when a device will not train, fall back to GEN1 speed for the last training attempt. This is verified to fix devices based on the Conexant CX23888 on the Talos II platform. Signed-off-by: Timothy Pearson [stewart: cut P9NDD1.0 support, fixup dt_max_link_speed] Signed-off-by: Stewart Smith --- include/phb4.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/phb4.h b/include/phb4.h index b6937664..adf45809 100644 --- a/include/phb4.h +++ b/include/phb4.h @@ -154,7 +154,7 @@ struct phb4_err { uint32_t err_bit; }; -#define PHB4_LINK_LINK_RETRIES 3 +#define PHB4_LINK_LINK_RETRIES 4 /* Link timeouts, increments of 10ms */ #define PHB4_LINK_ELECTRICAL_RETRIES 100 #define PHB4_LINK_WAIT_RETRIES 200 @@ -210,6 +210,7 @@ struct phb4 { const __be64 *lane_eq; bool lane_eq_en; unsigned int max_link_speed; + unsigned int dt_max_link_speed; uint64_t mrt_size; uint64_t mbt_size; -- cgit v1.2.1