]> www.infradead.org Git - users/jedix/linux-maple.git/commit
thunderbolt: Use scale field when allocating USB3 bandwidth
authorMika Westerberg <mika.westerberg@linux.intel.com>
Tue, 27 Dec 2022 09:55:26 +0000 (11:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Mar 2023 10:49:14 +0000 (12:49 +0200)
commitb82c564886a01fae979b93c0d807f43c477b6844
tree160f80cc2a3b143b283991d6acf8c26f4c67c18f
parent3497afbd578053186d3b219481332da54a153f3e
thunderbolt: Use scale field when allocating USB3 bandwidth

commit c82510b1d87bdebfe916048857d2ef46f1778aa5 upstream.

When tunneling aggregated USB3 (20 Gb/s) the bandwidth values that are
programmed to the ADP_USB3_CS_2 go higher than 4096 and that does not
fit anymore to the 12-bit field. Fix this by scaling the value using
the scale field accordingly.

Fixes: 3b1d8d577ca8 ("thunderbolt: Implement USB3 bandwidth negotiation routines")
Cc: stable@vger.kernel.org
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/thunderbolt/usb4.c