thunderbolt: Fix for v7.3-rc7

This incluces a single fix to make the runtime PM completion complete
 devices that are actually part of the domain. Needed for firmware
 connection manager based systems.
 
 This has been in linux-next for few days with no reported issues.
 -----BEGIN PGP SIGNATURE-----
 
 iQJUBAABCgA+FiEEVTdhRGBbNzLrSUBaAP2fSd+ZWKAFAmrGMaUgHG1pa2Eud2Vz
 dGVyYmVyZ0BsaW51eC5pbnRlbC5jb20ACgkQAP2fSd+ZWKBqdQ//S/MKHlzXAtso
 /D+3txXHHt2bATvnm1HnpVvA0Peh/evXUz8aYW19257k1lLcc4QbXi9ux2RffrfH
 1hzcamZ76EP+yTeBBXY/ikNtu8QdjLY5/mHgVSKvlpvtCqOMd1uxyKRafs9KUgFm
 yo0aIMqOyV70Z7qhPU7Q+phtu65v6u+X9guALdy3VUNCKpmb9SbtF8VqdB14s4W0
 Wjdfk8Vq7HiPsssPFEyczADQA4jX/lKMPw4MQZXfN8x61ESZQI6CwY5WSvCm4+V6
 OuqLa1BQ6eTB1POGZ0lK9BzK7MZEiP3RJWiPdCbHdAwmV/7uqBsV0mlewZE0b9UK
 NIDnkU9rbk7HdCbt/TEDu5eNKwhcLfgpCecMH9sOBAeDJYI4ZCQEKSM4g9oJmxBL
 cfKG8UjY8tiC9zp9H6JnhHl+/gvOfeNkhXGPGtJt7DOOTqvU6eXIZJzZVpiAGDQH
 7LQYFREeO2zTcOUEZfvy5VYWSbTAyOu3mh7a0p7UrbKvjnNeEOZ5ius80TLPFSYt
 VVKvtlJ91z4TGsb7Tgop3UqbGsCvFs2xv14xKQpKvvbMKkWuNDhR+p4nAliKr3oy
 hm6JHuXMVVQMyBb9ADNl6ebmMJu0iFqeatReljh07vPVlpwO0fUeRVpG9BBYQ9aS
 PzxhCTsu84nBhgynjvTi496yin8a/Bg=
 =Yll+
 -----END PGP SIGNATURE-----

Merge tag 'thunderbolt-for-v7.3-rc7' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-next

Mika writes:

thunderbolt: Fix for v7.3-rc7

This incluces a single fix to make the runtime PM completion complete
devices that are actually part of the domain. Needed for firmware
connection manager based systems.

This has been in linux-next for few days with no reported issues.

* tag 'thunderbolt-for-v7.3-rc7' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt:
  thunderbolt: Do not RPM complete unrelated subtrees on unplug
This commit is contained in:
Greg Kroah-Hartman 2026-10-09 15:50:56 +02:00
commit e8d3b929bf

View File

@ -2072,7 +2072,7 @@ static int complete_rpm(struct device *dev, void *data)
{
struct tb_switch *sw = tb_to_switch(dev);
if (sw)
if (sw && sw->tb == data)
complete(&sw->rpm_complete);
return 0;
}
@ -2088,8 +2088,8 @@ static void remove_unplugged_switch(struct tb_switch *sw)
* tb_switch_remove() calls pm_runtime_get_sync() that then waits
* for it.
*/
complete_rpm(&sw->dev, NULL);
bus_for_each_dev(&tb_bus_type, &sw->dev, NULL, complete_rpm);
complete_rpm(&sw->dev, sw->tb);
bus_for_each_dev(&tb_bus_type, &sw->dev, sw->tb, complete_rpm);
tb_switch_remove(sw);
pm_runtime_mark_last_busy(parent);