Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Mika Westerberg <mika.westerberg@linux.intel.com>

+21 -25
+1 -1
drivers/thunderbolt/ctl.c
··· 720 720 .port = port, 721 721 .error = error, 722 722 }; 723 - tb_ctl_info(ctl, "resetting error on %llx:%x.\n", route, port); 723 + tb_ctl_dbg(ctl, "resetting error on %llx:%x.\n", route, port); 724 724 return tb_ctl_tx(ctl, &pkg, sizeof(pkg), TB_CFG_PKG_ERROR); 725 725 } 726 726
+1 -1
drivers/thunderbolt/icm.c
··· 1568 1568 if (val & REG_FW_STS_ICM_EN) 1569 1569 return 0; 1570 1570 1571 - dev_info(&nhi->pdev->dev, "starting ICM firmware\n"); 1571 + dev_dbg(&nhi->pdev->dev, "starting ICM firmware\n"); 1572 1572 1573 1573 ret = icm_firmware_reset(tb, nhi); 1574 1574 if (ret)
+3 -3
drivers/thunderbolt/path.c
··· 500 500 & out_mask; 501 501 hop.unknown3 = 0; 502 502 503 - tb_port_info(path->hops[i].in_port, "Writing hop %d, index %d", 504 - i, path->hops[i].in_hop_index); 503 + tb_port_dbg(path->hops[i].in_port, "Writing hop %d, index %d\n", 504 + i, path->hops[i].in_hop_index); 505 505 tb_dump_hop(path->hops[i].in_port, &hop); 506 506 res = tb_port_write(path->hops[i].in_port, &hop, TB_CFG_HOPS, 507 507 2 * path->hops[i].in_hop_index, 2); ··· 512 512 } 513 513 } 514 514 path->activated = true; 515 - tb_info(path->tb, "path activation complete\n"); 515 + tb_dbg(path->tb, "path activation complete\n"); 516 516 return 0; 517 517 err: 518 518 tb_WARN(path->tb, "path activation failed\n");
+9 -10
drivers/thunderbolt/switch.c
··· 493 493 if (state < 0) 494 494 return state; 495 495 if (state == TB_PORT_DISABLED) { 496 - tb_port_info(port, "is disabled (state: 0)\n"); 496 + tb_port_dbg(port, "is disabled (state: 0)\n"); 497 497 return 0; 498 498 } 499 499 if (state == TB_PORT_UNPLUGGED) { 500 500 if (wait_if_unplugged) { 501 501 /* used during resume */ 502 - tb_port_info(port, 503 - "is unplugged (state: 7), retrying...\n"); 502 + tb_port_dbg(port, 503 + "is unplugged (state: 7), retrying...\n"); 504 504 msleep(100); 505 505 continue; 506 506 } 507 - tb_port_info(port, "is unplugged (state: 7)\n"); 507 + tb_port_dbg(port, "is unplugged (state: 7)\n"); 508 508 return 0; 509 509 } 510 510 if (state == TB_PORT_UP) { 511 - tb_port_info(port, 512 - "is connected, link is up (state: 2)\n"); 511 + tb_port_dbg(port, "is connected, link is up (state: 2)\n"); 513 512 return 1; 514 513 } 515 514 ··· 516 517 * After plug-in the state is TB_PORT_CONNECTING. Give it some 517 518 * time. 518 519 */ 519 - tb_port_info(port, 520 - "is connected, link is not up (state: %d), retrying...\n", 521 - state); 520 + tb_port_dbg(port, 521 + "is connected, link is not up (state: %d), retrying...\n", 522 + state); 522 523 msleep(100); 523 524 } 524 525 tb_port_warn(port, ··· 584 585 int tb_port_clear_counter(struct tb_port *port, int counter) 585 586 { 586 587 u32 zero[3] = { 0, 0, 0 }; 587 - tb_port_info(port, "clearing counter %d\n", counter); 588 + tb_port_dbg(port, "clearing counter %d\n", counter); 588 589 return tb_port_write(port, zero, TB_CFG_COUNTERS, 3 * counter, 3); 589 590 } 590 591
+5 -6
drivers/thunderbolt/tb.c
··· 556 556 } else if (tb_port_is_dpout(port)) { 557 557 tb_teardown_dp(tb, port); 558 558 } else { 559 - tb_port_info(port, 560 - "got unplug event for disconnected port, ignoring\n"); 559 + tb_port_dbg(port, 560 + "got unplug event for disconnected port, ignoring\n"); 561 561 } 562 562 } else if (port->remote) { 563 - tb_port_info(port, 564 - "got plug event for connected port, ignoring\n"); 563 + tb_port_dbg(port, "got plug event for connected port, ignoring\n"); 565 564 } else { 566 565 if (tb_port_is_null(port)) { 567 - tb_port_info(port, "hotplug: scanning\n"); 566 + tb_port_dbg(port, "hotplug: scanning\n"); 568 567 tb_scan_port(port); 569 568 if (!port->remote) 570 - tb_port_info(port, "hotplug: no switch found\n"); 569 + tb_port_dbg(port, "hotplug: no switch found\n"); 571 570 } else if (tb_port_is_dpout(port)) { 572 571 tb_tunnel_dp(tb, port); 573 572 }
+2 -4
drivers/thunderbolt/tunnel.c
··· 611 611 { 612 612 int res, i; 613 613 614 - tb_tunnel_info(tunnel, "activating\n"); 614 + tb_tunnel_dbg(tunnel, "activating\n"); 615 615 616 616 /* 617 617 * Make sure all paths are properly disabled before enabling ··· 660 660 { 661 661 int i; 662 662 663 - tb_tunnel_info(tunnel, "activating\n"); 664 - 665 663 for (i = 0; i < tunnel->npaths; i++) { 666 664 if (tunnel->paths[i]->activated) { 667 665 tb_tunnel_WARN(tunnel, ··· 679 681 { 680 682 int i; 681 683 682 - tb_tunnel_info(tunnel, "deactivating\n"); 684 + tb_tunnel_dbg(tunnel, "deactivating\n"); 683 685 684 686 if (tunnel->activate) 685 687 tunnel->activate(tunnel, false);