[PATCH v3 13/18] thunderbolt: Add constant for approval timeout

2018-03-02 Thread Mika Westerberg
We will be using this from Titan Ridge support code as well so make it
constant.

Signed-off-by: Mika Westerberg 
Reviewed-by: Andy Shevchenko 
---
 drivers/thunderbolt/icm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c
index 6798516d6474..1c10aa8d224d 100644
--- a/drivers/thunderbolt/icm.c
+++ b/drivers/thunderbolt/icm.c
@@ -41,7 +41,8 @@
 #define PHY_PORT_CS1_LINK_STATE_MASK   GENMASK(29, 26)
 #define PHY_PORT_CS1_LINK_STATE_SHIFT  26
 
-#define ICM_TIMEOUT5000 /* ms */
+#define ICM_TIMEOUT5000/* ms */
+#define ICM_APPROVE_TIMEOUT1   /* ms */
 #define ICM_MAX_LINK   4
 #define ICM_MAX_DEPTH  6
 
@@ -260,7 +261,7 @@ static int icm_fr_approve_switch(struct tb *tb, struct 
tb_switch *sw)
memset(, 0, sizeof(reply));
/* Use larger timeout as establishing tunnels can take some time */
ret = icm_request(tb, , sizeof(request), , sizeof(reply),
- 1, 1);
+ 1, ICM_APPROVE_TIMEOUT);
if (ret)
return ret;
 
-- 
2.16.1



[PATCH v3 13/18] thunderbolt: Add constant for approval timeout

2018-03-02 Thread Mika Westerberg
We will be using this from Titan Ridge support code as well so make it
constant.

Signed-off-by: Mika Westerberg 
Reviewed-by: Andy Shevchenko 
---
 drivers/thunderbolt/icm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c
index 6798516d6474..1c10aa8d224d 100644
--- a/drivers/thunderbolt/icm.c
+++ b/drivers/thunderbolt/icm.c
@@ -41,7 +41,8 @@
 #define PHY_PORT_CS1_LINK_STATE_MASK   GENMASK(29, 26)
 #define PHY_PORT_CS1_LINK_STATE_SHIFT  26
 
-#define ICM_TIMEOUT5000 /* ms */
+#define ICM_TIMEOUT5000/* ms */
+#define ICM_APPROVE_TIMEOUT1   /* ms */
 #define ICM_MAX_LINK   4
 #define ICM_MAX_DEPTH  6
 
@@ -260,7 +261,7 @@ static int icm_fr_approve_switch(struct tb *tb, struct 
tb_switch *sw)
memset(, 0, sizeof(reply));
/* Use larger timeout as establishing tunnels can take some time */
ret = icm_request(tb, , sizeof(request), , sizeof(reply),
- 1, 1);
+ 1, ICM_APPROVE_TIMEOUT);
if (ret)
return ret;
 
-- 
2.16.1