summaryrefslogtreecommitdiffstats
path: root/drivers/thunderbolt/switch.c
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2020-04-02 11:24:48 +0200
committerMika Westerberg <mika.westerberg@linux.intel.com>2020-09-03 11:06:41 +0200
commit5cb6ed31c5d51a4b360ae8aa69fc2457723db27a (patch)
tree18ec5a39e127136652a60dc3441392c27a4cdd69 /drivers/thunderbolt/switch.c
parentthunderbolt: Initialize TMU again on resume (diff)
downloadlinux-5cb6ed31c5d51a4b360ae8aa69fc2457723db27a.tar.xz
linux-5cb6ed31c5d51a4b360ae8aa69fc2457723db27a.zip
thunderbolt: Do not change default USB4 router notification timeout
Some early stage USB4 devices do not like that any of the enumerating router config space fields (ROUTER_CS_1 - ROUTER_CS_4) are written after the initial enumeration for example when entering sleep states. The default timeout by the USB4 spec is 10 ms which should be fine for the driver to handle. For this reason do not change the notification timeout from the default 10 ms for USB4 routers. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/switch.c')
-rw-r--r--drivers/thunderbolt/switch.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index 0d4e4b7902c6..02f981ee88e9 100644
--- a/drivers/thunderbolt/switch.c
+++ b/drivers/thunderbolt/switch.c
@@ -1268,7 +1268,7 @@ static int tb_plug_events_active(struct tb_switch *sw, bool active)
u32 data;
int res;
- if (tb_switch_is_icm(sw))
+ if (tb_switch_is_icm(sw) || tb_switch_is_usb4(sw))
return 0;
sw->config.plug_events_delay = 0xff;
@@ -1276,10 +1276,6 @@ static int tb_plug_events_active(struct tb_switch *sw, bool active)
if (res)
return res;
- /* Plug events are always enabled in USB4 */
- if (tb_switch_is_usb4(sw))
- return 0;
-
res = tb_sw_read(sw, &data, TB_CFG_SWITCH, sw->cap_plug_events + 1, 1);
if (res)
return res;