diff options
author | Sanath S <Sanath.S@amd.com> | 2024-01-13 12:42:23 +0300 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2024-01-22 14:21:06 +0300 |
commit | b35c1d7b11da8c08b14147bbe87c2c92f7a83f8b (patch) | |
tree | f07f396edfc673f9a00b48f0cf662538642a7895 /drivers/thunderbolt/path.c | |
parent | 01da6b99d49f60b1edead44e33569b1a2e9f49b7 (diff) | |
download | linux-b35c1d7b11da8c08b14147bbe87c2c92f7a83f8b.tar.xz |
thunderbolt: Introduce tb_path_deactivate_hop()
This function can be used to clear path config space of an adapter. Make
it available for other files in this driver.
Signed-off-by: Sanath S <Sanath.S@amd.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/path.c')
-rw-r--r-- | drivers/thunderbolt/path.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/thunderbolt/path.c b/drivers/thunderbolt/path.c index 091a81bbdbdc..f760e54cd9bd 100644 --- a/drivers/thunderbolt/path.c +++ b/drivers/thunderbolt/path.c @@ -446,6 +446,19 @@ static int __tb_path_deactivate_hop(struct tb_port *port, int hop_index, return -ETIMEDOUT; } +/** + * tb_path_deactivate_hop() - Deactivate one path in path config space + * @port: Lane or protocol adapter + * @hop_index: HopID of the path to be cleared + * + * This deactivates or clears a single path config space entry at + * @hop_index. Returns %0 in success and negative errno otherwise. + */ +int tb_path_deactivate_hop(struct tb_port *port, int hop_index) +{ + return __tb_path_deactivate_hop(port, hop_index, true); +} + static void __tb_path_deactivate_hops(struct tb_path *path, int first_hop) { int i, res; |