From: Alok Tiwari Date: Sun, 22 Jun 2025 17:17:02 +0000 (-0700) Subject: thunderbolt: Fix bit masking in tb_dp_port_set_hops() X-Git-Tag: v6.16-rc7~7^2~7^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2cdde91c14ec358087f43287513946d493aef940;p=thirdparty%2Flinux.git thunderbolt: Fix bit masking in tb_dp_port_set_hops() The tb_dp_port_set_hops() function was incorrectly clearing ADP_DP_CS_1_AUX_RX_HOPID_MASK twice. According to the function's purpose, it should clear both TX and RX AUX HopID fields. Replace the first instance with ADP_DP_CS_1_AUX_TX_HOPID_MASK to ensure proper configuration of both AUX directions. Fixes: 98176380cbe5 ("thunderbolt: Convert DP adapter register names to follow the USB4 spec") Cc: stable@vger.kernel.org Signed-off-by: Alok Tiwari Signed-off-by: Mika Westerberg --- diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index e9809fb57c35..b6c58a7e7b6a 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -1450,7 +1450,7 @@ int tb_dp_port_set_hops(struct tb_port *port, unsigned int video, return ret; data[0] &= ~ADP_DP_CS_0_VIDEO_HOPID_MASK; - data[1] &= ~ADP_DP_CS_1_AUX_RX_HOPID_MASK; + data[1] &= ~ADP_DP_CS_1_AUX_TX_HOPID_MASK; data[1] &= ~ADP_DP_CS_1_AUX_RX_HOPID_MASK; data[0] |= (video << ADP_DP_CS_0_VIDEO_HOPID_SHIFT) &