Commit 62efe699 authored by Mika Westerberg's avatar Mika Westerberg

thunderbolt: Make rest of the logging to happen at debug level

Now that the driver can handle every possible tunnel types there is no
point to log everything as info level so turn these to happen at debug
level instead.

While at it remove duplicated tunnel activation log message
(tb_tunnel_activate() calls tb_tunnel_restart() which print the same
message) and add one missing '\n' termination.
Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
parent b323a98f
...@@ -720,7 +720,7 @@ int tb_cfg_error(struct tb_ctl *ctl, u64 route, u32 port, ...@@ -720,7 +720,7 @@ int tb_cfg_error(struct tb_ctl *ctl, u64 route, u32 port,
.port = port, .port = port,
.error = error, .error = error,
}; };
tb_ctl_info(ctl, "resetting error on %llx:%x.\n", route, port); tb_ctl_dbg(ctl, "resetting error on %llx:%x.\n", route, port);
return tb_ctl_tx(ctl, &pkg, sizeof(pkg), TB_CFG_PKG_ERROR); return tb_ctl_tx(ctl, &pkg, sizeof(pkg), TB_CFG_PKG_ERROR);
} }
......
...@@ -1568,7 +1568,7 @@ static int icm_firmware_start(struct tb *tb, struct tb_nhi *nhi) ...@@ -1568,7 +1568,7 @@ static int icm_firmware_start(struct tb *tb, struct tb_nhi *nhi)
if (val & REG_FW_STS_ICM_EN) if (val & REG_FW_STS_ICM_EN)
return 0; return 0;
dev_info(&nhi->pdev->dev, "starting ICM firmware\n"); dev_dbg(&nhi->pdev->dev, "starting ICM firmware\n");
ret = icm_firmware_reset(tb, nhi); ret = icm_firmware_reset(tb, nhi);
if (ret) if (ret)
......
...@@ -500,7 +500,7 @@ int tb_path_activate(struct tb_path *path) ...@@ -500,7 +500,7 @@ int tb_path_activate(struct tb_path *path)
& out_mask; & out_mask;
hop.unknown3 = 0; hop.unknown3 = 0;
tb_port_info(path->hops[i].in_port, "Writing hop %d, index %d", tb_port_dbg(path->hops[i].in_port, "Writing hop %d, index %d\n",
i, path->hops[i].in_hop_index); i, path->hops[i].in_hop_index);
tb_dump_hop(path->hops[i].in_port, &hop); tb_dump_hop(path->hops[i].in_port, &hop);
res = tb_port_write(path->hops[i].in_port, &hop, TB_CFG_HOPS, res = tb_port_write(path->hops[i].in_port, &hop, TB_CFG_HOPS,
...@@ -512,7 +512,7 @@ int tb_path_activate(struct tb_path *path) ...@@ -512,7 +512,7 @@ int tb_path_activate(struct tb_path *path)
} }
} }
path->activated = true; path->activated = true;
tb_info(path->tb, "path activation complete\n"); tb_dbg(path->tb, "path activation complete\n");
return 0; return 0;
err: err:
tb_WARN(path->tb, "path activation failed\n"); tb_WARN(path->tb, "path activation failed\n");
......
...@@ -493,23 +493,22 @@ int tb_wait_for_port(struct tb_port *port, bool wait_if_unplugged) ...@@ -493,23 +493,22 @@ int tb_wait_for_port(struct tb_port *port, bool wait_if_unplugged)
if (state < 0) if (state < 0)
return state; return state;
if (state == TB_PORT_DISABLED) { if (state == TB_PORT_DISABLED) {
tb_port_info(port, "is disabled (state: 0)\n"); tb_port_dbg(port, "is disabled (state: 0)\n");
return 0; return 0;
} }
if (state == TB_PORT_UNPLUGGED) { if (state == TB_PORT_UNPLUGGED) {
if (wait_if_unplugged) { if (wait_if_unplugged) {
/* used during resume */ /* used during resume */
tb_port_info(port, tb_port_dbg(port,
"is unplugged (state: 7), retrying...\n"); "is unplugged (state: 7), retrying...\n");
msleep(100); msleep(100);
continue; continue;
} }
tb_port_info(port, "is unplugged (state: 7)\n"); tb_port_dbg(port, "is unplugged (state: 7)\n");
return 0; return 0;
} }
if (state == TB_PORT_UP) { if (state == TB_PORT_UP) {
tb_port_info(port, tb_port_dbg(port, "is connected, link is up (state: 2)\n");
"is connected, link is up (state: 2)\n");
return 1; return 1;
} }
...@@ -517,7 +516,7 @@ int tb_wait_for_port(struct tb_port *port, bool wait_if_unplugged) ...@@ -517,7 +516,7 @@ int tb_wait_for_port(struct tb_port *port, bool wait_if_unplugged)
* After plug-in the state is TB_PORT_CONNECTING. Give it some * After plug-in the state is TB_PORT_CONNECTING. Give it some
* time. * time.
*/ */
tb_port_info(port, tb_port_dbg(port,
"is connected, link is not up (state: %d), retrying...\n", "is connected, link is not up (state: %d), retrying...\n",
state); state);
msleep(100); msleep(100);
...@@ -585,7 +584,7 @@ int tb_port_set_initial_credits(struct tb_port *port, u32 credits) ...@@ -585,7 +584,7 @@ int tb_port_set_initial_credits(struct tb_port *port, u32 credits)
int tb_port_clear_counter(struct tb_port *port, int counter) int tb_port_clear_counter(struct tb_port *port, int counter)
{ {
u32 zero[3] = { 0, 0, 0 }; u32 zero[3] = { 0, 0, 0 };
tb_port_info(port, "clearing counter %d\n", counter); tb_port_dbg(port, "clearing counter %d\n", counter);
return tb_port_write(port, zero, TB_CFG_COUNTERS, 3 * counter, 3); return tb_port_write(port, zero, TB_CFG_COUNTERS, 3 * counter, 3);
} }
......
...@@ -556,18 +556,17 @@ static void tb_handle_hotplug(struct work_struct *work) ...@@ -556,18 +556,17 @@ static void tb_handle_hotplug(struct work_struct *work)
} else if (tb_port_is_dpout(port)) { } else if (tb_port_is_dpout(port)) {
tb_teardown_dp(tb, port); tb_teardown_dp(tb, port);
} else { } else {
tb_port_info(port, tb_port_dbg(port,
"got unplug event for disconnected port, ignoring\n"); "got unplug event for disconnected port, ignoring\n");
} }
} else if (port->remote) { } else if (port->remote) {
tb_port_info(port, tb_port_dbg(port, "got plug event for connected port, ignoring\n");
"got plug event for connected port, ignoring\n");
} else { } else {
if (tb_port_is_null(port)) { if (tb_port_is_null(port)) {
tb_port_info(port, "hotplug: scanning\n"); tb_port_dbg(port, "hotplug: scanning\n");
tb_scan_port(port); tb_scan_port(port);
if (!port->remote) if (!port->remote)
tb_port_info(port, "hotplug: no switch found\n"); tb_port_dbg(port, "hotplug: no switch found\n");
} else if (tb_port_is_dpout(port)) { } else if (tb_port_is_dpout(port)) {
tb_tunnel_dp(tb, port); tb_tunnel_dp(tb, port);
} }
......
...@@ -611,7 +611,7 @@ int tb_tunnel_restart(struct tb_tunnel *tunnel) ...@@ -611,7 +611,7 @@ int tb_tunnel_restart(struct tb_tunnel *tunnel)
{ {
int res, i; int res, i;
tb_tunnel_info(tunnel, "activating\n"); tb_tunnel_dbg(tunnel, "activating\n");
/* /*
* Make sure all paths are properly disabled before enabling * Make sure all paths are properly disabled before enabling
...@@ -660,8 +660,6 @@ int tb_tunnel_activate(struct tb_tunnel *tunnel) ...@@ -660,8 +660,6 @@ int tb_tunnel_activate(struct tb_tunnel *tunnel)
{ {
int i; int i;
tb_tunnel_info(tunnel, "activating\n");
for (i = 0; i < tunnel->npaths; i++) { for (i = 0; i < tunnel->npaths; i++) {
if (tunnel->paths[i]->activated) { if (tunnel->paths[i]->activated) {
tb_tunnel_WARN(tunnel, tb_tunnel_WARN(tunnel,
...@@ -681,7 +679,7 @@ void tb_tunnel_deactivate(struct tb_tunnel *tunnel) ...@@ -681,7 +679,7 @@ void tb_tunnel_deactivate(struct tb_tunnel *tunnel)
{ {
int i; int i;
tb_tunnel_info(tunnel, "deactivating\n"); tb_tunnel_dbg(tunnel, "deactivating\n");
if (tunnel->activate) if (tunnel->activate)
tunnel->activate(tunnel, false); tunnel->activate(tunnel, false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment