From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: linux-kernel@vger.kernel.org
Cc: Michael Jamet <michael.jamet@intel.com>,
Yehezkel Bernat <YehezkelShB@gmail.com>,
Andreas Noever <andreas.noever@gmail.com>,
Lukas Wunner <lukas@wunner.de>,
"David S . Miller" <davem@davemloft.net>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Christian Kellner <ckellner@redhat.com>,
Mario.Limonciello@dell.com, Joe Perches <joe@perches.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
netdev@vger.kernel.org
Subject: [PATCH v4 15/36] thunderbolt: Generalize tunnel creation functionality
Date: Wed, 10 Apr 2019 16:36:32 +0300 [thread overview]
Message-ID: <20190410133653.88061-16-mika.westerberg@linux.intel.com> (raw)
In-Reply-To: <20190410133653.88061-1-mika.westerberg@linux.intel.com>
To be able to tunnel non-PCIe traffic, separate tunnel functionality
into generic and PCIe specific parts. Rename struct tb_pci_tunnel to
tb_tunnel, and make it hold an array of paths instead of just two.
Update all the tunneling functions to take this structure as parameter.
We also move tb_pci_port_active() to switch.c (and rename it) where we
will be keeping all port and switch related functions.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
drivers/thunderbolt/switch.c | 13 ++
drivers/thunderbolt/tb.c | 30 ++--
drivers/thunderbolt/tb.h | 2 +
drivers/thunderbolt/tb_regs.h | 4 +
drivers/thunderbolt/tunnel.c | 298 ++++++++++++++++++++--------------
drivers/thunderbolt/tunnel.h | 38 +++--
6 files changed, 235 insertions(+), 150 deletions(-)
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index 9756e6279dc9..b132439618da 100644
--- a/drivers/thunderbolt/switch.c
+++ b/drivers/thunderbolt/switch.c
@@ -599,6 +599,19 @@ static int tb_init_port(struct tb_port *port)
}
+/**
+ * tb_pci_port_enable() - Enable PCIe adapter port
+ * @port: PCIe port to enable
+ * @enable: Enable/disable the PCIe adapter
+ */
+int tb_pci_port_enable(struct tb_port *port, bool enable)
+{
+ u32 word = enable ? TB_PCI_EN : 0x0;
+ if (!port->cap_adap)
+ return -ENXIO;
+ return tb_port_write(port, &word, TB_CFG_PORT, port->cap_adap, 1);
+}
+
/* switch utility functions */
static void tb_dump_switch(struct tb *tb, struct tb_regs_switch_header *sw)
diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c
index 8de43a2ab205..36dad0a00ac2 100644
--- a/drivers/thunderbolt/tb.c
+++ b/drivers/thunderbolt/tb.c
@@ -91,14 +91,14 @@ static void tb_scan_port(struct tb_port *port)
static void tb_free_invalid_tunnels(struct tb *tb)
{
struct tb_cm *tcm = tb_priv(tb);
- struct tb_pci_tunnel *tunnel;
- struct tb_pci_tunnel *n;
+ struct tb_tunnel *tunnel;
+ struct tb_tunnel *n;
list_for_each_entry_safe(tunnel, n, &tcm->tunnel_list, list) {
- if (tb_pci_is_invalid(tunnel)) {
- tb_pci_deactivate(tunnel);
+ if (tb_tunnel_is_invalid(tunnel)) {
+ tb_tunnel_deactivate(tunnel);
list_del(&tunnel->list);
- tb_pci_free(tunnel);
+ tb_tunnel_free(tunnel);
}
}
}
@@ -178,7 +178,7 @@ static void tb_activate_pcie_devices(struct tb *tb)
struct tb_switch *sw;
struct tb_port *up_port;
struct tb_port *down_port;
- struct tb_pci_tunnel *tunnel;
+ struct tb_tunnel *tunnel;
struct tb_cm *tcm = tb_priv(tb);
/* scan for pcie devices at depth 1*/
@@ -214,17 +214,17 @@ static void tb_activate_pcie_devices(struct tb *tb)
"All PCIe down ports are occupied, aborting\n");
continue;
}
- tunnel = tb_pci_alloc(tb, up_port, down_port);
+ tunnel = tb_tunnel_alloc_pci(tb, up_port, down_port);
if (!tunnel) {
tb_port_info(up_port,
"PCIe tunnel allocation failed, aborting\n");
continue;
}
- if (tb_pci_activate(tunnel)) {
+ if (tb_tunnel_activate(tunnel)) {
tb_port_info(up_port,
"PCIe tunnel activation failed, aborting\n");
- tb_pci_free(tunnel);
+ tb_tunnel_free(tunnel);
continue;
}
@@ -353,13 +353,13 @@ static void tb_handle_event(struct tb *tb, enum tb_cfg_pkg_type type,
static void tb_stop(struct tb *tb)
{
struct tb_cm *tcm = tb_priv(tb);
- struct tb_pci_tunnel *tunnel;
- struct tb_pci_tunnel *n;
+ struct tb_tunnel *tunnel;
+ struct tb_tunnel *n;
/* tunnels are only present after everything has been initialized */
list_for_each_entry_safe(tunnel, n, &tcm->tunnel_list, list) {
- tb_pci_deactivate(tunnel);
- tb_pci_free(tunnel);
+ tb_tunnel_deactivate(tunnel);
+ tb_tunnel_free(tunnel);
}
tb_switch_remove(tb->root_switch);
tcm->hotplug_active = false; /* signal tb_handle_hotplug to quit */
@@ -418,7 +418,7 @@ static int tb_suspend_noirq(struct tb *tb)
static int tb_resume_noirq(struct tb *tb)
{
struct tb_cm *tcm = tb_priv(tb);
- struct tb_pci_tunnel *tunnel, *n;
+ struct tb_tunnel *tunnel, *n;
tb_dbg(tb, "resuming...\n");
@@ -429,7 +429,7 @@ static int tb_resume_noirq(struct tb *tb)
tb_free_invalid_tunnels(tb);
tb_free_unplugged_children(tb->root_switch);
list_for_each_entry_safe(tunnel, n, &tcm->tunnel_list, list)
- tb_pci_restart(tunnel);
+ tb_tunnel_restart(tunnel);
if (!list_empty(&tcm->tunnel_list)) {
/*
* the pcie links need some time to get going.
diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h
index b4d7c4d408bd..d1f8e9722f33 100644
--- a/drivers/thunderbolt/tb.h
+++ b/drivers/thunderbolt/tb.h
@@ -457,6 +457,8 @@ int tb_port_clear_counter(struct tb_port *port, int counter);
int tb_switch_find_vse_cap(struct tb_switch *sw, enum tb_switch_vse_cap vsec);
int tb_port_find_cap(struct tb_port *port, enum tb_port_cap cap);
+int tb_pci_port_enable(struct tb_port *port, bool enable);
+
struct tb_path *tb_path_alloc(struct tb *tb, int num_hops);
void tb_path_free(struct tb_path *path);
int tb_path_activate(struct tb_path *path);
diff --git a/drivers/thunderbolt/tb_regs.h b/drivers/thunderbolt/tb_regs.h
index 82ac4ec8757f..75e935acade5 100644
--- a/drivers/thunderbolt/tb_regs.h
+++ b/drivers/thunderbolt/tb_regs.h
@@ -211,6 +211,10 @@ struct tb_regs_port_header {
} __packed;
+/* PCIe adapter registers */
+
+#define TB_PCI_EN BIT(31)
+
/* Hop register from TB_CFG_HOPS. 8 byte per entry. */
struct tb_regs_hop {
/* DWORD 0 */
diff --git a/drivers/thunderbolt/tunnel.c b/drivers/thunderbolt/tunnel.c
index 1e470564e99d..20ce28276f7a 100644
--- a/drivers/thunderbolt/tunnel.c
+++ b/drivers/thunderbolt/tunnel.c
@@ -1,8 +1,9 @@
// SPDX-License-Identifier: GPL-2.0
/*
- * Thunderbolt Cactus Ridge driver - Tunneling support
+ * Thunderbolt driver - Tunneling support
*
* Copyright (c) 2014 Andreas Noever <andreas.noever@gmail.com>
+ * Copyright (C) 2019, Intel Corporation
*/
#include <linux/slab.h>
@@ -11,14 +12,17 @@
#include "tunnel.h"
#include "tb.h"
+#define TB_PCI_PATH_DOWN 0
+#define TB_PCI_PATH_UP 1
+
#define __TB_TUNNEL_PRINT(level, tunnel, fmt, arg...) \
do { \
- struct tb_pci_tunnel *__tunnel = (tunnel); \
+ struct tb_tunnel *__tunnel = (tunnel); \
level(__tunnel->tb, "%llx:%x <-> %llx:%x (PCI): " fmt, \
- tb_route(__tunnel->down_port->sw), \
- __tunnel->down_port->port, \
- tb_route(__tunnel->up_port->sw), \
- __tunnel->up_port->port, \
+ tb_route(__tunnel->src_port->sw), \
+ __tunnel->src_port->port, \
+ tb_route(__tunnel->dst_port->sw), \
+ __tunnel->dst_port->port, \
## arg); \
} while (0)
@@ -29,6 +33,38 @@
#define tb_tunnel_info(tunnel, fmt, arg...) \
__TB_TUNNEL_PRINT(tb_info, tunnel, fmt, ##arg)
+static struct tb_tunnel *tb_tunnel_alloc(struct tb *tb, size_t npaths)
+{
+ struct tb_tunnel *tunnel;
+
+ tunnel = kzalloc(sizeof(*tunnel), GFP_KERNEL);
+ if (!tunnel)
+ return NULL;
+
+ tunnel->paths = kcalloc(npaths, sizeof(tunnel->paths[0]), GFP_KERNEL);
+ if (!tunnel->paths) {
+ tb_tunnel_free(tunnel);
+ return NULL;
+ }
+
+ INIT_LIST_HEAD(&tunnel->list);
+ tunnel->tb = tb;
+ tunnel->npaths = npaths;
+
+ return tunnel;
+}
+
+static int tb_pci_activate(struct tb_tunnel *tunnel, bool activate)
+{
+ int res;
+
+ res = tb_pci_port_enable(tunnel->src_port, activate);
+ if (res)
+ return res;
+
+ return tb_pci_port_enable(tunnel->dst_port, activate);
+}
+
static void tb_pci_init_path(struct tb_path *path)
{
path->egress_fc_enable = TB_PATH_SOURCE | TB_PATH_INTERNAL;
@@ -42,7 +78,10 @@ static void tb_pci_init_path(struct tb_path *path)
}
/**
- * tb_pci_alloc() - allocate a pci tunnel
+ * tb_tunnel_alloc_pci() - allocate a pci tunnel
+ * @tb: Pointer to the domain structure
+ * @up: PCIe upstream adapter port
+ * @down: PCIe downstream adapter port
*
* Allocate a PCI tunnel. The ports must be of type TB_TYPE_PCIE_UP and
* TB_TYPE_PCIE_DOWN.
@@ -54,170 +93,185 @@ static void tb_pci_init_path(struct tb_path *path)
* my thunderbolt devices). Therefore at most ONE path per device may be
* activated.
*
- * Return: Returns a tb_pci_tunnel on success or NULL on failure.
+ * Return: Returns a tb_tunnel on success or NULL on failure.
*/
-struct tb_pci_tunnel *tb_pci_alloc(struct tb *tb, struct tb_port *up,
- struct tb_port *down)
+struct tb_tunnel *tb_tunnel_alloc_pci(struct tb *tb, struct tb_port *up,
+ struct tb_port *down)
{
- struct tb_pci_tunnel *tunnel = kzalloc(sizeof(*tunnel), GFP_KERNEL);
+ struct tb_path *path_to_up;
+ struct tb_path *path_to_down;
+ struct tb_tunnel *tunnel;
+
+ tunnel = tb_tunnel_alloc(tb, 2);
if (!tunnel)
- goto err;
- tunnel->tb = tb;
- tunnel->down_port = down;
- tunnel->up_port = up;
- INIT_LIST_HEAD(&tunnel->list);
- tunnel->path_to_up = tb_path_alloc(up->sw->tb, 2);
- if (!tunnel->path_to_up)
- goto err;
- tunnel->path_to_down = tb_path_alloc(up->sw->tb, 2);
- if (!tunnel->path_to_down)
- goto err;
- tb_pci_init_path(tunnel->path_to_up);
- tb_pci_init_path(tunnel->path_to_down);
-
- tunnel->path_to_up->hops[0].in_port = down;
- tunnel->path_to_up->hops[0].in_hop_index = 8;
- tunnel->path_to_up->hops[0].in_counter_index = -1;
- tunnel->path_to_up->hops[0].out_port = tb_upstream_port(up->sw)->remote;
- tunnel->path_to_up->hops[0].next_hop_index = 8;
-
- tunnel->path_to_up->hops[1].in_port = tb_upstream_port(up->sw);
- tunnel->path_to_up->hops[1].in_hop_index = 8;
- tunnel->path_to_up->hops[1].in_counter_index = -1;
- tunnel->path_to_up->hops[1].out_port = up;
- tunnel->path_to_up->hops[1].next_hop_index = 8;
-
- tunnel->path_to_down->hops[0].in_port = up;
- tunnel->path_to_down->hops[0].in_hop_index = 8;
- tunnel->path_to_down->hops[0].in_counter_index = -1;
- tunnel->path_to_down->hops[0].out_port = tb_upstream_port(up->sw);
- tunnel->path_to_down->hops[0].next_hop_index = 8;
-
- tunnel->path_to_down->hops[1].in_port =
- tb_upstream_port(up->sw)->remote;
- tunnel->path_to_down->hops[1].in_hop_index = 8;
- tunnel->path_to_down->hops[1].in_counter_index = -1;
- tunnel->path_to_down->hops[1].out_port = down;
- tunnel->path_to_down->hops[1].next_hop_index = 8;
- return tunnel;
+ return NULL;
-err:
- if (tunnel) {
- if (tunnel->path_to_down)
- tb_path_free(tunnel->path_to_down);
- if (tunnel->path_to_up)
- tb_path_free(tunnel->path_to_up);
- kfree(tunnel);
+ tunnel->activate = tb_pci_activate;
+ tunnel->src_port = down;
+ tunnel->dst_port = up;
+
+ path_to_up = tb_path_alloc(tb, 2);
+ if (!path_to_up) {
+ tb_tunnel_free(tunnel);
+ return NULL;
}
- return NULL;
+ tunnel->paths[TB_PCI_PATH_UP] = path_to_up;
+
+ path_to_down = tb_path_alloc(tb, 2);
+ if (!path_to_down) {
+ tb_tunnel_free(tunnel);
+ return NULL;
+ }
+ tunnel->paths[TB_PCI_PATH_DOWN] = path_to_down;
+
+ tb_pci_init_path(path_to_up);
+ tb_pci_init_path(path_to_down);
+
+ path_to_up->hops[0].in_port = down;
+ path_to_up->hops[0].in_hop_index = 8;
+ path_to_up->hops[0].in_counter_index = -1;
+ path_to_up->hops[0].out_port = tb_upstream_port(up->sw)->remote;
+ path_to_up->hops[0].next_hop_index = 8;
+
+ path_to_up->hops[1].in_port = tb_upstream_port(up->sw);
+ path_to_up->hops[1].in_hop_index = 8;
+ path_to_up->hops[1].in_counter_index = -1;
+ path_to_up->hops[1].out_port = up;
+ path_to_up->hops[1].next_hop_index = 8;
+
+ path_to_down->hops[0].in_port = up;
+ path_to_down->hops[0].in_hop_index = 8;
+ path_to_down->hops[0].in_counter_index = -1;
+ path_to_down->hops[0].out_port = tb_upstream_port(up->sw);
+ path_to_down->hops[0].next_hop_index = 8;
+
+ path_to_down->hops[1].in_port = tb_upstream_port(up->sw)->remote;
+ path_to_down->hops[1].in_hop_index = 8;
+ path_to_down->hops[1].in_counter_index = -1;
+ path_to_down->hops[1].out_port = down;
+ path_to_down->hops[1].next_hop_index = 8;
+
+ return tunnel;
}
/**
- * tb_pci_free() - free a tunnel
+ * tb_tunnel_free() - free a tunnel
+ * @tunnel: Tunnel to be freed
*
* The tunnel must have been deactivated.
*/
-void tb_pci_free(struct tb_pci_tunnel *tunnel)
+void tb_tunnel_free(struct tb_tunnel *tunnel)
{
- if (tunnel->path_to_up->activated || tunnel->path_to_down->activated) {
- tb_tunnel_WARN(tunnel, "trying to free an activated tunnel\n");
+ int i;
+
+ if (!tunnel)
return;
+
+ for (i = 0; i < tunnel->npaths; i++) {
+ if (tunnel->paths[i] && tunnel->paths[i]->activated) {
+ tb_tunnel_WARN(tunnel,
+ "trying to free an activated tunnel\n");
+ return;
+ }
}
- tb_path_free(tunnel->path_to_up);
- tb_path_free(tunnel->path_to_down);
+
+ for (i = 0; i < tunnel->npaths; i++) {
+ if (tunnel->paths[i])
+ tb_path_free(tunnel->paths[i]);
+ }
+
+ kfree(tunnel->paths);
kfree(tunnel);
}
/**
- * tb_pci_is_invalid - check whether an activated path is still valid
+ * tb_tunnel_is_invalid - check whether an activated path is still valid
+ * @tunnel: Tunnel to check
*/
-bool tb_pci_is_invalid(struct tb_pci_tunnel *tunnel)
+bool tb_tunnel_is_invalid(struct tb_tunnel *tunnel)
{
- WARN_ON(!tunnel->path_to_up->activated);
- WARN_ON(!tunnel->path_to_down->activated);
+ int i;
- return tb_path_is_invalid(tunnel->path_to_up)
- || tb_path_is_invalid(tunnel->path_to_down);
-}
+ for (i = 0; i < tunnel->npaths; i++) {
+ WARN_ON(!tunnel->paths[i]->activated);
+ if (tb_path_is_invalid(tunnel->paths[i]))
+ return true;
+ }
-/**
- * tb_pci_port_active() - activate/deactivate PCI capability
- *
- * Return: Returns 0 on success or an error code on failure.
- */
-static int tb_pci_port_active(struct tb_port *port, bool active)
-{
- u32 word = active ? 0x80000000 : 0x0;
- if (!port->cap_adap)
- return -ENXIO;
- return tb_port_write(port, &word, TB_CFG_PORT, port->cap_adap, 1);
+ return false;
}
/**
- * tb_pci_restart() - activate a tunnel after a hardware reset
+ * tb_tunnel_restart() - activate a tunnel after a hardware reset
+ * @tunnel: Tunnel to restart
+ *
+ * Return: 0 on success and negative errno in case if failure
*/
-int tb_pci_restart(struct tb_pci_tunnel *tunnel)
+int tb_tunnel_restart(struct tb_tunnel *tunnel)
{
- int res;
- tunnel->path_to_up->activated = false;
- tunnel->path_to_down->activated = false;
+ int res, i;
tb_tunnel_info(tunnel, "activating\n");
- res = tb_path_activate(tunnel->path_to_up);
- if (res)
- goto err;
- res = tb_path_activate(tunnel->path_to_down);
- if (res)
- goto err;
+ for (i = 0; i < tunnel->npaths; i++) {
+ tunnel->paths[i]->activated = false;
+ res = tb_path_activate(tunnel->paths[i]);
+ if (res)
+ goto err;
+ }
- res = tb_pci_port_active(tunnel->down_port, true);
- if (res)
- goto err;
+ if (tunnel->activate) {
+ res = tunnel->activate(tunnel, true);
+ if (res)
+ goto err;
+ }
- res = tb_pci_port_active(tunnel->up_port, true);
- if (res)
- goto err;
return 0;
+
err:
tb_tunnel_warn(tunnel, "activation failed\n");
- tb_pci_deactivate(tunnel);
+ tb_tunnel_deactivate(tunnel);
return res;
}
/**
- * tb_pci_activate() - activate a tunnel
+ * tb_tunnel_activate() - activate a tunnel
+ * @tunnel: Tunnel to activate
*
* Return: Returns 0 on success or an error code on failure.
*/
-int tb_pci_activate(struct tb_pci_tunnel *tunnel)
+int tb_tunnel_activate(struct tb_tunnel *tunnel)
{
- if (tunnel->path_to_up->activated || tunnel->path_to_down->activated) {
- tb_tunnel_WARN(tunnel,
- "trying to activate an already activated tunnel\n");
- return -EINVAL;
- }
+ int i;
- return tb_pci_restart(tunnel);
-}
+ tb_tunnel_info(tunnel, "activating\n");
+ for (i = 0; i < tunnel->npaths; i++) {
+ if (tunnel->paths[i]->activated) {
+ tb_tunnel_WARN(tunnel,
+ "trying to activate an already activated tunnel\n");
+ return -EINVAL;
+ }
+ }
+ return tb_tunnel_restart(tunnel);
+}
/**
- * tb_pci_deactivate() - deactivate a tunnel
+ * tb_tunnel_deactivate() - deactivate a tunnel
+ * @tunnel: Tunnel to deactivate
*/
-void tb_pci_deactivate(struct tb_pci_tunnel *tunnel)
+void tb_tunnel_deactivate(struct tb_tunnel *tunnel)
{
+ int i;
+
tb_tunnel_info(tunnel, "deactivating\n");
- /*
- * TODO: enable reset by writing 0x04000000 to TB_CAP_PCIE + 1 on up
- * port. Seems to have no effect?
- */
- tb_pci_port_active(tunnel->up_port, false);
- tb_pci_port_active(tunnel->down_port, false);
- if (tunnel->path_to_down->activated)
- tb_path_deactivate(tunnel->path_to_down);
- if (tunnel->path_to_up->activated)
- tb_path_deactivate(tunnel->path_to_up);
-}
+ if (tunnel->activate)
+ tunnel->activate(tunnel, false);
+
+ for (i = 0; i < tunnel->npaths; i++) {
+ if (tunnel->paths[i]->activated)
+ tb_path_deactivate(tunnel->paths[i]);
+ }
+}
diff --git a/drivers/thunderbolt/tunnel.h b/drivers/thunderbolt/tunnel.h
index dff0f27d6ab5..b4e992165e56 100644
--- a/drivers/thunderbolt/tunnel.h
+++ b/drivers/thunderbolt/tunnel.h
@@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Thunderbolt Cactus Ridge driver - Tunneling support
+ * Thunderbolt driver - Tunneling support
*
* Copyright (c) 2014 Andreas Noever <andreas.noever@gmail.com>
+ * Copyright (C) 2019, Intel Corporation
*/
#ifndef TB_TUNNEL_H_
@@ -10,22 +11,33 @@
#include "tb.h"
-struct tb_pci_tunnel {
+/**
+ * struct tb_tunnel - Tunnel between two ports
+ * @tb: Pointer to the domain
+ * @src_port: Source port of the tunnel
+ * @dst_port: Destination port of the tunnel
+ * @paths: All paths required by the tunnel
+ * @npaths: Number of paths in @paths
+ * @activate: Optional tunnel specific activation/deactivation
+ * @list: Tunnels are linked using this field
+ */
+struct tb_tunnel {
struct tb *tb;
- struct tb_port *up_port;
- struct tb_port *down_port;
- struct tb_path *path_to_up;
- struct tb_path *path_to_down;
+ struct tb_port *src_port;
+ struct tb_port *dst_port;
+ struct tb_path **paths;
+ size_t npaths;
+ int (*activate)(struct tb_tunnel *tunnel, bool activate);
struct list_head list;
};
-struct tb_pci_tunnel *tb_pci_alloc(struct tb *tb, struct tb_port *up,
- struct tb_port *down);
-void tb_pci_free(struct tb_pci_tunnel *tunnel);
-int tb_pci_activate(struct tb_pci_tunnel *tunnel);
-int tb_pci_restart(struct tb_pci_tunnel *tunnel);
-void tb_pci_deactivate(struct tb_pci_tunnel *tunnel);
-bool tb_pci_is_invalid(struct tb_pci_tunnel *tunnel);
+struct tb_tunnel *tb_tunnel_alloc_pci(struct tb *tb, struct tb_port *up,
+ struct tb_port *down);
+void tb_tunnel_free(struct tb_tunnel *tunnel);
+int tb_tunnel_activate(struct tb_tunnel *tunnel);
+int tb_tunnel_restart(struct tb_tunnel *tunnel);
+void tb_tunnel_deactivate(struct tb_tunnel *tunnel);
+bool tb_tunnel_is_invalid(struct tb_tunnel *tunnel);
#endif
--
2.20.1
next prev parent reply other threads:[~2019-04-10 13:37 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-10 13:36 [PATCH v4 00/36] thunderbolt: Software connection manager improvements Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 01/36] net: thunderbolt: Unregister ThunderboltIP protocol handler when suspending Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 02/36] thunderbolt: Remove unused work field in struct tb_switch Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 03/36] thunderbolt: Drop duplicated get_switch_at_route() Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 04/36] thunderbolt: Block reads and writes if switch is unplugged Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 06/36] thunderbolt: Do not allocate switch if depth is greater than 6 Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 07/36] thunderbolt: Enable TMU access when accessing port space on legacy devices Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 08/36] thunderbolt: Add dummy read after port capability list walk on Light Ridge Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 09/36] thunderbolt: Move LC specific functionality into a separate file Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 10/36] thunderbolt: Configure lanes when switch is initialized Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 11/36] thunderbolt: Set sleep bit when suspending switch Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 12/36] thunderbolt: Properly disable path Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 13/36] thunderbolt: Cache adapter specific capability offset into struct port Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 14/36] thunderbolt: Rename tunnel_pci to tunnel Mika Westerberg
2019-04-10 13:36 ` Mika Westerberg [this message]
2019-04-10 13:36 ` [PATCH v4 16/36] thunderbolt: Add functions for allocating and releasing HopIDs Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 17/36] thunderbolt: Assign remote for both ports in case of dual link Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 18/36] thunderbolt: Add helper function to iterate from one port to another Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 19/36] thunderbolt: Extend tunnel creation to more than 2 adjacent switches Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 20/36] thunderbolt: Deactivate all paths before restarting them Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 21/36] thunderbolt: Discover preboot PCIe paths the boot firmware established Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 22/36] thunderbolt: Add support for full PCIe daisy chains Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 23/36] thunderbolt: Scan only valid NULL adapter ports in hotplug Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 24/36] thunderbolt: Generalize port finding routines to support all port types Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 25/36] thunderbolt: Rework NFC credits handling Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 26/36] thunderbolt: Add support for Display Port tunnels Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 27/36] thunderbolt: Do not tear down tunnels when driver is unloaded Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 28/36] thunderbolt: Run tb_xdp_handle_request() in system workqueue Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 29/36] thunderbolt: Add XDomain UUID exchange support Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 30/36] thunderbolt: Add support for DMA tunnels Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 31/36] thunderbolt: Make tb_switch_alloc() return ERR_PTR() Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 32/36] thunderbolt: Add support for XDomain connections Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 33/36] thunderbolt: Make __TB_[SW|PORT]_PRINT take const parameters Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 34/36] thunderbolt: Make rest of the logging to happen at debug level Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 35/36] thunderbolt: Reword output of tb_dump_hop() Mika Westerberg
2019-04-10 13:36 ` [PATCH v4 36/36] thunderbolt: Start firmware on Titan Ridge Apple systems Mika Westerberg
2019-04-18 8:26 ` [PATCH v4 00/36] thunderbolt: Software connection manager improvements Mika Westerberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190410133653.88061-16-mika.westerberg@linux.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=Mario.Limonciello@dell.com \
--cc=YehezkelShB@gmail.com \
--cc=andreas.noever@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=ckellner@redhat.com \
--cc=davem@davemloft.net \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=michael.jamet@intel.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.