thunderbolt: Call tb_check_quirks() after initializing adapters
authorMika Westerberg <mika.westerberg@linux.intel.com>
Fri, 3 Feb 2023 13:55:41 +0000 (15:55 +0200)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 13 Mar 2023 09:54:25 +0000 (11:54 +0200)
In order to apply quirks based on certain adapter types move call to
tb_check_quirks() happen after the adapters are initialized. This should
not affect the existing quirks.

Cc: stable@vger.kernel.org
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/thunderbolt/switch.c

index 3370e18ba05f9348c37ec526bbd7641f2673225b..da373ac38285c6a1b35c8ed035689306fc9c045c 100644 (file)
@@ -2968,8 +2968,6 @@ int tb_switch_add(struct tb_switch *sw)
                        dev_warn(&sw->dev, "reading DROM failed: %d\n", ret);
                tb_sw_dbg(sw, "uid: %#llx\n", sw->uid);
 
-               tb_check_quirks(sw);
-
                ret = tb_switch_set_uuid(sw);
                if (ret) {
                        dev_err(&sw->dev, "failed to set UUID\n");
@@ -2988,6 +2986,8 @@ int tb_switch_add(struct tb_switch *sw)
                        }
                }
 
+               tb_check_quirks(sw);
+
                tb_switch_default_link_ports(sw);
 
                ret = tb_switch_update_link_attributes(sw);