summaryrefslogtreecommitdiff
path: root/drivers/thunderbolt
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2020-10-07 17:08:47 +0300
committerMika Westerberg <mika.westerberg@linux.intel.com>2020-11-11 10:20:15 +0300
commit81816f5048bac5f4b202ed1443e9788dfc31a18c (patch)
tree7fda4ad42d485cab055df7753c0dda5b2cd92bb7 /drivers/thunderbolt
parentf8394f232b1eab649ce2df5c5f15b0e528c92091 (diff)
thunderbolt: Do not clear USB4 router protocol adapter IFC and ISE bits
These fields are marked as vendor defined in the USB4 spec and should not be modified by the software, so only clear them when we are dealing with pre-USB4 hardware. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Yehezkel Bernat <YehezkelShB@gmail.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/thunderbolt')
-rw-r--r--drivers/thunderbolt/path.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/thunderbolt/path.c b/drivers/thunderbolt/path.c
index 03e7b714deab..7c2c45d9ba4a 100644
--- a/drivers/thunderbolt/path.c
+++ b/drivers/thunderbolt/path.c
@@ -406,10 +406,17 @@ static int __tb_path_deactivate_hop(struct tb_port *port, int hop_index,
if (!hop.pending) {
if (clear_fc) {
- /* Clear flow control */
- hop.ingress_fc = 0;
+ /*
+ * Clear flow control. Protocol adapters
+ * IFC and ISE bits are vendor defined
+ * in the USB4 spec so we clear them
+ * only for pre-USB4 adapters.
+ */
+ if (!tb_switch_is_usb4(port->sw)) {
+ hop.ingress_fc = 0;
+ hop.ingress_shared_buffer = 0;
+ }
hop.egress_fc = 0;
- hop.ingress_shared_buffer = 0;
hop.egress_shared_buffer = 0;
return tb_port_write(port, &hop, TB_CFG_HOPS,