public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] thunderbolt: Disable CL states on older Titan Ridge firmware
@ 2026-02-24  7:01 Mika Westerberg
  2026-02-24  7:01 ` [PATCH 1/2] thunderbolt: Read router NVM version before applying quirks Mika Westerberg
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mika Westerberg @ 2026-02-24  7:01 UTC (permalink / raw)
  To: linux-usb
  Cc: Yehezkel Bernat, Lukas Wunner, Andreas Noever, Rene Sapiens,
	Mika Westerberg

Hi,

There is known issue on Titan Ridge with older firmware that makes the link
unstable if CL states are enabled. This series adds a quirk that disables
them for older NVM firmware.

Rene Sapiens (2):
  thunderbolt: Read router NVM version before applying quirks
  thunderbolt: Disable CLx on Titan Ridge-based devices with old firmware

 drivers/thunderbolt/quirks.c |  7 +++++++
 drivers/thunderbolt/switch.c | 30 ++++++++++++++++++++++++++----
 2 files changed, 33 insertions(+), 4 deletions(-)

-- 
2.50.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] thunderbolt: Read router NVM version before applying quirks
  2026-02-24  7:01 [PATCH 0/2] thunderbolt: Disable CL states on older Titan Ridge firmware Mika Westerberg
@ 2026-02-24  7:01 ` Mika Westerberg
  2026-02-24  7:01 ` [PATCH 2/2] thunderbolt: Disable CLx on Titan Ridge-based devices with old firmware Mika Westerberg
  2026-03-02  6:52 ` [PATCH 0/2] thunderbolt: Disable CL states on older Titan Ridge firmware Mika Westerberg
  2 siblings, 0 replies; 4+ messages in thread
From: Mika Westerberg @ 2026-02-24  7:01 UTC (permalink / raw)
  To: linux-usb
  Cc: Yehezkel Bernat, Lukas Wunner, Andreas Noever, Rene Sapiens,
	Mika Westerberg

From: Rene Sapiens <rene.sapiens@linux.intel.com>

The router NVM version is currently only available after the NVMem devices
have been registered. This is too late for firmware-dependent quirks that
are evaluated during tb_switch_add() before device registration.

Split router NVM handling into two phases:
  - tb_switch_nvm_init() allocates the NVM object and reads the version
  - tb_switch_nvm_add() registers the NVMem devices using the pre-read NVM

This makes the NVM major/minor version available before tb_check_quirks()
without changing when the NVMem devices are registered.

Signed-off-by: Rene Sapiens <rene.sapiens@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
 drivers/thunderbolt/switch.c | 30 ++++++++++++++++++++++++++----
 1 file changed, 26 insertions(+), 4 deletions(-)

diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index e5b48a331c58..c2ad58b19e7b 100644
--- a/drivers/thunderbolt/switch.c
+++ b/drivers/thunderbolt/switch.c
@@ -347,7 +347,7 @@ static int nvm_write(void *priv, unsigned int offset, void *val, size_t bytes)
 	return ret;
 }
 
-static int tb_switch_nvm_add(struct tb_switch *sw)
+static int tb_switch_nvm_init(struct tb_switch *sw)
 {
 	struct tb_nvm *nvm;
 	int ret;
@@ -365,6 +365,26 @@ static int tb_switch_nvm_add(struct tb_switch *sw)
 	if (ret)
 		goto err_nvm;
 
+	sw->nvm = nvm;
+	return 0;
+
+err_nvm:
+	tb_sw_dbg(sw, "NVM upgrade disabled\n");
+	sw->no_nvm_upgrade = true;
+	if (!IS_ERR(nvm))
+		tb_nvm_free(nvm);
+
+	return ret;
+}
+
+static int tb_switch_nvm_add(struct tb_switch *sw)
+{
+	struct tb_nvm *nvm = sw->nvm;
+	int ret;
+
+	if (!nvm)
+		return 0;
+
 	/*
 	 * If the switch is in safe-mode the only accessible portion of
 	 * the NVM is the non-active one where userspace is expected to
@@ -383,14 +403,12 @@ static int tb_switch_nvm_add(struct tb_switch *sw)
 			goto err_nvm;
 	}
 
-	sw->nvm = nvm;
 	return 0;
 
 err_nvm:
 	tb_sw_dbg(sw, "NVM upgrade disabled\n");
 	sw->no_nvm_upgrade = true;
-	if (!IS_ERR(nvm))
-		tb_nvm_free(nvm);
+	tb_nvm_free(nvm);
 
 	return ret;
 }
@@ -3311,6 +3329,10 @@ int tb_switch_add(struct tb_switch *sw)
 		return ret;
 	}
 
+	ret = tb_switch_nvm_init(sw);
+	if (ret)
+		return ret;
+
 	if (!sw->safe_mode) {
 		tb_switch_credits_init(sw);
 
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] thunderbolt: Disable CLx on Titan Ridge-based devices with old firmware
  2026-02-24  7:01 [PATCH 0/2] thunderbolt: Disable CL states on older Titan Ridge firmware Mika Westerberg
  2026-02-24  7:01 ` [PATCH 1/2] thunderbolt: Read router NVM version before applying quirks Mika Westerberg
@ 2026-02-24  7:01 ` Mika Westerberg
  2026-03-02  6:52 ` [PATCH 0/2] thunderbolt: Disable CL states on older Titan Ridge firmware Mika Westerberg
  2 siblings, 0 replies; 4+ messages in thread
From: Mika Westerberg @ 2026-02-24  7:01 UTC (permalink / raw)
  To: linux-usb
  Cc: Yehezkel Bernat, Lukas Wunner, Andreas Noever, Rene Sapiens,
	Mika Westerberg

From: Rene Sapiens <rene.sapiens@linux.intel.com>

Thunderbolt 3 devices based on Titan Ridge routers with NVM firmware
version < 0x65 have been observed to become unstable when CL states are
enabled. This can lead to link disconnect events and the device failing
to enumerate.

Enable CLx on Titan Ridge only when the running NVM firmware version
is >= 0x65.

Signed-off-by: Rene Sapiens <rene.sapiens@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
 drivers/thunderbolt/quirks.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/thunderbolt/quirks.c b/drivers/thunderbolt/quirks.c
index e81de9c30eac..9f7914ac2f48 100644
--- a/drivers/thunderbolt/quirks.c
+++ b/drivers/thunderbolt/quirks.c
@@ -23,6 +23,9 @@ static void quirk_dp_credit_allocation(struct tb_switch *sw)
 
 static void quirk_clx_disable(struct tb_switch *sw)
 {
+	if (tb_switch_is_titan_ridge(sw) && sw->nvm && sw->nvm->major >= 0x65)
+		return;
+
 	sw->quirks |= QUIRK_NO_CLX;
 	tb_sw_dbg(sw, "disabling CL states\n");
 }
@@ -61,6 +64,10 @@ static const struct tb_quirk tb_quirks[] = {
 	/* Dell WD19TB supports self-authentication on unplug */
 	{ 0x0000, 0x0000, 0x00d4, 0xb070, quirk_force_power_link },
 	{ 0x0000, 0x0000, 0x00d4, 0xb071, quirk_force_power_link },
+
+	/* Intel Titan Ridge CLx is unstable on early firmware versions */
+	{ 0x8086, PCI_DEVICE_ID_INTEL_TITAN_RIDGE_DD_BRIDGE, 0x0000, 0x0000,
+		  quirk_clx_disable },
 	/*
 	 * Intel Goshen Ridge NVM 27 and before report wrong number of
 	 * DP buffers.
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] thunderbolt: Disable CL states on older Titan Ridge firmware
  2026-02-24  7:01 [PATCH 0/2] thunderbolt: Disable CL states on older Titan Ridge firmware Mika Westerberg
  2026-02-24  7:01 ` [PATCH 1/2] thunderbolt: Read router NVM version before applying quirks Mika Westerberg
  2026-02-24  7:01 ` [PATCH 2/2] thunderbolt: Disable CLx on Titan Ridge-based devices with old firmware Mika Westerberg
@ 2026-03-02  6:52 ` Mika Westerberg
  2 siblings, 0 replies; 4+ messages in thread
From: Mika Westerberg @ 2026-03-02  6:52 UTC (permalink / raw)
  To: linux-usb; +Cc: Yehezkel Bernat, Lukas Wunner, Andreas Noever, Rene Sapiens

On Tue, Feb 24, 2026 at 08:01:48AM +0100, Mika Westerberg wrote:
> Hi,
> 
> There is known issue on Titan Ridge with older firmware that makes the link
> unstable if CL states are enabled. This series adds a quirk that disables
> them for older NVM firmware.
> 
> Rene Sapiens (2):
>   thunderbolt: Read router NVM version before applying quirks
>   thunderbolt: Disable CLx on Titan Ridge-based devices with old firmware

Applied to thunderbolt.git/next.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-02  6:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-24  7:01 [PATCH 0/2] thunderbolt: Disable CL states on older Titan Ridge firmware Mika Westerberg
2026-02-24  7:01 ` [PATCH 1/2] thunderbolt: Read router NVM version before applying quirks Mika Westerberg
2026-02-24  7:01 ` [PATCH 2/2] thunderbolt: Disable CLx on Titan Ridge-based devices with old firmware Mika Westerberg
2026-03-02  6:52 ` [PATCH 0/2] thunderbolt: Disable CL states on older Titan Ridge firmware Mika Westerberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox