Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <alok.a.tiwari@oracle.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>

authored by

Alok Tiwari and committed by
Mika Westerberg
2cdde91c 58d71d42

+1 -1
+1 -1
drivers/thunderbolt/switch.c
··· 1450 1450 return ret; 1451 1451 1452 1452 data[0] &= ~ADP_DP_CS_0_VIDEO_HOPID_MASK; 1453 - data[1] &= ~ADP_DP_CS_1_AUX_RX_HOPID_MASK; 1453 + data[1] &= ~ADP_DP_CS_1_AUX_TX_HOPID_MASK; 1454 1454 data[1] &= ~ADP_DP_CS_1_AUX_RX_HOPID_MASK; 1455 1455 1456 1456 data[0] |= (video << ADP_DP_CS_0_VIDEO_HOPID_SHIFT) &