diff --git a/drivers/thunderbolt/domain.c b/drivers/thunderbolt/domain.c index e77c0eab18cc4..c870fc456598f 100644 --- a/drivers/thunderbolt/domain.c +++ b/drivers/thunderbolt/domain.c @@ -604,14 +604,20 @@ int tb_domain_resume_noirq(struct tb *tb) int ret = 0; mutex_lock(&tb->lock); - if (!tb->noirq_ctl_retained) - tb_ctl_start(tb->ctl); - if (tb->cm_ops->resume_noirq) - ret = tb->cm_ops->resume_noirq(tb); + /* + * End the hold before resume_noirq(), where a stopped channel would be + * started: hotplug events and XDomain responses then reach the + * connection manager from the same point as without the hold. Requests + * still wait for tb->lock, which is held until the resume is done. + */ if (tb->noirq_ctl_retained) { WRITE_ONCE(tb->noirq_ctl_retained, false); tb_dbg(tb, "XDomain control channel remained active\n"); + } else { + tb_ctl_start(tb->ctl); } + if (tb->cm_ops->resume_noirq) + ret = tb->cm_ops->resume_noirq(tb); mutex_unlock(&tb->lock); return ret; diff --git a/drivers/thunderbolt/xdomain.c b/drivers/thunderbolt/xdomain.c index d174e7129191c..4d297d54626d3 100644 --- a/drivers/thunderbolt/xdomain.c +++ b/drivers/thunderbolt/xdomain.c @@ -761,7 +761,10 @@ static void stop_handshake(struct tb_xdomain *xd) /* * The XDomain discovery requests answered while the control channel is kept - * through s2idle (tb->noirq_ctl_retained): they only read state. + * through s2idle (tb->noirq_ctl_retained). They change no state: UUID and + * properties are answered from memory, and LINK_STATE_STATUS_REQUEST reads + * the downstream port's registers, under tb->lock, from a host router that + * stays powered (QUIRK_NO_SYSTEM_SLEEP). */ static bool tb_xdp_noirq_request(enum tb_xdp_type type) {