The USB4 Inter-Domain Service specification defines a protocol that can be used to establish lane bonding between two USB4 domains (hosts). So far we have not implemented it because the host controller DMA was not fast enough to be able to go over 20 Gbits/s even if lanes were bonded. However, starting from Intel Alder Lake CPUs the DMA can go over 20 Gbits/s so now it makes more sense to add this support to the driver. Because both ends need to negotiate the bonding we add a simple state machine that tracks the connection state and does the necessary steps described by the USB4 Inter-Domain Service specification. We only establish lane bonding when both sides of the link support it. Otherwise we default to use the single lane. Also this is only done when software connection manager is used. On systems with firmware based connection manager, it handles the high-speed tunneling so bonding lanes is specific to the implementation (Intel firmware based connection manager does not support lane bonding).
Showing the changes to include (1 of 5 files). Show all
Unified · Split
| @@ -198,15 +198,15 @@ void tb_unregister_property_dir(const char *key, struct tb_property_dir *dir); · 197 unmodified lines | |||
| 198 | * @local_property_block_len: Length of the @local_property_block in dwords | 198 | * @local_property_block_len: Length of the @local_property_block in dwords |
| 199 | * @remote_properties: Properties exported by the remote domain | 199 | * @remote_properties: Properties exported by the remote domain |
| 200 | * @remote_property_block_gen: Generation of @remote_properties | 200 | * @remote_property_block_gen: Generation of @remote_properties |
| 201 | * @get_uuid_work: Work used to retrieve @remote_uuid | 201 | * @state: Next XDomain discovery state to run |
| 202 | * @uuid_retries: Number of times left @remote_uuid is requested before | 202 | * @state_work: Work used to run the next state |
| 203 | * giving up | 203 | * @state_retries: Number of retries remain for the state |
| 204 | * @get_properties_work: Work used to get remote domain properties | ||
| 205 | * @properties_retries: Number of times left to read properties | ||
| 206 | * @properties_changed_work: Work used to notify the remote domain that | 204 | * @properties_changed_work: Work used to notify the remote domain that |
| 207 | * our properties have changed | 205 | * our properties have changed |
| 208 | * @properties_changed_retries: Number of times left to send properties | 206 | * @properties_changed_retries: Number of times left to send properties |
| 209 | * changed notification | 207 | * changed notification |
| 208 | * @bonding_possible: True if lane bonding is possible on local side | ||
| 209 | * @target_link_width: Target link width from the remote host | ||
| 210 | * @link: Root switch link the remote domain is connected (ICM only) | 210 | * @link: Root switch link the remote domain is connected (ICM only) |
| 211 | * @depth: Depth in the chain the remote domain is connected (ICM only) | 211 | * @depth: Depth in the chain the remote domain is connected (ICM only) |
| 212 | * | 212 | * |
| @@ -244,12 +244,13 @@ struct tb_xdomain { · 31 unmodified lines | |||
| 244 | u32 local_property_block_len; | 244 | u32 local_property_block_len; |
| 245 | struct tb_property_dir *remote_properties; | 245 | struct tb_property_dir *remote_properties; |
| 246 | u32 remote_property_block_gen; | 246 | u32 remote_property_block_gen; |
| 247 | struct delayed_work get_uuid_work; | 247 | int state; |
| 248 | int uuid_retries; | 248 | struct delayed_work state_work; |
| 249 | struct delayed_work get_properties_work; | 249 | int state_retries; |
| 250 | int properties_retries; | ||
| 251 | struct delayed_work properties_changed_work; | 250 | struct delayed_work properties_changed_work; |
| 252 | int properties_changed_retries; | 251 | int properties_changed_retries; |
| 252 | bool bonding_possible; | ||
| 253 | u8 target_link_width; | ||
| 253 | u8 link; | 254 | u8 link; |
| 254 | u8 depth; | 255 | u8 depth; |
| 255 | }; | 256 | }; |