thunderbolt: Improve debug logging in tb_available_bandwidth()

This makes it easier to see what is going on when bandwidth is being
allocated for tunneling.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
This commit is contained in:
Mika Westerberg 2022-05-05 13:59:21 +03:00
parent b0ef48fc95
commit 2426fdf77a
1 changed files with 5 additions and 2 deletions

View File

@ -350,7 +350,9 @@ static int tb_available_bandwidth(struct tb *tb, struct tb_port *src_port,
struct tb_tunnel *tunnel;
struct tb_port *port;
tb_port_dbg(dst_port, "calculating available bandwidth\n");
tb_dbg(tb, "calculating available bandwidth between %llx:%u <-> %llx:%u\n",
tb_route(src_port->sw), src_port->port, tb_route(dst_port->sw),
dst_port->port);
tunnel = tb_find_first_usb3_tunnel(tb, src_port, dst_port);
if (tunnel) {
@ -387,7 +389,8 @@ static int tb_available_bandwidth(struct tb *tb, struct tb_port *src_port,
up_bw -= up_bw / 10;
down_bw = up_bw;
tb_port_dbg(port, "link total bandwidth %d Mb/s\n", up_bw);
tb_port_dbg(port, "link total bandwidth %d/%d Mb/s\n", up_bw,
down_bw);
/*
* Find all DP tunnels that cross the port and reduce