From: Gil Fine Date: Tue, 7 Nov 2023 10:22:40 +0000 (+0200) Subject: thunderbolt: Set lane bonding bit only for downstream port X-Git-Tag: v6.6.7~433 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e9c62671852f7eea68c9a834c6ded9bca8a66267;p=platform%2Fkernel%2Flinux-starfive.git thunderbolt: Set lane bonding bit only for downstream port commit 24d85bb3be373b5831699bddf698b392bd2b904d upstream. Fix the lane bonding procedure to follow the steps described in USB4 Connection Manager guide. Hence, set the lane bonding bit only for downstream port. This is needed for certain ASMedia device, otherwise lane bonding fails and the device disconnects. Cc: stable@vger.kernel.org Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index bd5815f..509b99a 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -1082,7 +1082,7 @@ int tb_port_lane_bonding_enable(struct tb_port *port) * Only set bonding if the link was not already bonded. This * avoids the lane adapter to re-enter bonding state. */ - if (width == TB_LINK_WIDTH_SINGLE) { + if (width == TB_LINK_WIDTH_SINGLE && !tb_is_upstream_port(port)) { ret = tb_port_set_lane_bonding(port, true); if (ret) goto err_lane1;