Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

thunderbolt: Do not resume routers if UID is not set

Routers might not have a UID set if the DROM read failed during
initialization previously.

Normally upon resume the UID is re-read to confirm it's the same
device connected.
* If the DROM read failed during init but then succeeded during
resume it could either be a new device or faulty device
* If the DROM read failed during init and also failed during resume
it might be a different device plugged in all together.

Detect this situation and prevent re-using the same configuration in
these cirucmstances.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>

authored by

Mario Limonciello and committed by
Mika Westerberg
a283de3e e87491a9

+4
+4
drivers/thunderbolt/switch.c
··· 2980 2980 return err; 2981 2981 } 2982 2982 2983 + /* We don't have any way to confirm this was the same device */ 2984 + if (!sw->uid) 2985 + return -ENODEV; 2986 + 2983 2987 if (tb_switch_is_usb4(sw)) 2984 2988 err = usb4_switch_read_uid(sw, &uid); 2985 2989 else