aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2017-09-14 06:44:07 -0400
committerMika Westerberg <mika.westerberg@linux.intel.com>2018-03-09 04:54:10 -0500
commit44b51bbb16d033ac1984123349ec055bae09b623 (patch)
tree872730c8c311fb78dac23809db570a177a5f5f4b
parent68a7a2ace13156b8a3d8cd6cceab6c30b52e2923 (diff)
thunderbolt: Wait a bit longer for root switch config space
In some case reading root switch config space takes longer than what we are currently waiting in the driver resulting timeout and failure. Increase number of retries to allow some more time for the root switch config space to become accesssible. Also log an error if the timeout is exceeded so we know why the driver probe failed. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
-rw-r--r--drivers/thunderbolt/icm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c
index 182226023acb..1183321586c5 100644
--- a/drivers/thunderbolt/icm.c
+++ b/drivers/thunderbolt/icm.c
@@ -828,7 +828,7 @@ __icm_driver_ready(struct tb *tb, enum tb_security_level *security_level)
828 struct icm_pkg_driver_ready request = { 828 struct icm_pkg_driver_ready request = {
829 .hdr.code = ICM_DRIVER_READY, 829 .hdr.code = ICM_DRIVER_READY,
830 }; 830 };
831 unsigned int retries = 10; 831 unsigned int retries = 50;
832 int ret; 832 int ret;
833 833
834 memset(&reply, 0, sizeof(reply)); 834 memset(&reply, 0, sizeof(reply));
@@ -856,6 +856,7 @@ __icm_driver_ready(struct tb *tb, enum tb_security_level *security_level)
856 msleep(50); 856 msleep(50);
857 } while (--retries); 857 } while (--retries);
858 858
859 tb_err(tb, "failed to read root switch config space, giving up\n");
859 return -ETIMEDOUT; 860 return -ETIMEDOUT;
860} 861}
861 862