diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2023-05-26 13:55:20 +0200 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2023-06-12 07:38:01 +0200 |
commit | 87200371817ec6e48e42ef2f03756268661a8815 (patch) | |
tree | 23d64c1a7e8bf47f789e958536587331e75517af /drivers/thunderbolt/tb.h | |
parent | thunderbolt: Do not send UNSET_INBOUND_SBTX when retimer NVM authentication s... (diff) | |
download | linux-87200371817ec6e48e42ef2f03756268661a8815.tar.xz linux-87200371817ec6e48e42ef2f03756268661a8815.zip |
thunderbolt: Enable/disable sideband depending on USB4 port offline mode
When USB4 port is in offline mode (this mean there is no device
attached) we want to keep the sideband up to make it possible to
communicate with the retimers. In the same way there is no need to
enable sideband transactions when the USB4 port is not offline as they
are already up.
For this reason make the enabling/disabling depend on the USB4 port
offline status.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/tb.h')
-rw-r--r-- | drivers/thunderbolt/tb.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h index 2bda2816ff47..58df106aaa5e 100644 --- a/drivers/thunderbolt/tb.h +++ b/drivers/thunderbolt/tb.h @@ -1301,6 +1301,11 @@ struct usb4_port *usb4_port_device_add(struct tb_port *port); void usb4_port_device_remove(struct usb4_port *usb4); int usb4_port_device_resume(struct usb4_port *usb4); +static inline bool usb4_port_device_is_offline(const struct usb4_port *usb4) +{ + return usb4->offline; +} + void tb_check_quirks(struct tb_switch *sw); #ifdef CONFIG_ACPI |