diff options
| author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2025-11-19 12:53:58 +0200 |
|---|---|---|
| committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2026-05-05 13:53:46 +0200 |
| commit | f5cc545f59699549adbaa4084149f8247865a51d (patch) | |
| tree | f15dcb730f487d59f5a1b7dc237dfea8a8241583 /include/linux | |
| parent | e56249d8a68e712f3b60e1f3fdbb5b4fea146468 (diff) | |
thunderbolt: Wait for tb_domain_release() to complete when driver is removed
We should not call nhi_shutdown() before the domain structure and the
control channel rings are completely released. Otherwise we might
release resources like the nhi->msix_ida that are still referenced in
tb_domain_release(). For this reason wait for the tb_domain_release() to
be completed before continuing to nhi_shutdown() and eventually
releasing of the rest of the data structures.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/thunderbolt.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/thunderbolt.h b/include/linux/thunderbolt.h index 0ba112175bb3..a5ef7100a6d3 100644 --- a/include/linux/thunderbolt.h +++ b/include/linux/thunderbolt.h @@ -493,6 +493,7 @@ static inline struct tb_xdomain *tb_service_parent(struct tb_service *svc) * MSI-X is used. * @hop_count: Number of rings (end point hops) supported by NHI. * @quirks: NHI specific quirks if any + * @domain_released: Completed when domain has been fully released */ struct tb_nhi { spinlock_t lock; @@ -507,6 +508,7 @@ struct tb_nhi { struct work_struct interrupt_work; u32 hop_count; unsigned long quirks; + struct completion domain_released; }; /** |
