Skip to content

Commit 545f3c0

Browse files
westerigregkh
authored andcommitted
thunderbolt: Add only on-board retimers when !CONFIG_USB4_DEBUGFS_MARGINING
commit bf79175 upstream. Normally there is no need to enumerate retimers on the other side of the cable. This is only needed in special cases where user wants to run receiver lane margining against the downstream facing port of a retimer. Furthermore this might confuse the userspace tools such as fwupd because it cannot read the information it expects from these retimers. Fix this by changing the retimer enumeration code to add only on-board retimers when CONFIG_USB4_DEBUGFS_MARGINING is not enabled. Reported-by: AceLan Kao <acelan.kao@canonical.com> Tested-by: AceLan Kao <acelan.kao@canonical.com> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219420 Cc: stable@vger.kernel.org Fixes: ff6ab05 ("thunderbolt: Add receiver lane margining support for retimers") Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent afb1352 commit 545f3c0

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/thunderbolt/retimer.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,8 @@ int tb_retimer_scan(struct tb_port *port, bool add)
532532
}
533533

534534
ret = 0;
535+
if (!IS_ENABLED(CONFIG_USB4_DEBUGFS_MARGINING))
536+
max = min(last_idx, max);
535537

536538
/* Add retimers if they do not exist already */
537539
for (i = 1; i <= max; i++) {

0 commit comments

Comments
 (0)