diff mbox series

[1/2,SRU,OEM-6.0/Unstable] thunderbolt: Explicitly reset plug events delay back to USB4 spec value

Message ID 20220927081814.111820-2-vicamo.yang@canonical.com
State New
Headers show
Series Fix USB4 PCIe hotplug on AMD Pink Sardine | expand

Commit Message

You-Sheng Yang Sept. 27, 2022, 8:18 a.m. UTC
From: Mario Limonciello <mario.limonciello@amd.com>

BugLink: https://bugs.launchpad.net/bugs/1990922

If any software has interacted with the USB4 registers before the Linux
USB4 CM runs, it may have modified the plug events delay. It has been
observed that if this value too large, it's possible that hotplugged
devices will negotiate a fallback mode instead in Linux.

To prevent this, explicitly align the plug events delay with the USB4
spec value of 10ms.

Cc: stable@vger.kernel.org
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
(cherry picked from commit 31f87f705b3c1635345d8e8a493697099b43e508 linux-next)
Signed-off-by: You-Sheng Yang (vicamo) <vicamo.yang@canonical.com>
---
 drivers/thunderbolt/switch.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index 5ca1fa665fed..c71c728ee33b 100644
--- a/drivers/thunderbolt/switch.c
+++ b/drivers/thunderbolt/switch.c
@@ -2363,6 +2363,7 @@  int tb_switch_configure(struct tb_switch *sw)
 		 * additional capabilities.
 		 */
 		sw->config.cmuv = USB4_VERSION_1_0;
+		sw->config.plug_events_delay = 0xa;
 
 		/* Enumerate the switch */
 		ret = tb_sw_write(sw, (u32 *)&sw->config + 1, TB_CFG_SWITCH,