Skip to contentSkip to conversation

thunderbolt: xdomain: notify peers after enumeration

PATCH Superseded Rqirus 2 participants 2 messages Jun 24

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Rqirus

author
#0 lore raw

PATCH 1/1 thunderbolt: xdomain: notify peers after enumeration

Service drivers may register local XDomain properties while discovery is still in progress. This can cause the properties changed notification to be sent before the peer is ready to act on it.

If the peer has already read the local property block before the service was registered, it may keep using the old property generation and miss the newly registered service. With ThunderboltIP this can leave the network service half-discovered after a warm reboot and the login request eventually times out.

Queue another properties changed notification after the XDomain reaches ENUMERATED so the peer can re-read the final local properties.

---
 drivers/thunderbolt/xdomain.c | 1 +
 1 file changed, 1 insertion(+)
drivers/thunderbolt/xdomain.c +1 -0
index 86b2f7474..9c068d073 100644
@@ -1811,6 +1811,7 @@ static void tb_xdomain_state_work(struct work_struct *work)
 			tb_xdomain_failed(xd);
 		} else {
 			xd->state = XDOMAIN_STATE_ENUMERATED;
+			tb_xdomain_queue_properties_changed(xd);
 		}
 		break;
 

base-commit: 502d801f0ab03e4f32f9a33d203154ce84887921

Signature · 1 line
2.47.3
#1 lore raw

Hi,

Quoted 10 lines · Rqirus

Service drivers may register local XDomain properties while discovery is still in progress. This can cause the properties changed notification to be sent before the peer is ready to act on it.

If the peer has already read the local property block before the service was registered, it may keep using the old property generation and miss the newly registered service. With ThunderboltIP this can leave the network service half-discovered after a warm reboot and the login request eventually times out.

Quoted 4 lines

Queue another properties changed notification after the XDomain reaches ENUMERATED so the peer can re-read the final local properties.

You should be using your full name here.

The patch itself looks reasonable to me.

Quoted 20 lines
---
 drivers/thunderbolt/xdomain.c | 1 +
 1 file changed, 1 insertion(+)
drivers/thunderbolt/xdomain.c +1 -0
index 86b2f7474..9c068d073 100644
@@ -1811,6 +1811,7 @@ static void tb_xdomain_state_work(struct work_struct *work)
 			tb_xdomain_failed(xd);
 		} else {
 			xd->state = XDOMAIN_STATE_ENUMERATED;
+			tb_xdomain_queue_properties_changed(xd);
 		}
 		break;
 

base-commit: 502d801f0ab03e4f32f9a33d203154ce84887921

Signature · 1 line
2.47.3