Lines Matching refs:xd
544 static int icm_fr_approve_xdomain_paths(struct tb *tb, struct tb_xdomain *xd)
552 request.link_info = xd->depth << ICM_LINK_INFO_DEPTH_SHIFT | xd->link;
553 memcpy(&request.remote_uuid, xd->remote_uuid, sizeof(*xd->remote_uuid));
555 request.transmit_path = xd->transmit_path;
556 request.transmit_ring = xd->transmit_ring;
557 request.receive_path = xd->receive_path;
558 request.receive_ring = xd->receive_ring;
572 static int icm_fr_disconnect_xdomain_paths(struct tb *tb, struct tb_xdomain *xd)
577 phy_port = tb_phy_port_from_link(xd->link);
665 struct tb_xdomain *xd;
669 xd = tb_xdomain_alloc(sw->tb, &sw->dev, route, local_uuid, remote_uuid);
670 if (!xd)
673 xd->link = link;
674 xd->depth = depth;
676 tb_port_at(route, sw)->xdomain = xd;
678 tb_xdomain_add(xd);
685 static void update_xdomain(struct tb_xdomain *xd, u64 route, u8 link)
687 xd->link = link;
688 xd->route = route;
689 xd->is_unplugged = false;
692 static void remove_xdomain(struct tb_xdomain *xd)
696 sw = tb_to_switch(xd->dev.parent);
697 tb_port_at(xd->route, sw)->xdomain = NULL;
698 tb_xdomain_remove(xd);
711 struct tb_xdomain *xd;
803 xd = tb_xdomain_find_by_link_depth(tb, link, depth);
804 if (xd) {
805 remove_xdomain(xd);
806 tb_xdomain_put(xd);
882 struct tb_xdomain *xd;
898 xd = tb_xdomain_find_by_uuid(tb, &pkg->remote_uuid);
899 if (xd) {
902 xd_phy_port = phy_port_from_route(xd->route, xd->depth);
905 if (xd->depth == depth && xd_phy_port == phy_port) {
906 update_xdomain(xd, route, link);
907 tb_xdomain_put(xd);
917 remove_xdomain(xd);
918 tb_xdomain_put(xd);
926 xd = tb_xdomain_find_by_link_depth(tb, link, depth);
927 if (!xd) {
932 xd = tb_xdomain_find_by_link_depth(tb, dual_link,
935 if (xd) {
936 remove_xdomain(xd);
937 tb_xdomain_put(xd);
968 struct tb_xdomain *xd;
975 xd = tb_xdomain_find_by_uuid(tb, &pkg->remote_uuid);
976 if (xd) {
977 remove_xdomain(xd);
978 tb_xdomain_put(xd);
1100 static int icm_tr_approve_xdomain_paths(struct tb *tb, struct tb_xdomain *xd)
1108 request.route_hi = upper_32_bits(xd->route);
1109 request.route_lo = lower_32_bits(xd->route);
1110 request.transmit_path = xd->transmit_path;
1111 request.transmit_ring = xd->transmit_ring;
1112 request.receive_path = xd->receive_path;
1113 request.receive_ring = xd->receive_ring;
1114 memcpy(&request.remote_uuid, xd->remote_uuid, sizeof(*xd->remote_uuid));
1128 static int icm_tr_xdomain_tear_down(struct tb *tb, struct tb_xdomain *xd,
1138 request.route_hi = upper_32_bits(xd->route);
1139 request.route_lo = lower_32_bits(xd->route);
1140 memcpy(&request.remote_uuid, xd->remote_uuid, sizeof(*xd->remote_uuid));
1154 static int icm_tr_disconnect_xdomain_paths(struct tb *tb, struct tb_xdomain *xd)
1158 ret = icm_tr_xdomain_tear_down(tb, xd, 1);
1163 return icm_tr_xdomain_tear_down(tb, xd, 2);
1175 struct tb_xdomain *xd;
1225 xd = tb_xdomain_find_by_route(tb, route);
1226 if (xd) {
1227 remove_xdomain(xd);
1228 tb_xdomain_put(xd);
1293 struct tb_xdomain *xd;
1302 xd = tb_xdomain_find_by_uuid(tb, &pkg->remote_uuid);
1303 if (xd) {
1304 if (xd->route == route) {
1305 update_xdomain(xd, route, 0);
1306 tb_xdomain_put(xd);
1310 remove_xdomain(xd);
1311 tb_xdomain_put(xd);
1315 xd = tb_xdomain_find_by_route(tb, route);
1316 if (xd) {
1317 remove_xdomain(xd);
1318 tb_xdomain_put(xd);
1347 struct tb_xdomain *xd;
1352 xd = tb_xdomain_find_by_route(tb, route);
1353 if (xd) {
1354 remove_xdomain(xd);
1355 tb_xdomain_put(xd);