thunderbolt: Use correct function to calculate maximum USB3 link rate
authorMika Westerberg <mika.westerberg@linux.intel.com>
Fri, 20 May 2022 10:35:19 +0000 (13:35 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Jan 2023 06:22:46 +0000 (07:22 +0100)
commit701f9c3da6929915df8f21114d44f97b8113ddcb
tree301e6fe792277ba46fd696a3e56967ca0771ce60
parent5b1b03a3d3e413cc9af6b25a0a2d3f4681bba1af
thunderbolt: Use correct function to calculate maximum USB3 link rate

commit e8ff07fb33026c5c1bb5b81293496faba5d68059 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/thunderbolt/tunnel.c