summaryrefslogtreecommitdiff
path: root/drivers/thunderbolt/tb.h
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@dell.com>2020-06-23 19:14:29 +0300
committerMika Westerberg <mika.westerberg@linux.intel.com>2020-07-01 13:51:49 +0300
commit1cb36293833766e048cba2026dd860687a2851d9 (patch)
tree1922fd625b49827fb65cccd15469e1359b867491 /drivers/thunderbolt/tb.h
parent4b794f8066e84818c172c81024f1d61071f14710 (diff)
downloadlinux-1cb36293833766e048cba2026dd860687a2851d9.tar.xz
thunderbolt: Add support for authenticate on disconnect
Some external devices can support completing thunderbolt authentication when they are unplugged. For this to work though, the link controller must remain operational. The only device known to support this right now is the Dell WD19TB, so add a quirk for this. Signed-off-by: Mario Limonciello <mario.limonciello@dell.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/tb.h')
-rw-r--r--drivers/thunderbolt/tb.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h
index b04a2da9128b..a413d55b5f8b 100644
--- a/drivers/thunderbolt/tb.h
+++ b/drivers/thunderbolt/tb.h
@@ -133,6 +133,7 @@ struct tb_switch_tmu {
* @depth: Depth in the chain this switch is connected (ICM only)
* @rpm_complete: Completion used to wait for runtime resume to
* complete (ICM only)
+ * @quirks: Quirks used for this Thunderbolt switch
*
* When the switch is being added or removed to the domain (other
* switches) you need to have domain lock held.
@@ -171,6 +172,7 @@ struct tb_switch {
u8 link;
u8 depth;
struct completion rpm_complete;
+ unsigned long quirks;
};
/**
@@ -849,6 +851,7 @@ bool tb_lc_lane_bonding_possible(struct tb_switch *sw);
bool tb_lc_dp_sink_query(struct tb_switch *sw, struct tb_port *in);
int tb_lc_dp_sink_alloc(struct tb_switch *sw, struct tb_port *in);
int tb_lc_dp_sink_dealloc(struct tb_switch *sw, struct tb_port *in);
+int tb_lc_force_power(struct tb_switch *sw);
static inline int tb_route_length(u64 route)
{
@@ -941,4 +944,10 @@ int usb4_usb3_port_allocate_bandwidth(struct tb_port *port, int *upstream_bw,
int *downstream_bw);
int usb4_usb3_port_release_bandwidth(struct tb_port *port, int *upstream_bw,
int *downstream_bw);
+
+/* keep link controller awake during update */
+#define QUIRK_FORCE_POWER_LINK_CONTROLLER BIT(0)
+
+void tb_check_quirks(struct tb_switch *sw);
+
#endif