From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Brad Campbell <lists2009@fnarfbargle.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Apple Thunderbolt Display chaining
Date: Wed, 30 Mar 2022 17:47:27 +0300 [thread overview]
Message-ID: <YkRtf2HiXBOWGjna@lahna> (raw)
In-Reply-To: <d40f02e5-7274-e834-6e13-82b3dbe11284@fnarfbargle.com>
Hi,
On Wed, Mar 30, 2022 at 10:24:35PM +0800, Brad Campbell wrote:
> Nope, that did the same thing. I wonder though. I'm testing it on the laptop and that reports :
> [ 0.442832] thunderbolt 0000:07:00.0: Thunderbolt 2 Switch: 8086:156d (Revision: 0, TB Version: 2)
>
> Changing "if (in->sw->generation == 1)" to "if (in->sw->generation == 2)" on the laptop solves that.
Heh, indeed I forgot that this is Falcon Ridge.
> I can't test hotplug properly on the iMac due to the radeon training issue.
>
> The laptop still has the issue of a cold boot working in one socket
> and not the other, but hot plug is working correctly.
Let's try this one next:
diff --git a/drivers/thunderbolt/tunnel.c b/drivers/thunderbolt/tunnel.c
index a473cc7d9a8d..7150b5bc5403 100644
--- a/drivers/thunderbolt/tunnel.c
+++ b/drivers/thunderbolt/tunnel.c
@@ -865,6 +865,8 @@ struct tb_tunnel *tb_tunnel_alloc_dp(struct tb *tb, struct tb_port *in,
struct tb_tunnel *tunnel;
struct tb_path **paths;
struct tb_path *path;
+ struct tb_port *port;
+ int link_nr;
if (WARN_ON(!in->cap_adap || !out->cap_adap))
return NULL;
@@ -883,22 +885,34 @@ struct tb_tunnel *tb_tunnel_alloc_dp(struct tb *tb, struct tb_port *in,
paths = tunnel->paths;
+ /*
+ * Hard code the lane for both DP IN adapters when first
+ * generation hardware is present in the topology.
+ */
+ link_nr = 1;
+ tb_for_each_port_on_path(in, out, port) {
+ if (tb_port_is_null(port) && port->sw->generation == 1) {
+ link_nr = in->port == 11 ? 1 : 0;
+ break;
+ }
+ }
+
path = tb_path_alloc(tb, in, TB_DP_VIDEO_HOPID, out, TB_DP_VIDEO_HOPID,
- 1, "Video");
+ link_nr, "Video");
if (!path)
goto err_free;
tb_dp_init_video_path(path);
paths[TB_DP_VIDEO_PATH_OUT] = path;
path = tb_path_alloc(tb, in, TB_DP_AUX_TX_HOPID, out,
- TB_DP_AUX_TX_HOPID, 1, "AUX TX");
+ TB_DP_AUX_TX_HOPID, link_nr, "AUX TX");
if (!path)
goto err_free;
tb_dp_init_aux_path(path);
paths[TB_DP_AUX_PATH_OUT] = path;
path = tb_path_alloc(tb, out, TB_DP_AUX_RX_HOPID, in,
- TB_DP_AUX_RX_HOPID, 1, "AUX RX");
+ TB_DP_AUX_RX_HOPID, link_nr, "AUX RX");
if (!path)
goto err_free;
tb_dp_init_aux_path(path);
next prev parent reply other threads:[~2022-03-30 14:47 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <acbb3a86-ea15-47ec-90fa-72fbd94921b1@fnarfbargle.com>
2022-03-29 11:31 ` Apple Thunderbolt Display chaining Mika Westerberg
2022-03-29 12:35 ` Brad Campbell
2022-03-29 13:00 ` Mika Westerberg
2022-03-29 14:06 ` Brad Campbell
2022-03-30 10:18 ` Mika Westerberg
2022-03-30 13:19 ` Brad Campbell
2022-03-30 13:43 ` Mika Westerberg
2022-03-30 14:24 ` Brad Campbell
2022-03-30 14:47 ` Mika Westerberg [this message]
2022-03-31 9:02 ` Brad Campbell
2022-03-31 16:36 ` Mika Westerberg
2022-04-01 5:48 ` Brad Campbell
2022-04-01 14:30 ` Mika Westerberg
2022-04-01 15:05 ` Brad Campbell
2022-04-04 10:10 ` Mika Westerberg
2022-04-04 11:38 ` Brad Campbell
2022-04-04 12:53 ` Mika Westerberg
2022-04-06 2:51 ` Brad Campbell
2022-04-06 14:56 ` Mika Westerberg
2022-08-05 7:41 ` Brad Campbell
2022-08-05 11:30 ` Mika Westerberg
2022-08-05 12:43 ` Brad Campbell
2022-08-05 13:01 ` Mika Westerberg
2022-08-05 14:13 ` Brad Campbell
2022-08-05 14:21 ` Mika Westerberg
2022-08-05 14:43 ` Brad Campbell
2022-08-06 6:13 ` Mika Westerberg
2022-08-06 9:41 ` Brad Campbell
2022-08-08 9:51 ` Mika Westerberg
2022-08-08 11:55 ` Brad Campbell
2022-08-08 12:25 ` Brad Campbell
2022-08-08 12:46 ` Mika Westerberg
2022-08-08 13:27 ` Brad Campbell
2022-08-09 10:23 ` Mika Westerberg
2022-08-09 10:40 ` Brad Campbell
2022-08-09 10:55 ` Mika Westerberg
2022-08-09 11:03 ` Brad Campbell
2022-08-09 11:08 ` Brad Campbell
2022-08-09 14:42 ` Mika Westerberg
2022-08-09 15:16 ` Brad Campbell
2022-08-09 15:50 ` Mika Westerberg
2022-08-10 7:40 ` Brad Campbell
2022-08-11 9:50 ` Mika Westerberg
2022-08-11 14:17 ` Brad Campbell
2022-08-12 9:35 ` Mika Westerberg
2022-08-12 10:16 ` Brad Campbell
2022-08-08 12:42 ` Mika Westerberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YkRtf2HiXBOWGjna@lahna \
--to=mika.westerberg@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lists2009@fnarfbargle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.