Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH v2 1/3] thunderbolt: Do not set up a DisplayPort tunnel when credits are insufficient
@ 2026-09-16 22:57 Gil Fine
  2026-09-16 22:57 ` [PATCH v2 2/3] thunderbolt: Fix DMA credit limit to use host router value Gil Fine
  2026-09-16 22:57 ` [PATCH v2 3/3] thunderbolt: Fix credits reservation logic for DisplayPort tunnels Gil Fine
  0 siblings, 2 replies; 4+ messages in thread
From: Gil Fine @ 2026-09-16 22:57 UTC (permalink / raw)
  To: mika.westerberg; +Cc: gil.fine, gil.fine, stable

Currently, an excessive DisplayPort tunnel may be set up, even if no
sufficient credits available. This could lead to malfunctioning
DisplayPort tunnel.

Fix this and bail out early if this is the case.

Fixes: 6ed541c53edc ("thunderbolt: Allocate credits according to router preferences")
Cc: stable@vger.kernel.org
Signed-off-by: Gil Fine <gil.fine@linux.intel.com>
Assisted-by: LLM
---
 drivers/thunderbolt/tunnel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thunderbolt/tunnel.c b/drivers/thunderbolt/tunnel.c
index c0342b1d6a8a..7a033df7f916 100644
--- a/drivers/thunderbolt/tunnel.c
+++ b/drivers/thunderbolt/tunnel.c
@@ -1582,7 +1582,7 @@ static int tb_dp_init_video_credits(struct tb_path_hop *hop)
 		 */
 		nfc_credits = port->config.nfc_credits &
 				ADP_CS_4_NFC_BUFFERS_MASK;
-		if (nfc_credits / sw->min_dp_main_credits > max_dp_streams)
+		if (nfc_credits / sw->min_dp_main_credits >= max_dp_streams)
 			return -ENOSPC;
 
 		hop->nfc_credits = sw->min_dp_main_credits;
-- 
2.43.0


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

end of thread, other threads:[~2026-09-17  6:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-16 22:57 [PATCH v2 1/3] thunderbolt: Do not set up a DisplayPort tunnel when credits are insufficient Gil Fine
2026-09-16 22:57 ` [PATCH v2 2/3] thunderbolt: Fix DMA credit limit to use host router value Gil Fine
2026-09-17  6:19   ` Mika Westerberg
2026-09-16 22:57 ` [PATCH v2 3/3] thunderbolt: Fix credits reservation logic for DisplayPort tunnels Gil Fine

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