summaryrefslogtreecommitdiff
path: root/drivers/thunderbolt/tb.c
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2020-02-21 12:11:54 +0200
committerMika Westerberg <mika.westerberg@linux.intel.com>2020-09-03 12:06:41 +0300
commit341d45188a7800ae3bc18558d62020787b78397e (patch)
tree3d9b8877c304c845f3f7c94820eb7c89b0cb2a07 /drivers/thunderbolt/tb.c
parent284652a4a49917e121277a6cacbefed9f65b94ca (diff)
thunderbolt: Disable lane 1 for XDomain connection
USB4 spec mandates that the lane 1 should be disabled if lanes are not bonded. For host-to-host connections (XDomain) we don't support lane bonding so in order to be compatible with the spec, disable lane 1 when another host is connected. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/tb.c')
-rw-r--r--drivers/thunderbolt/tb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c
index 602e00e0b45e..214e47656be6 100644
--- a/drivers/thunderbolt/tb.c
+++ b/drivers/thunderbolt/tb.c
@@ -142,6 +142,12 @@ static void tb_discover_tunnels(struct tb_switch *sw)
static int tb_port_configure_xdomain(struct tb_port *port)
{
+ /*
+ * XDomain paths currently only support single lane so we must
+ * disable the other lane according to USB4 spec.
+ */
+ tb_port_disable(port->dual_link_port);
+
if (tb_switch_is_usb4(port->sw))
return usb4_port_configure_xdomain(port);
return tb_lc_configure_xdomain(port);
@@ -153,6 +159,8 @@ static void tb_port_unconfigure_xdomain(struct tb_port *port)
usb4_port_unconfigure_xdomain(port);
else
tb_lc_unconfigure_xdomain(port);
+
+ tb_port_enable(port->dual_link_port);
}
static void tb_scan_xdomain(struct tb_port *port)