diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2022-05-20 12:35:19 +0200 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2023-01-09 09:44:23 +0100 |
commit | e8ff07fb33026c5c1bb5b81293496faba5d68059 (patch) | |
tree | 77f8c34ad504c39a048ba5635bdf7fe995a7e190 /drivers/thunderbolt/tunnel.c | |
parent | thunderbolt: Do not call PM runtime functions in tb_retimer_scan() (diff) | |
download | linux-e8ff07fb33026c5c1bb5b81293496faba5d68059.tar.xz linux-e8ff07fb33026c5c1bb5b81293496faba5d68059.zip |
thunderbolt: Use correct function to calculate maximum USB3 link rate
We need to take minimum of both sides of the USB3 link into consideration,
not just the downstream port. Fix this by calling tb_usb3_max_link_rate()
instead.
Fixes: 0bd680cd900c ("thunderbolt: Add USB3 bandwidth management")
Cc: stable@vger.kernel.org
Acked-by: Yehezkel Bernat <YehezkelShB@gmail.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/tunnel.c')
-rw-r--r-- | drivers/thunderbolt/tunnel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thunderbolt/tunnel.c b/drivers/thunderbolt/tunnel.c index 2c3cf7fc3357..1fc3c29b24f8 100644 --- a/drivers/thunderbolt/tunnel.c +++ b/drivers/thunderbolt/tunnel.c @@ -1275,7 +1275,7 @@ static void tb_usb3_reclaim_available_bandwidth(struct tb_tunnel *tunnel, return; } else if (!ret) { /* Use maximum link rate if the link valid is not set */ - ret = usb4_usb3_port_max_link_rate(tunnel->src_port); + ret = tb_usb3_max_link_rate(tunnel->dst_port, tunnel->src_port); if (ret < 0) { tb_tunnel_warn(tunnel, "failed to read maximum link rate\n"); return; |