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

thunderbolt: Reword output of tb_dump_hop()

While tb_dump_hop() prints out necessary information it is in format
that is quite hard to read from the logs especially when one needs to
follow the path to see that the setup is correct.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>

+13 -13
+13 -13
drivers/thunderbolt/path.c
··· 13 13 14 14 #include "tb.h" 15 15 16 - static void tb_dump_hop(struct tb_port *port, struct tb_regs_hop *hop) 16 + static void tb_dump_hop(const struct tb_path_hop *hop, const struct tb_regs_hop *regs) 17 17 { 18 - tb_port_dbg(port, " Hop through port %d to hop %d (%s)\n", 19 - hop->out_port, hop->next_hop, 20 - hop->enable ? "enabled" : "disabled"); 18 + const struct tb_port *port = hop->in_port; 19 + 20 + tb_port_dbg(port, " In HopID: %d => Out port: %d Out HopID: %d\n", 21 + hop->in_hop_index, regs->out_port, regs->next_hop); 21 22 tb_port_dbg(port, " Weight: %d Priority: %d Credits: %d Drop: %d\n", 22 - hop->weight, hop->priority, 23 - hop->initial_credits, hop->drop_packages); 23 + regs->weight, regs->priority, 24 + regs->initial_credits, regs->drop_packages); 24 25 tb_port_dbg(port, " Counter enabled: %d Counter index: %d\n", 25 - hop->counter_enable, hop->counter); 26 + regs->counter_enable, regs->counter); 26 27 tb_port_dbg(port, " Flow Control (In/Eg): %d/%d Shared Buffer (In/Eg): %d/%d\n", 27 - hop->ingress_fc, hop->egress_fc, 28 - hop->ingress_shared_buffer, hop->egress_shared_buffer); 28 + regs->ingress_fc, regs->egress_fc, 29 + regs->ingress_shared_buffer, regs->egress_shared_buffer); 29 30 tb_port_dbg(port, " Unknown1: %#x Unknown2: %#x Unknown3: %#x\n", 30 - hop->unknown1, hop->unknown2, hop->unknown3); 31 + regs->unknown1, regs->unknown2, regs->unknown3); 31 32 } 32 33 33 34 static struct tb_port *tb_path_find_dst_port(struct tb_port *src, int src_hopid, ··· 501 500 & out_mask; 502 501 hop.unknown3 = 0; 503 502 504 - tb_port_dbg(path->hops[i].in_port, "Writing hop %d, index %d\n", 505 - i, path->hops[i].in_hop_index); 506 - tb_dump_hop(path->hops[i].in_port, &hop); 503 + tb_port_dbg(path->hops[i].in_port, "Writing hop %d\n", i); 504 + tb_dump_hop(&path->hops[i], &hop); 507 505 res = tb_port_write(path->hops[i].in_port, &hop, TB_CFG_HOPS, 508 506 2 * path->hops[i].in_hop_index, 2); 509 507 if (res) {