thunderbolt: Add support for maxhopid XDomain property
authorMika Westerberg <mika.westerberg@linux.intel.com>
Fri, 8 Jan 2021 12:57:19 +0000 (14:57 +0200)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Thu, 18 Mar 2021 15:25:31 +0000 (18:25 +0300)
commit46b494f286812a88caba28dd0810cf3a55747431
tree13ca189783f360871f249c73fc261c13c153b046
parent7d3084c0b77c6c417a16fc1c5bf3bc3149d20fab
thunderbolt: Add support for maxhopid XDomain property

USB4 inter-domain spec mandates that the compatible hosts expose a new
property "maxhopid" that tells the connection manager on the other side
what is the maximum supported input HopID over the connection. Since
this is depend on the lane adapter the cable is connected it needs to be
filled in dynamically.

For this reason we take a copy of the global properties and fill then
for each XDomain connection upon first connect, and then keep updating
it if the generation changes as services are being added/removed. We
also take advantage of this copy to fill in the hostname.

We also expose this maxhopid as an attribute under each XDomain device.

While there drop kernel-doc entry for property_lock which seems to be
left there when the structure was originally introduced.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Documentation/ABI/testing/sysfs-bus-thunderbolt
drivers/thunderbolt/xdomain.c
include/linux/thunderbolt.h