]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
thunderbolt: Do not make DROM read success compulsory
authorMario Limonciello <mario.limonciello@amd.com>
Thu, 7 Apr 2022 17:17:37 +0000 (01:17 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 20 May 2022 12:41:50 +0000 (14:41 +0200)
BugLink: https://bugs.launchpad.net/bugs/1962349
The USB4 specification doesn't make any requirements that reading
a device router's DROM is needed for the operation of the device.

Other connection manager solutions don't necessarily read it or gate
the usability of the device on whether it was read.

So make failures when reading the DROM show warnings but not
fail the initialization of the router.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
(cherry picked from commit 6915812bbd109787ebdb865561dc9164d4b01f56 linux-next)
Signed-off-by: You-Sheng Yang <vicamo.yang@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/thunderbolt/switch.c

index 308f88fb6a309a48d6cdf417733fa1116beaa435..fbe2617fde509f35b2aee001b950126538bded90 100644 (file)
@@ -2731,10 +2731,8 @@ int tb_switch_add(struct tb_switch *sw)
 
                /* read drom */
                ret = tb_drom_read(sw);
-               if (ret) {
-                       dev_err(&sw->dev, "reading DROM failed\n");
-                       return ret;
-               }
+               if (ret)
+                       dev_warn(&sw->dev, "reading DROM failed: %d\n", ret);
                tb_sw_dbg(sw, "uid: %#llx\n", sw->uid);
 
                tb_check_quirks(sw);