The patch below does not apply to the 5.10-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <stable@xxxxxxxxxxxxxxx>. To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y git checkout FETCH_HEAD git cherry-pick -x ec4d82f855ce332de26fe080892483de98cc1a19 # <resolve conflicts, build, test, etc.> git commit -s git send-email --to '<stable@xxxxxxxxxxxxxxx>' --in-reply-to '2024021902-gecko-caloric-cd8b@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^.. Possible dependencies: ec4d82f855ce ("thunderbolt: Fix setting the CNS bit in ROUTER_CS_5") d49b4f043d63 ("thunderbolt: Add support for enhanced uni-directional TMU mode") bdc6660e553a ("thunderbolt: Do not call CLx functions from TMU code") 12a14f2fca32 ("thunderbolt: Move CLx support functions into clx.c") ef34add89ee4 ("thunderbolt: Check valid TMU configuration in tb_switch_tmu_configure()") 4e7b4955cba1 ("thunderbolt: Move tb_enable_tmu() close to other TMU functions") 20c2fae9dbe3 ("thunderbolt: Move TMU configuration to tb_enable_tmu()") 7d283f4148f1 ("thunderbolt: Get rid of tb_switch_enable_tmu_1st_child()") 701e73a823bb ("thunderbolt: Rework Titan Ridge TMU objection disable function") 826f55d50de9 ("thunderbolt: Drop useless 'unidirectional' parameter from tb_switch_tmu_is_enabled()") c437dcb18310 ("thunderbolt: Fix a couple of style issues in TMU code") 7ce542219b63 ("thunderbolt: Introduce tb_switch_downstream_port()") 3fe95742af29 ("thunderbolt: Do not touch CL state configuration during discovery") d31137619776 ("thunderbolt: Use correct type in tb_port_is_clx_enabled() prototype") d0f1e0c2a699 ("thunderbolt: Add support for receiver lane margining") b12d2955e732 ("thunderbolt: Add helper to check if CL states are enabled on port") 3846d011403b ("thunderbolt: Pass CL state bitmask to tb_port_clx_supported()") 95f8f1cbc87b ("thunderbolt: Move port CL state functions into correct place in switch.c") b60e31bf18a7 ("thunderbolt: Add DP OUT resource when DP tunnel is discovered") 9e2e5ea3b28f ("Merge tag 'usb-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb") thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From ec4d82f855ce332de26fe080892483de98cc1a19 Mon Sep 17 00:00:00 2001 From: Mohammad Rahimi <rahimi.mhmmd@xxxxxxxxx> Date: Sat, 27 Jan 2024 11:26:28 +0800 Subject: [PATCH] thunderbolt: Fix setting the CNS bit in ROUTER_CS_5 The bit 23, CM TBT3 Not Supported (CNS), in ROUTER_CS_5 indicates whether a USB4 Connection Manager is TBT3-Compatible and should be: 0b for TBT3-Compatible 1b for Not TBT3-Compatible Fixes: b04079837b20 ("thunderbolt: Add initial support for USB4") Cc: stable@xxxxxxxxxxxxxxx Signed-off-by: Mohammad Rahimi <rahimi.mhmmd@xxxxxxxxx> Signed-off-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx> diff --git a/drivers/thunderbolt/tb_regs.h b/drivers/thunderbolt/tb_regs.h index 87e4795275fe..6f798f6a2b84 100644 --- a/drivers/thunderbolt/tb_regs.h +++ b/drivers/thunderbolt/tb_regs.h @@ -203,7 +203,7 @@ struct tb_regs_switch_header { #define ROUTER_CS_5_WOP BIT(1) #define ROUTER_CS_5_WOU BIT(2) #define ROUTER_CS_5_WOD BIT(3) -#define ROUTER_CS_5_C3S BIT(23) +#define ROUTER_CS_5_CNS BIT(23) #define ROUTER_CS_5_PTO BIT(24) #define ROUTER_CS_5_UTO BIT(25) #define ROUTER_CS_5_HCO BIT(26) diff --git a/drivers/thunderbolt/usb4.c b/drivers/thunderbolt/usb4.c index f8f0d24ff6e4..1515eff8cc3e 100644 --- a/drivers/thunderbolt/usb4.c +++ b/drivers/thunderbolt/usb4.c @@ -290,7 +290,7 @@ int usb4_switch_setup(struct tb_switch *sw) } /* TBT3 supported by the CM */ - val |= ROUTER_CS_5_C3S; + val &= ~ROUTER_CS_5_CNS; return tb_sw_write(sw, &val, TB_CFG_SWITCH, ROUTER_CS_5, 1); }