Lines Matching refs:xd

560 static int icm_fr_approve_xdomain_paths(struct tb *tb, struct tb_xdomain *xd,
570 request.link_info = xd->depth << ICM_LINK_INFO_DEPTH_SHIFT | xd->link;
571 memcpy(&request.remote_uuid, xd->remote_uuid, sizeof(*xd->remote_uuid));
590 static int icm_fr_disconnect_xdomain_paths(struct tb *tb, struct tb_xdomain *xd,
597 phy_port = tb_phy_port_from_link(xd->link);
683 struct tb_xdomain *xd;
687 xd = tb_xdomain_alloc(sw->tb, &sw->dev, route, local_uuid, remote_uuid);
688 if (!xd)
691 xd->link = link;
692 xd->depth = depth;
694 tb_port_at(route, sw)->xdomain = xd;
696 tb_xdomain_add(xd);
703 static void update_xdomain(struct tb_xdomain *xd, u64 route, u8 link)
705 xd->link = link;
706 xd->route = route;
707 xd->is_unplugged = false;
710 static void remove_xdomain(struct tb_xdomain *xd)
714 sw = tb_to_switch(xd->dev.parent);
715 tb_port_at(xd->route, sw)->xdomain = NULL;
716 tb_xdomain_remove(xd);
729 struct tb_xdomain *xd;
820 xd = tb_xdomain_find_by_link_depth(tb, link, depth);
821 if (xd) {
822 remove_xdomain(xd);
823 tb_xdomain_put(xd);
906 struct tb_xdomain *xd;
922 xd = tb_xdomain_find_by_uuid(tb, &pkg->remote_uuid);
923 if (xd) {
926 xd_phy_port = phy_port_from_route(xd->route, xd->depth);
929 if (xd->depth == depth && xd_phy_port == phy_port) {
930 update_xdomain(xd, route, link);
931 tb_xdomain_put(xd);
941 remove_xdomain(xd);
942 tb_xdomain_put(xd);
950 xd = tb_xdomain_find_by_link_depth(tb, link, depth);
951 if (!xd) {
956 xd = tb_xdomain_find_by_link_depth(tb, dual_link,
959 if (xd) {
960 remove_xdomain(xd);
961 tb_xdomain_put(xd);
992 struct tb_xdomain *xd;
999 xd = tb_xdomain_find_by_uuid(tb, &pkg->remote_uuid);
1000 if (xd) {
1001 remove_xdomain(xd);
1002 tb_xdomain_put(xd);
1127 static int icm_tr_approve_xdomain_paths(struct tb *tb, struct tb_xdomain *xd,
1137 request.route_hi = upper_32_bits(xd->route);
1138 request.route_lo = lower_32_bits(xd->route);
1143 memcpy(&request.remote_uuid, xd->remote_uuid, sizeof(*xd->remote_uuid));
1157 static int icm_tr_xdomain_tear_down(struct tb *tb, struct tb_xdomain *xd,
1167 request.route_hi = upper_32_bits(xd->route);
1168 request.route_lo = lower_32_bits(xd->route);
1169 memcpy(&request.remote_uuid, xd->remote_uuid, sizeof(*xd->remote_uuid));
1183 static int icm_tr_disconnect_xdomain_paths(struct tb *tb, struct tb_xdomain *xd,
1189 ret = icm_tr_xdomain_tear_down(tb, xd, 1);
1194 return icm_tr_xdomain_tear_down(tb, xd, 2);
1206 struct tb_xdomain *xd;
1255 xd = tb_xdomain_find_by_route(tb, route);
1256 if (xd) {
1257 remove_xdomain(xd);
1258 tb_xdomain_put(xd);
1329 struct tb_xdomain *xd;
1338 xd = tb_xdomain_find_by_uuid(tb, &pkg->remote_uuid);
1339 if (xd) {
1340 if (xd->route == route) {
1341 update_xdomain(xd, route, 0);
1342 tb_xdomain_put(xd);
1346 remove_xdomain(xd);
1347 tb_xdomain_put(xd);
1351 xd = tb_xdomain_find_by_route(tb, route);
1352 if (xd) {
1353 remove_xdomain(xd);
1354 tb_xdomain_put(xd);
1383 struct tb_xdomain *xd;
1388 xd = tb_xdomain_find_by_route(tb, route);
1389 if (xd) {
1390 remove_xdomain(xd);
1391 tb_xdomain_put(xd);