Merge tag 'v6.6-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel...
[platform/kernel/linux-rpi.git] / drivers / thunderbolt / switch.c
index 43171cc..bd5815f 100644 (file)
@@ -2725,6 +2725,13 @@ int tb_switch_lane_bonding_enable(struct tb_switch *sw)
            !tb_port_is_width_supported(down, TB_LINK_WIDTH_DUAL))
                return 0;
 
+       /*
+        * Both lanes need to be in CL0. Here we assume lane 0 already be in
+        * CL0 and check just for lane 1.
+        */
+       if (tb_wait_for_port(down->dual_link_port, false) <= 0)
+               return -ENOTCONN;
+
        ret = tb_port_lane_bonding_enable(up);
        if (ret) {
                tb_port_warn(up, "failed to enable lane bonding\n");