]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
thunderbolt: NHI can use HopIDs 1-7
authorMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 1 Jun 2020 09:47:07 +0000 (12:47 +0300)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 22 Jun 2020 16:58:06 +0000 (19:58 +0300)
NHI (The host interface adapter) is allowed to use HopIDs 1-7 as well so
relax the restriction in tb_port_alloc_hopid() to support this.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/thunderbolt/switch.c

index d7d60cd9226f7e7a6bd7a4a7c3d0c99d8460c332..95b75a712ade27a907ac5db7ed30b90efe7c8f51 100644 (file)
@@ -789,8 +789,11 @@ static int tb_port_alloc_hopid(struct tb_port *port, bool in, int min_hopid,
                ida = &port->out_hopids;
        }
 
-       /* HopIDs 0-7 are reserved */
-       if (min_hopid < TB_PATH_MIN_HOPID)
+       /*
+        * NHI can use HopIDs 1-max for other adapters HopIDs 0-7 are
+        * reserved.
+        */
+       if (port->config.type != TB_TYPE_NHI && min_hopid < TB_PATH_MIN_HOPID)
                min_hopid = TB_PATH_MIN_HOPID;
 
        if (max_hopid < 0 || max_hopid > port_max_hopid)