[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250926-topic-tbt_header_bit_fix-v1-1-122238af5c82@oss.qualcomm.com>
Date: Fri, 26 Sep 2025 14:32:57 +0200
From: Konrad Dybcio <konradybcio@...nel.org>
To: Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Benson Leung <bleung@...omium.org>,
Abhishek Pandit-Subedi <abhishekpandit@...omium.org>,
Jameson Thies <jthies@...gle.com>,
Andrei Kuchynski <akuchynski@...omium.org>,
Tzung-Bi Shih <tzungbi@...nel.org>, Guenter Roeck <groeck@...omium.org>
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
chrome-platform@...ts.linux.dev,
Konrad Dybcio <konrad.dybcio@....qualcomm.com>
Subject: [PATCH RFC] usb: typec: thunderbolt: Fix Thunderbolt adapter type
bitfield values
From: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
The value has been amended with the release of the USB Type-C
Specification v2.1, reportedly as an erratum.
Signed-off-by: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
---
I bundled a change to the CrOS EC driver based on the assumption that
it worked around the faulty definition. I see the Intel PMC mux driver
also checks for this bit, but it seems like that driver assumes that
the value is in-spec (i.e. it may be buggy as of right now).
Adding the respective maintainers to make sure everyone can see this.
---
drivers/platform/chrome/cros_ec_typec.c | 2 +-
include/linux/usb/typec_tbt.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c
index b712bcff6fb2674ec79286159090df6d79b32e9a..d80f3de1b87c362a2825bd19f826c5be077583aa 100644
--- a/drivers/platform/chrome/cros_ec_typec.c
+++ b/drivers/platform/chrome/cros_ec_typec.c
@@ -585,7 +585,7 @@ static int cros_typec_enable_tbt(struct cros_typec_data *typec,
data.device_mode = TBT_MODE;
if (pd_ctrl->control_flags & USB_PD_CTRL_TBT_LEGACY_ADAPTER)
- data.device_mode = TBT_SET_ADAPTER(TBT_ADAPTER_TBT3);
+ data.device_mode = TBT_SET_ADAPTER(TBT_ADAPTER_LEGACY);
/* Cable Discover Mode VDO */
data.cable_mode = TBT_MODE;
diff --git a/include/linux/usb/typec_tbt.h b/include/linux/usb/typec_tbt.h
index 55dcea12082c80defeb6f199ad333279b58adcd7..6bf208c9dd5037f162678bc0be5be7ae1ca0deca 100644
--- a/include/linux/usb/typec_tbt.h
+++ b/include/linux/usb/typec_tbt.h
@@ -27,8 +27,8 @@ struct typec_thunderbolt_data {
/* TBT3 Device Discover Mode VDO bits */
#define TBT_MODE BIT(0)
#define TBT_ADAPTER(_vdo_) FIELD_GET(BIT(16), _vdo_)
-#define TBT_ADAPTER_LEGACY 0
-#define TBT_ADAPTER_TBT3 1
+#define TBT_ADAPTER_TBT3 0
+#define TBT_ADAPTER_LEGACY 1
#define TBT_INTEL_SPECIFIC_B0 BIT(26)
#define TBT_VENDOR_SPECIFIC_B0 BIT(30)
#define TBT_VENDOR_SPECIFIC_B1 BIT(31)
---
base-commit: 8e2755d7779a95dd61d8997ebce33ff8b1efd3fb
change-id: 20250926-topic-tbt_header_bit_fix-17aeb524df4a
Best regards,
--
Konrad Dybcio <konrad.dybcio@....qualcomm.com>
Powered by blists - more mailing lists