diff options
author | Gil Fine <gil.fine@intel.com> | 2022-09-23 00:30:43 +0200 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2023-06-16 08:53:27 +0200 |
commit | 6e21007d0f7e6723bb67e79aa3d0081419c403e8 (patch) | |
tree | 7e04b5cacc8c13815a91cc1e38b7bac09c838469 /drivers/thunderbolt/switch.c | |
parent | thunderbolt: Do not touch lane 1 adapter path config space (diff) | |
download | linux-6e21007d0f7e6723bb67e79aa3d0081419c403e8.tar.xz linux-6e21007d0f7e6723bb67e79aa3d0081419c403e8.zip |
thunderbolt: Identify USB4 v2 routers
Add a new function usb4_switch_version() that can be used to figure out
the spec version of the router and make tb_switch_is_usb4() to use it as
well. Update the uevent accordingly.
Signed-off-by: Gil Fine <gil.fine@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/switch.c')
-rw-r--r-- | drivers/thunderbolt/switch.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index 47961afdcc73..3a1fc3e053f6 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -2056,8 +2056,9 @@ static int tb_switch_uevent(const struct device *dev, struct kobj_uevent_env *en const struct tb_switch *sw = tb_to_switch(dev); const char *type; - if (sw->config.thunderbolt_version == USB4_VERSION_1_0) { - if (add_uevent_var(env, "USB4_VERSION=1.0")) + if (tb_switch_is_usb4(sw)) { + if (add_uevent_var(env, "USB4_VERSION=%u.0", + usb4_switch_version(sw))) return -ENOMEM; } |