thunderbolt: Fix calculation of consumed USB3 bandwidth on a path
authorGil Fine <gil.fine@linux.intel.com>
Sun, 11 Feb 2024 22:33:25 +0000 (00:33 +0200)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Fri, 12 Apr 2024 06:43:32 +0000 (09:43 +0300)
commit6016137a964b67a6ac8afb9071ef6e83777afca6
treeb808affd9a2df2bd53d8193e96d44ecf134fdf2a
parent9a966517a83090ee3e26e9a93a92523e2358c5b3
thunderbolt: Fix calculation of consumed USB3 bandwidth on a path

Currently, when setup a new USB3 tunnel that is starting from downstream USB3
adapter of first depth router (or deeper), to upstream USB3 adapter of a second
depth router (or deeper), we calculate consumed bandwidth. For this calculation
we take into account first USB3 tunnel consumed bandwidth while we shouldn't,
because we just recalculating the first USB3 tunnel allocated bandwidth.

Fix that, so that more bandwidth is available for the new USB3 tunnel being
setup.

While there, fix the kernel-doc to decribe more accurately the purpose of the
function.

Signed-off-by: Gil Fine <gil.fine@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/thunderbolt/tb.c