linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: "Christian Schaubschläger" <christian.schaubschlaeger@gmx.at>
Cc: linux-usb@vger.kernel.org,
	"michael.simon@cpsd.at" <michael.simon@cpsd.at>
Subject: Re: Possible problem with thunderbolt 4
Date: Mon, 2 Jan 2023 18:23:08 +0200	[thread overview]
Message-ID: <Y7ME7EwduIQE38+2@black.fi.intel.com> (raw)
In-Reply-To: <011df027-5381-1e10-9c54-e0935ae549f9@gmx.at>

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);

  reply	other threads:[~2023-01-02 16:22 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-23 11:24 Possible problem with thunderbolt 4 Christian Schaubschläger
2022-12-27 14:28 ` Mika Westerberg
2022-12-30  7:57   ` Christian Schaubschläger
2022-12-30  9:28     ` Mika Westerberg
2022-12-30 11:38       ` Christian Schaubschläger
2022-12-30 11:55         ` Mika Westerberg
2022-12-30 12:08           ` Christian Schaubschläger
2022-12-30 12:21             ` Mika Westerberg
2023-01-02  8:56               ` Christian Schaubschläger
2023-01-02 11:11                 ` Mika Westerberg
2023-01-02 11:45                   ` Christian Schaubschläger
2023-01-02 16:23                     ` Mika Westerberg [this message]
2023-01-03  9:08                       ` Christian Schaubschläger
2023-01-03 11:08                         ` Mika Westerberg
2023-01-03 12:14                           ` Christian Schaubschläger
2023-01-03 16:07                             ` Mika Westerberg
2023-01-03 17:50                               ` Christian Schaubschläger
2023-01-04  8:04                                 ` Mika Westerberg
2023-01-09 12:17                                   ` Christian Schaubschläger
2023-01-09 12:50                                     ` Mika Westerberg
2023-01-09 14:21                                       ` Christian Schaubschläger
2023-01-10 15:12                                         ` Mika Westerberg
2023-01-11 10:38                                           ` Christian Schaubschläger
2023-01-11 10:45                                             ` Mika Westerberg
2023-01-19  9:41                                               ` Christian Schaubschläger
2023-01-19 10:10                                                 ` Mika Westerberg
2023-01-19 14:37                                                   ` Christian Schaubschläger
2023-01-20 10:14                                                     ` Mika Westerberg
2023-01-20 11:19                                                       ` Christian Schaubschläger
2023-01-20 11:36                                                         ` Mika Westerberg
2023-01-27 12:07                                                     ` Christian Schaubschläger
2023-01-27 12:27                                                       ` Mika Westerberg
2023-01-30 10:52                                                         ` Christian Schaubschläger
2023-01-30 14:10                                                           ` Mika Westerberg
2023-03-06 11:52                                                             ` Mika Westerberg
2023-03-06 12:27                                                               ` Christian Schaubschläger
2023-05-23  8:22                                                                 ` Christian Schaubschläger
2023-05-23  8:55                                                                   ` 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=Y7ME7EwduIQE38+2@black.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=christian.schaubschlaeger@gmx.at \
    --cc=linux-usb@vger.kernel.org \
    --cc=michael.simon@cpsd.at \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).