* [PATCH] thunderbolt: Mark XDomain as unplugged when router is removed
@ 2024-08-02 7:05 Mika Westerberg
2024-08-06 5:04 ` Mika Westerberg
0 siblings, 1 reply; 2+ messages in thread
From: Mika Westerberg @ 2024-08-02 7:05 UTC (permalink / raw)
To: Yehezkel Bernat, Michael Jamet, Lukas Wunner, Andreas Noever
Cc: linux-usb, Mika Westerberg
I noticed that when we do discrete host router NVM upgrade and it gets
hot-removed from the PCIe side as a result of NVM firmware authentication,
if there is another host connected with enabled paths we hang in tearing
them down. This is due to fact that the Thunderbolt networking driver
also tries to cleanup the paths and ends up blocking in
tb_disconnect_xdomain_paths() waiting for the domain lock.
However, at this point we already cleaned the paths in tb_stop() so
there is really no need for tb_disconnect_xdomain_paths() to do that
anymore. Furthermore it already checks if the XDomain is unplugged and
bails out early so take advantage of that and mark the XDomain as
unplugged when we remove the parent router.
Cc: stable@vger.kernel.org
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
drivers/thunderbolt/switch.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index 326433df5880..6a2116cbb06f 100644
--- a/drivers/thunderbolt/switch.c
+++ b/drivers/thunderbolt/switch.c
@@ -3392,6 +3392,7 @@ void tb_switch_remove(struct tb_switch *sw)
tb_switch_remove(port->remote->sw);
port->remote = NULL;
} else if (port->xdomain) {
+ port->xdomain->is_unplugged = true;
tb_xdomain_remove(port->xdomain);
port->xdomain = NULL;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] thunderbolt: Mark XDomain as unplugged when router is removed
2024-08-02 7:05 [PATCH] thunderbolt: Mark XDomain as unplugged when router is removed Mika Westerberg
@ 2024-08-06 5:04 ` Mika Westerberg
0 siblings, 0 replies; 2+ messages in thread
From: Mika Westerberg @ 2024-08-06 5:04 UTC (permalink / raw)
To: Yehezkel Bernat, Michael Jamet, Lukas Wunner, Andreas Noever; +Cc: linux-usb
On Fri, Aug 02, 2024 at 10:05:43AM +0300, Mika Westerberg wrote:
> I noticed that when we do discrete host router NVM upgrade and it gets
> hot-removed from the PCIe side as a result of NVM firmware authentication,
> if there is another host connected with enabled paths we hang in tearing
> them down. This is due to fact that the Thunderbolt networking driver
> also tries to cleanup the paths and ends up blocking in
> tb_disconnect_xdomain_paths() waiting for the domain lock.
>
> However, at this point we already cleaned the paths in tb_stop() so
> there is really no need for tb_disconnect_xdomain_paths() to do that
> anymore. Furthermore it already checks if the XDomain is unplugged and
> bails out early so take advantage of that and mark the XDomain as
> unplugged when we remove the parent router.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Applied to thunderbolt.git/fixes.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-06 5:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-02 7:05 [PATCH] thunderbolt: Mark XDomain as unplugged when router is removed Mika Westerberg
2024-08-06 5:04 ` Mika Westerberg
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).