diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2020-03-24 14:44:13 +0200 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2020-06-22 19:58:20 +0300 |
commit | 0bd680cd900cf0ec85c275731262aaa2ead369b7 (patch) | |
tree | 12786e6491803d1e053afaeed593bcfd930d33c2 /drivers/thunderbolt/path.c | |
parent | 5b7b8c0af15a376175302fc91c2af06f356821b0 (diff) |
thunderbolt: Add USB3 bandwidth management
USB3 supports both isochronous and non-isochronous traffic. The former
requires guaranteed bandwidth and can take up to 90% of the total
bandwidth. With USB4 USB3 is tunneled over USB4 fabric which means that
we need to make sure there is enough bandwidth allocated for the USB3
tunnels in addition to DisplayPort tunnels.
Whereas DisplayPort bandwidth management is static and done before the
DP tunnel is established, the USB3 bandwidth management is dynamic and
allows increasing and decreasing the allocated bandwidth according to
what is currently consumed. This is done through host router USB3
downstream adapter registers.
This adds USB3 bandwidth management to the software connection manager
so that we always try to allocate maximum bandwidth for DP tunnels and
what is left is allocated for USB3.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/path.c')
-rw-r--r-- | drivers/thunderbolt/path.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/thunderbolt/path.c b/drivers/thunderbolt/path.c index 854ff3412161..03e7b714deab 100644 --- a/drivers/thunderbolt/path.c +++ b/drivers/thunderbolt/path.c @@ -570,21 +570,20 @@ bool tb_path_is_invalid(struct tb_path *path) } /** - * tb_path_switch_on_path() - Does the path go through certain switch + * tb_path_port_on_path() - Does the path go through certain port * @path: Path to check - * @sw: Switch to check + * @port: Switch to check * - * Goes over all hops on path and checks if @sw is any of them. + * Goes over all hops on path and checks if @port is any of them. * Direction does not matter. */ -bool tb_path_switch_on_path(const struct tb_path *path, - const struct tb_switch *sw) +bool tb_path_port_on_path(const struct tb_path *path, const struct tb_port *port) { int i; for (i = 0; i < path->path_length; i++) { - if (path->hops[i].in_port->sw == sw || - path->hops[i].out_port->sw == sw) + if (path->hops[i].in_port == port || + path->hops[i].out_port == port) return true; } |