Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp434429ybb; Thu, 28 Mar 2019 05:37:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwZPOGq4H/ZqIEYiSNlyRh9sG/wXiexjrpdSW9h/OoU0xJcpFqnrbE65cBk1XuyvQVOQSSo X-Received: by 2002:a62:4602:: with SMTP id t2mr27092403pfa.26.1553776669319; Thu, 28 Mar 2019 05:37:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553776669; cv=none; d=google.com; s=arc-20160816; b=GxMuNJ1zyMrJ9ML+qQ+MzK4aDAItX3sqhDtgEcclNjIdfyC6a8fvkgDaQ/K8mCwFfn tiWkC6Iy6Frq5IWNaBZu8KU8h7hW3Y4QK/f4d68Jxo68GiVkzKwM1LNUFpf33tu/SEV9 UK3wAh+iYMAOX9sklW1NpvByxuRBCcvoKspqJu/Nxys/c5xQfhZJ6PiaSKspAsLXK0uC 8HTZdnOOjcawT1bA0hqVZ4pK8G0WBmI5wtsu3GE2M2hLimz/kp7WghBmPwh5JRYWHCGc ne6Ey4ia9+xIllsdLO2KTqngqXklM/kOarRSwzEnHCeaGj4M7yRfulNX7Vu4NY13qXuo O3Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=gzvJzA/AsLiX9W469soAINyBG1ysTjMxiaeCCHeHvBo=; b=egUaCSLcqC+Nv3rYI40UUOGBhJ637F6VZ5dfCNxzf2irEd969E3sJlbsJuU+U0CW0D SQdZWNrQIdZoWa7YbMozprBtOpkYvQrXtRcLEV6z8flcE+67wkGj9HSi+xcmMB9DniTr EqQo/Llaa4RJMrPT1UWVoWt5mmY5uu4+I3VEhlIEiuMmA+yoCFK21YJobnFBW+sNAwAs xe8fWWaJbKozQzvCuA9uXyiLf9qcHtuiDiXoiA+Ofnuv4Oi/JdLJSWwdYUflY+iMiYA2 hgx3a1ALmxv/4v7/kIctWdWI5xsr5HGd0mBQ0hMOeCOKmKkb+RRthrRBiV9ONBy4zgck 4zuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j188si21619683pfb.75.2019.03.28.05.37.34; Thu, 28 Mar 2019 05:37:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727505AbfC1Mgu (ORCPT + 99 others); Thu, 28 Mar 2019 08:36:50 -0400 Received: from mga09.intel.com ([134.134.136.24]:34158 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727363AbfC1Mgs (ORCPT ); Thu, 28 Mar 2019 08:36:48 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Mar 2019 05:36:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,280,1549958400"; d="scan'208";a="138136897" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga007.fm.intel.com with ESMTP; 28 Mar 2019 05:36:45 -0700 Received: by black.fi.intel.com (Postfix, from userid 1001) id 8036A187E; Thu, 28 Mar 2019 14:36:35 +0200 (EET) From: Mika Westerberg To: linux-kernel@vger.kernel.org Cc: Michael Jamet , Yehezkel Bernat , Andreas Noever , Lukas Wunner , "David S . Miller" , Andy Shevchenko , Christian Kellner , Mario.Limonciello@dell.com, Mika Westerberg , netdev@vger.kernel.org Subject: [PATCH v3 35/36] thunderbolt: Reword output of tb_dump_hop() Date: Thu, 28 Mar 2019 15:36:32 +0300 Message-Id: <20190328123633.42882-36-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190328123633.42882-1-mika.westerberg@linux.intel.com> References: <20190328123633.42882-1-mika.westerberg@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/thunderbolt/path.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/thunderbolt/path.c b/drivers/thunderbolt/path.c index 2dbfb3e1c3fc..44bdf08f3f68 100644 --- a/drivers/thunderbolt/path.c +++ b/drivers/thunderbolt/path.c @@ -13,21 +13,22 @@ #include "tb.h" -static void tb_dump_hop(struct tb_port *port, struct tb_regs_hop *hop) +static void tb_dump_hop(const struct tb_path_hop *hop, const struct tb_regs_hop *regs) { - tb_port_dbg(port, " Hop through port %d to hop %d (%s)\n", - hop->out_port, hop->next_hop, - hop->enable ? "enabled" : "disabled"); + const struct tb_port *port = hop->in_port; + + tb_port_dbg(port, " In HopID: %d => Out port: %d Out HopID: %d\n", + hop->in_hop_index, regs->out_port, regs->next_hop); tb_port_dbg(port, " Weight: %d Priority: %d Credits: %d Drop: %d\n", - hop->weight, hop->priority, - hop->initial_credits, hop->drop_packages); + regs->weight, regs->priority, + regs->initial_credits, regs->drop_packages); tb_port_dbg(port, " Counter enabled: %d Counter index: %d\n", - hop->counter_enable, hop->counter); + regs->counter_enable, regs->counter); tb_port_dbg(port, " Flow Control (In/Eg): %d/%d Shared Buffer (In/Eg): %d/%d\n", - hop->ingress_fc, hop->egress_fc, - hop->ingress_shared_buffer, hop->egress_shared_buffer); + regs->ingress_fc, regs->egress_fc, + regs->ingress_shared_buffer, regs->egress_shared_buffer); tb_port_dbg(port, " Unknown1: %#x Unknown2: %#x Unknown3: %#x\n", - hop->unknown1, hop->unknown2, hop->unknown3); + regs->unknown1, regs->unknown2, regs->unknown3); } static struct tb_port *tb_path_find_dst_port(struct tb_port *src, int src_hopid, @@ -503,9 +504,8 @@ int tb_path_activate(struct tb_path *path) & out_mask; hop.unknown3 = 0; - tb_port_dbg(path->hops[i].in_port, "Writing hop %d, index %d", - i, path->hops[i].in_hop_index); - tb_dump_hop(path->hops[i].in_port, &hop); + tb_port_dbg(path->hops[i].in_port, "Writing hop %d\n", i); + tb_dump_hop(&path->hops[i], &hop); res = tb_port_write(path->hops[i].in_port, &hop, TB_CFG_HOPS, 2 * path->hops[i].in_hop_index, 2); if (res) { -- 2.20.1