Skip to content

Commit a9fdf5f

Browse files
committed
thunderbolt: Check that lane 1 is in CL0 before enabling lane bonding
Marek reported that when BlackMagic UltraStudio device is connected the kernel repeatedly tries to enable lane bonding without success making the device non-functional. It looks like the device does not have lane 1 connected at all so even though it is enabled we should not try to bond the lanes. For this reason check that lane 1 is in fact CL0 (connected, active) before attempting to bond the lanes. Reported-by: Marek Šanta <teslan223@gmail.com> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217737 Cc: stable@vger.kernel.org Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
1 parent 582620d commit a9fdf5f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/thunderbolt/switch.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2725,6 +2725,13 @@ int tb_switch_lane_bonding_enable(struct tb_switch *sw)
27252725
!tb_port_is_width_supported(down, TB_LINK_WIDTH_DUAL))
27262726
return 0;
27272727

2728+
/*
2729+
* Both lanes need to be in CL0. Here we assume lane 0 already be in
2730+
* CL0 and check just for lane 1.
2731+
*/
2732+
if (tb_wait_for_port(down->dual_link_port, false) <= 0)
2733+
return -ENOTCONN;
2734+
27282735
ret = tb_port_lane_bonding_enable(up);
27292736
if (ret) {
27302737
tb_port_warn(up, "failed to enable lane bonding\n");

0 commit comments

Comments
 (0)