From: Abhishek Pandit-Subedi Date: Fri, 13 Dec 2024 23:35:49 +0000 (-0800) Subject: platform/chrome: cros_ec_typec: Disable tbt on port X-Git-Tag: v6.14-rc1~69^2~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1aede069816747609d45f02947440a8ad0c3490f;p=thirdparty%2Fkernel%2Flinux.git platform/chrome: cros_ec_typec: Disable tbt on port Altmodes with cros_ec are either automatically entered by the EC or entered by the AP if TBT or USB4 are supported on the system. Due to the security risk of PCIe tunneling, TBT modes should not be auto entered by the kernel at this time and will require user intervention. With this change, a userspace program will need to explicitly activate the thunderbolt mode on the port and partner in order to enter the mode and the thunderbolt driver will not automatically enter when a partner is connected. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Benson Leung Link: https://lore.kernel.org/r/20241213153543.v5.8.Ic14738918e3d026fa2d85e95fb68f8e07a0828d0@changeid Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c index 1ac5798d887fc..6ee182101bc93 100644 --- a/drivers/platform/chrome/cros_ec_typec.c +++ b/drivers/platform/chrome/cros_ec_typec.c @@ -311,6 +311,7 @@ static int cros_typec_register_port_altmodes(struct cros_typec_data *typec, memset(&desc, 0, sizeof(desc)); desc.svid = USB_TYPEC_TBT_SID; desc.mode = TBT_MODE; + desc.inactive = true; amode = cros_typec_register_thunderbolt(port, &desc); if (IS_ERR(amode)) return PTR_ERR(amode);