Skip to content

Commit 4d99f98

Browse files
committed
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 <[email protected]>
1 parent cab96fa commit 4d99f98

File tree

1 file changed

+5
-4
lines changed
  • drivers/thunderbolt

1 file changed

+5
-4
lines changed

drivers/thunderbolt/tb.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2088,17 +2088,18 @@ static void tb_switch_exit_redrive(struct tb_switch *sw)
20882088
}
20892089
}
20902090

2091-
static void tb_dp_resource_unavailable(struct tb *tb, struct tb_port *port)
2091+
static void tb_dp_resource_unavailable(struct tb *tb, struct tb_port *port,
2092+
const char *reason)
20922093
{
20932094
struct tb_port *in, *out;
20942095
struct tb_tunnel *tunnel;
20952096

20962097
if (tb_port_is_dpin(port)) {
2097-
tb_port_dbg(port, "DP IN resource unavailable\n");
2098+
tb_port_dbg(port, "DP IN resource unavailable: %s\n", reason);
20982099
in = port;
20992100
out = NULL;
21002101
} else {
2101-
tb_port_dbg(port, "DP OUT resource unavailable\n");
2102+
tb_port_dbg(port, "DP OUT resource unavailable: %s\n", reason);
21022103
in = NULL;
21032104
out = port;
21042105
}
@@ -2404,7 +2405,7 @@ static void tb_handle_hotplug(struct work_struct *work)
24042405
tb_xdomain_put(xd);
24052406
tb_port_unconfigure_xdomain(port);
24062407
} else if (tb_port_is_dpout(port) || tb_port_is_dpin(port)) {
2407-
tb_dp_resource_unavailable(tb, port);
2408+
tb_dp_resource_unavailable(tb, port, "adapter unplug");
24082409
} else if (!port->port) {
24092410
tb_sw_dbg(sw, "xHCI disconnect request\n");
24102411
tb_switch_xhci_disconnect(sw);

0 commit comments

Comments
 (0)