Home
last modified time | relevance | path

Searched refs:hopid (Results 1 – 5 of 5) sorted by relevance

/linux/drivers/thunderbolt/
H A Dxdomain.c2189 int tb_xdomain_alloc_in_hopid(struct tb_xdomain *xd, int hopid) in tb_xdomain_alloc_in_hopid() argument
2191 if (hopid < 0) in tb_xdomain_alloc_in_hopid()
2192 hopid = TB_PATH_MIN_HOPID; in tb_xdomain_alloc_in_hopid()
2193 if (hopid < TB_PATH_MIN_HOPID || hopid > xd->local_max_hopid) in tb_xdomain_alloc_in_hopid()
2196 return ida_alloc_range(&xd->in_hopids, hopid, xd->local_max_hopid, in tb_xdomain_alloc_in_hopid()
2215 int tb_xdomain_alloc_out_hopid(struct tb_xdomain *xd, int hopid) in tb_xdomain_alloc_out_hopid() argument
2217 if (hopid < 0) in tb_xdomain_alloc_out_hopid()
2218 hopid = TB_PATH_MIN_HOPID; in tb_xdomain_alloc_out_hopid()
2219 if (hopid < TB_PATH_MIN_HOPID || hopid > xd->remote_max_hopid) in tb_xdomain_alloc_out_hopid()
2222 return ida_alloc_range(&xd->out_hopids, hopid, xd->remote_max_hopid, in tb_xdomain_alloc_out_hopid()
[all …]
H A Dtb.h1104 int tb_port_alloc_in_hopid(struct tb_port *port, int hopid, int max_hopid);
1105 void tb_port_release_in_hopid(struct tb_port *port, int hopid);
1106 int tb_port_alloc_out_hopid(struct tb_port *port, int hopid, int max_hopid);
1107 void tb_port_release_out_hopid(struct tb_port *port, int hopid);
H A Ddebugfs.c2233 static int path_show_one(struct tb_port *port, struct seq_file *s, int hopid) in path_show_one() argument
2238 ret = tb_port_read(port, data, TB_CFG_HOPS, hopid * PATH_LEN, in path_show_one()
2241 seq_printf(s, "0x%04x <not accessible>\n", hopid * PATH_LEN); in path_show_one()
2247 hopid * PATH_LEN + i, i, hopid, data[i]); in path_show_one()
H A Dswitch.c826 void tb_port_release_in_hopid(struct tb_port *port, int hopid) in tb_port_release_in_hopid() argument
828 ida_free(&port->in_hopids, hopid); in tb_port_release_in_hopid()
836 void tb_port_release_out_hopid(struct tb_port *port, int hopid) in tb_port_release_out_hopid() argument
838 ida_free(&port->out_hopids, hopid); in tb_port_release_out_hopid()
/linux/drivers/net/thunderbolt/
H A Dmain.c923 int hopid; in tbnet_open() local
939 hopid = tb_xdomain_alloc_out_hopid(xd, -1); in tbnet_open()
940 if (hopid < 0) { in tbnet_open()
944 return hopid; in tbnet_open()
946 net->local_transmit_path = hopid; in tbnet_open()
956 tb_xdomain_release_out_hopid(xd, hopid); in tbnet_open()