diff options
author | 2024-08-26 14:53:02 +0300 | |
---|---|---|
committer | 2025-01-03 11:50:08 +0200 | |
commit | 4d99f982e9857356a1173e5549606b0259eba428 (patch) | |
tree | 732ed931ef7c8a9505c6ddcd15ce5ac12d27d35f | |
parent | thunderbolt: Drop tb_tunnel_restart() (diff) | |
download | wireguard-linux-4d99f982e9857356a1173e5549606b0259eba428.tar.xz wireguard-linux-4d99f982e9857356a1173e5549606b0259eba428.zip |
thunderbolt: Pass reason to tb_dp_resource_unavailable()
Since we are going to call this also when DisplayPort tunnel
establishment fails it is useful to have the reason logged.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-rw-r--r-- | drivers/thunderbolt/tb.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c index 53e4890e3198..60454f9b9475 100644 --- a/drivers/thunderbolt/tb.c +++ b/drivers/thunderbolt/tb.c @@ -2088,17 +2088,18 @@ static void tb_switch_exit_redrive(struct tb_switch *sw) } } -static void tb_dp_resource_unavailable(struct tb *tb, struct tb_port *port) +static void tb_dp_resource_unavailable(struct tb *tb, struct tb_port *port, + const char *reason) { struct tb_port *in, *out; struct tb_tunnel *tunnel; if (tb_port_is_dpin(port)) { - tb_port_dbg(port, "DP IN resource unavailable\n"); + tb_port_dbg(port, "DP IN resource unavailable: %s\n", reason); in = port; out = NULL; } else { - tb_port_dbg(port, "DP OUT resource unavailable\n"); + tb_port_dbg(port, "DP OUT resource unavailable: %s\n", reason); in = NULL; out = port; } @@ -2404,7 +2405,7 @@ static void tb_handle_hotplug(struct work_struct *work) tb_xdomain_put(xd); tb_port_unconfigure_xdomain(port); } else if (tb_port_is_dpout(port) || tb_port_is_dpin(port)) { - tb_dp_resource_unavailable(tb, port); + tb_dp_resource_unavailable(tb, port, "adapter unplug"); } else if (!port->port) { tb_sw_dbg(sw, "xHCI disconnect request\n"); tb_switch_xhci_disconnect(sw); |