Home
last modified time | relevance | path

Searched refs:hopid (Results 1 - 11 of 11) sorted by relevance

/kernel/linux/linux-5.10/drivers/thunderbolt/
H A Dpath.c40 int i, ret, hopid; in tb_path_find_dst_port() local
42 hopid = src_hopid; in tb_path_find_dst_port()
48 ret = tb_port_read(port, &hop, TB_CFG_HOPS, 2 * hopid, 2); in tb_path_find_dst_port()
50 tb_port_warn(port, "failed to read path at %d\n", hopid); in tb_path_find_dst_port()
58 hopid = hop.next_hop; in tb_path_find_dst_port()
62 return out_port && hopid == dst_hopid ? out_port : NULL; in tb_path_find_dst_port()
H A Ddebugfs.c531 static int path_show_one(struct tb_port *port, struct seq_file *s, int hopid) in path_show_one() argument
536 ret = tb_port_read(port, data, TB_CFG_HOPS, hopid * PATH_LEN, in path_show_one()
539 seq_printf(s, "0x%04x <not accessible>\n", hopid * PATH_LEN); in path_show_one()
545 hopid * PATH_LEN + i, i, hopid, data[i]); in path_show_one()
H A Dtb.h847 int tb_port_alloc_in_hopid(struct tb_port *port, int hopid, int max_hopid);
848 void tb_port_release_in_hopid(struct tb_port *port, int hopid);
849 int tb_port_alloc_out_hopid(struct tb_port *port, int hopid, int max_hopid);
850 void tb_port_release_out_hopid(struct tb_port *port, int hopid);
H A Dswitch.c827 * @hopid: HopID to release
829 void tb_port_release_in_hopid(struct tb_port *port, int hopid) in tb_port_release_in_hopid() argument
831 ida_simple_remove(&port->in_hopids, hopid); in tb_port_release_in_hopid()
837 * @hopid: HopID to release
839 void tb_port_release_out_hopid(struct tb_port *port, int hopid) in tb_port_release_out_hopid() argument
841 ida_simple_remove(&port->out_hopids, hopid); in tb_port_release_out_hopid()
/kernel/linux/linux-6.6/drivers/thunderbolt/
H A Dpath.c40 int i, ret, hopid; in tb_path_find_dst_port() local
42 hopid = src_hopid; in tb_path_find_dst_port()
48 ret = tb_port_read(port, &hop, TB_CFG_HOPS, 2 * hopid, 2); in tb_path_find_dst_port()
50 tb_port_warn(port, "failed to read path at %d\n", hopid); in tb_path_find_dst_port()
58 hopid = hop.next_hop; in tb_path_find_dst_port()
62 return out_port && hopid == dst_hopid ? out_port : NULL; in tb_path_find_dst_port()
H A Dxdomain.c2120 * @hopid: Preferred HopID or %-1 for next available
2127 int tb_xdomain_alloc_in_hopid(struct tb_xdomain *xd, int hopid) in tb_xdomain_alloc_in_hopid() argument
2129 if (hopid < 0) in tb_xdomain_alloc_in_hopid()
2130 hopid = TB_PATH_MIN_HOPID; in tb_xdomain_alloc_in_hopid()
2131 if (hopid < TB_PATH_MIN_HOPID || hopid > xd->local_max_hopid) in tb_xdomain_alloc_in_hopid()
2134 return ida_alloc_range(&xd->in_hopids, hopid, xd->local_max_hopid, in tb_xdomain_alloc_in_hopid()
2142 * @hopid: Preferred HopID or %-1 for next available
2149 int tb_xdomain_alloc_out_hopid(struct tb_xdomain *xd, int hopid) in tb_xdomain_alloc_out_hopid() argument
2151 if (hopid < in tb_xdomain_alloc_out_hopid()
2166 tb_xdomain_release_in_hopid(struct tb_xdomain *xd, int hopid) tb_xdomain_release_in_hopid() argument
2177 tb_xdomain_release_out_hopid(struct tb_xdomain *xd, int hopid) tb_xdomain_release_out_hopid() argument
[all...]
H A Dtb.h1036 int tb_port_alloc_in_hopid(struct tb_port *port, int hopid, int max_hopid);
1037 void tb_port_release_in_hopid(struct tb_port *port, int hopid);
1038 int tb_port_alloc_out_hopid(struct tb_port *port, int hopid, int max_hopid);
1039 void tb_port_release_out_hopid(struct tb_port *port, int hopid);
H A Ddebugfs.c1392 static int path_show_one(struct tb_port *port, struct seq_file *s, int hopid) in path_show_one() argument
1397 ret = tb_port_read(port, data, TB_CFG_HOPS, hopid * PATH_LEN, in path_show_one()
1400 seq_printf(s, "0x%04x <not accessible>\n", hopid * PATH_LEN); in path_show_one()
1406 hopid * PATH_LEN + i, i, hopid, data[i]); in path_show_one()
H A Dswitch.c807 * @hopid: HopID to release
809 void tb_port_release_in_hopid(struct tb_port *port, int hopid) in tb_port_release_in_hopid() argument
811 ida_simple_remove(&port->in_hopids, hopid); in tb_port_release_in_hopid()
817 * @hopid: HopID to release
819 void tb_port_release_out_hopid(struct tb_port *port, int hopid) in tb_port_release_out_hopid() argument
821 ida_simple_remove(&port->out_hopids, hopid); in tb_port_release_out_hopid()
/kernel/linux/linux-6.6/include/linux/
H A Dthunderbolt.h276 int tb_xdomain_alloc_in_hopid(struct tb_xdomain *xd, int hopid);
277 void tb_xdomain_release_in_hopid(struct tb_xdomain *xd, int hopid);
278 int tb_xdomain_alloc_out_hopid(struct tb_xdomain *xd, int hopid);
279 void tb_xdomain_release_out_hopid(struct tb_xdomain *xd, int hopid);
/kernel/linux/linux-6.6/drivers/net/thunderbolt/
H A Dmain.c923 int hopid; in tbnet_open() local
935 hopid = tb_xdomain_alloc_out_hopid(xd, -1); in tbnet_open()
936 if (hopid < 0) { in tbnet_open()
940 return hopid; in tbnet_open()
942 net->local_transmit_path = hopid; in tbnet_open()
957 tb_xdomain_release_out_hopid(xd, hopid); in tbnet_open()

Completed in 21 milliseconds