Re: Apple Thunderbolt Display chaining

From: Mika Westerberg
Date: Mon Aug 08 2022 - 05:52:18 EST


Hi,

On Sat, Aug 06, 2022 at 05:41:37PM +0800, Brad Campbell wrote:
> I've left in the patch to not set up the DP tunnel and recompiled with CONFIG_PCI_DEBUG=y
>
> The minimum I can use to reproduce the fault is a single Thunderbolt display. The Apple TB->GBe dongle doesn't do it
> and I have a TB->USB3+eSATA dongle that won't run on the TB3->TB1 adapter due to insufficient power.
>
> This is captured with serial console. It's a cold boot with a single TB display connected. Boots to desktop and I immediately issue a reboot.
>
> From -> [ 15.337689] xhci_hcd 0000:53:00.3: xHCI Host Controller <- on the second boot, the console output slows to
> about 1-2 characters per second (nothing updates on the monitor) and eventually the machine reboots by itself. I don't have reboot on panic set.

I noticed that the device links are not set for AR/TR devices but it
probably does not help here. Anyway can you try the below patch just in
case?

I did not see anything that stands out from the logs so next step would
be to unbind the drivers for each PCIe device of the TBT display and see
if that helps (so we can narrow this down to a specific driver). You can
either just unload the whole driver (rmmod or modprobe -r) or
"echo XXXX > /sys/pci/drivers/DRIVER/unbind". Where XXXX is the PCI
device name, like 0000:00:2a.0 and so on.

diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c
index 8030fc544c5e..bfe023030b90 100644
--- a/drivers/thunderbolt/tb.c
+++ b/drivers/thunderbolt/tb.c
@@ -2181,6 +2181,10 @@ static void tb_apple_add_links(struct tb_nhi *nhi)
case PCI_DEVICE_ID_INTEL_CACTUS_RIDGE_4C:
case PCI_DEVICE_ID_INTEL_FALCON_RIDGE_2C_NHI:
case PCI_DEVICE_ID_INTEL_FALCON_RIDGE_4C_NHI:
+ case PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_2C_NHI:
+ case PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_4C_NHI:
+ case PCI_DEVICE_ID_INTEL_TITAN_RIDGE_2C_NHI:
+ case PCI_DEVICE_ID_INTEL_TITAN_RIDGE_4C_NHI:
break;
default:
return;