summaryrefslogtreecommitdiffstats
path: root/drivers/thunderbolt/nhi.c
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2017-02-19 15:57:27 +0100
committerMika Westerberg <mika.westerberg@linux.intel.com>2019-04-18 10:18:52 +0200
commit0b2863ac3cfdea2e0e27f9e722d178efb367e4db (patch)
tree794889b3c010be2d8d7070761953adb81369622f /drivers/thunderbolt/nhi.c
parentthunderbolt: Generalize tunnel creation functionality (diff)
downloadlinux-0b2863ac3cfdea2e0e27f9e722d178efb367e4db.tar.xz
linux-0b2863ac3cfdea2e0e27f9e722d178efb367e4db.zip
thunderbolt: Add functions for allocating and releasing HopIDs
Each port has a separate path configuration space that is used for finding the next hop (switch) in the path. HopID is an index to this configuration space. HopIDs 0 - 7 are reserved by the protocol. In order to get next available HopID for each direction we provide two pairs of helper functions that can be used to allocate and release HopIDs for a given port. While there remove obsolete TODO comment. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/nhi.c')
-rw-r--r--drivers/thunderbolt/nhi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c
index 9aa44f9762a3..cac1ead5e302 100644
--- a/drivers/thunderbolt/nhi.c
+++ b/drivers/thunderbolt/nhi.c
@@ -27,8 +27,7 @@
* use this ring for anything else.
*/
#define RING_E2E_UNUSED_HOPID 2
-/* HopIDs 0-7 are reserved by the Thunderbolt protocol */
-#define RING_FIRST_USABLE_HOPID 8
+#define RING_FIRST_USABLE_HOPID TB_PATH_MIN_HOPID
/*
* Minimal number of vectors when we use MSI-X. Two for control channel