Re: Possible problem with thunderbolt 4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, Jan 02, 2023 at 12:45:40PM +0100, Christian Schaubschläger wrote:
> Hi,
> 
> >> After echoing 0 to the 'authorized' file, the devices disappear in
> >> linux from the PCI bus, but unfortunately don't show up in the
> >> firmware after the reboot...
> > Okay it may be that the USB 3 tunnel that is still up makes the CM in
> > BIOS to think the hardware is in unexected state or so.
> >
> > This was Thunderbolt 4 dock, right? Do you happen to have Thunderbolt 3
> > device or Thunderbolt 3 active cable around? If yes then there is only
> > the PCIe tunnel so doing the above de-authorization should in theory
> > work. If no then one option is to add the ->shutdown() hook to tear down
> > the tunnels.
> I have a slightly older EliteBook with a TB3 controller. The TB4 Dock works flawlessly with this.
> And I have the predecessor of the TB4 Dock which also uses TB3. This
> works fine on the new EliteBook with the TB4 controller.
> 
> Both docks have their thunderbolt cables 'built-in', so I cannot switch cables...

I see.

> Any more tests I could make?

Can you try the below hack? It should tear down all tunnels during
reboot so the firmware should see pristine path configuration spaces
(assuming it is looking at them and failing because if already configure
paths).

diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c
index 1711dc19b1e2..e0544843e242 100644
--- a/drivers/thunderbolt/tb.c
+++ b/drivers/thunderbolt/tb.c
@@ -1982,13 +1982,7 @@ static void tb_stop(struct tb *tb)
 	cancel_delayed_work(&tcm->remove_work);
 	/* tunnels are only present after everything has been initialized */
 	list_for_each_entry_safe(tunnel, n, &tcm->tunnel_list, list) {
-		/*
-		 * DMA tunnels require the driver to be functional so we
-		 * tear them down. Other protocol tunnels can be left
-		 * intact.
-		 */
-		if (tb_tunnel_is_dma(tunnel))
-			tb_tunnel_deactivate(tunnel);
+		tb_tunnel_deactivate(tunnel);
 		tb_tunnel_free(tunnel);
 	}
 	tb_switch_remove(tb->root_switch);



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux