From patchwork Thu Jan 5 11:35:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 639669 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2281C3DA7D for ; Thu, 5 Jan 2023 11:36:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233326AbjAELgB (ORCPT ); Thu, 5 Jan 2023 06:36:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231147AbjAELfp (ORCPT ); Thu, 5 Jan 2023 06:35:45 -0500 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 131933E0E4 for ; Thu, 5 Jan 2023 03:35:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672918545; x=1704454545; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Bjh96GhDblTGAjzmY5AtdZd9tH8OuAmObS+AaNoa6hs=; b=aKEyED5BZJf5jAl2VlOm+S8L8q425EeDnvth1wAh4BWrmkffGGubb/kU ewYfVb4beiLeCxJ23WFyUHBP/Pan8UnRqS/UFfKlfe61FYB7qf0AQem+J myz6ABpiBhTyhhtLDFRFC3eYIlkjdXx/vyXLgjCAXQu/uEfWWGcNeG0Ww bPW/2MedqQaUZV1AGv996KxbzIrpL3g3czgXmvwaSczxOJCiLxOQ18lT1 Mjh3Ow8czTARbqEKHj6NaIC+VUOLZnf/q8qbLZw50jqnVVQPbPPHIIJLS O1tFhEldmDz0g/lwOZa9YnSUgI2+AAD2NGVIdHmKceKMGK09nzDrxznOG A==; X-IronPort-AV: E=McAfee;i="6500,9779,10580"; a="302551919" X-IronPort-AV: E=Sophos;i="5.96,302,1665471600"; d="scan'208";a="302551919" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2023 03:35:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10580"; a="900903388" X-IronPort-AV: E=Sophos;i="5.96,302,1665471600"; d="scan'208";a="900903388" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga006.fm.intel.com with ESMTP; 05 Jan 2023 03:35:29 -0800 Received: by black.fi.intel.com (Postfix, from userid 1001) id C99322AD; Thu, 5 Jan 2023 13:35:59 +0200 (EET) From: Mika Westerberg To: linux-usb@vger.kernel.org Cc: Yehezkel Bernat , Michael Jamet , Lukas Wunner , Andreas Noever , Mika Westerberg Subject: [PATCH 7/8] thunderbolt: Include the additional DP IN double word in debugfs dump Date: Thu, 5 Jan 2023 13:35:58 +0200 Message-Id: <20230105113559.68531-8-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230105113559.68531-1-mika.westerberg@linux.intel.com> References: <20230105113559.68531-1-mika.westerberg@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org When DisplayPort bandwidth allocation mode is supported by the DP IN adapter it has an extra double word in the adapter config space. Include this in the debugfs register dump. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/debugfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/thunderbolt/debugfs.c b/drivers/thunderbolt/debugfs.c index 834bcad42e9f..4339e706cc3a 100644 --- a/drivers/thunderbolt/debugfs.c +++ b/drivers/thunderbolt/debugfs.c @@ -1159,7 +1159,10 @@ static void port_cap_show(struct tb_port *port, struct seq_file *s, if (tb_port_is_pcie_down(port) || tb_port_is_pcie_up(port)) { length = PORT_CAP_PCIE_LEN; } else if (tb_port_is_dpin(port) || tb_port_is_dpout(port)) { - length = PORT_CAP_DP_LEN; + if (usb4_dp_port_bw_mode_supported(port)) + length = PORT_CAP_DP_LEN + 1; + else + length = PORT_CAP_DP_LEN; } else if (tb_port_is_usb3_down(port) || tb_port_is_usb3_up(port)) { length = PORT_CAP_USB3_LEN;