Lines Matching refs:depth

108 	int (*get_route)(struct tb *tb, u8 link, u8 depth, u64 *route);
188 static inline u8 phy_port_from_route(u64 route, u8 depth)
192 link = depth ? route >> ((depth - 1) * 8) : route;
208 int depth = tb_route_length(route);
209 return depth ? route & ~(0xffULL << (depth - 1) * TB_ROUTE_SHIFT) : 0;
398 static int icm_fr_get_route(struct tb *tb, u8 link, u8 depth, u64 *route)
425 for (i = 1; i < depth; i++) {
570 request.link_info = xd->depth << ICM_LINK_INFO_DEPTH_SHIFT | xd->link;
648 u8 connection_key, u8 link, u8 depth, bool boot)
663 sw->depth = depth;
681 u8 link, u8 depth)
692 xd->depth = depth;
730 u8 link, depth;
737 depth = (pkg->link_info & ICM_LINK_INFO_DEPTH_MASK) >>
748 link, depth);
767 if (sw->depth == depth && sw_phy_port == phy_port &&
774 ret = icm->get_route(tb, link, depth, &route);
777 link, depth);
786 pkg->connection_key, link, depth, boot);
803 * account) and depth. If we found one it is definitely a stale
806 sw = tb_switch_find_by_link_depth(tb, link, depth);
812 sw = tb_switch_find_by_link_depth(tb, dual_link, depth);
820 xd = tb_xdomain_find_by_link_depth(tb, link, depth);
826 parent_sw = tb_switch_find_by_link_depth(tb, link, depth - 1);
829 link, depth);
833 ret = icm->get_route(tb, link, depth, &route);
836 link, depth);
848 sw->depth = depth;
873 u8 link, depth;
876 depth = (pkg->link_info & ICM_LINK_INFO_DEPTH_MASK) >>
879 if (link > ICM_MAX_LINK || depth > TB_SWITCH_MAX_DEPTH) {
880 tb_warn(tb, "invalid topology %u.%u, ignoring\n", link, depth);
884 sw = tb_switch_find_by_link_depth(tb, link, depth);
887 depth);
908 u8 link, depth;
912 depth = (pkg->link_info & ICM_LINK_INFO_DEPTH_MASK) >>
915 if (link > ICM_MAX_LINK || depth > TB_SWITCH_MAX_DEPTH) {
916 tb_warn(tb, "invalid topology %u.%u, ignoring\n", link, depth);
926 xd_phy_port = phy_port_from_route(xd->route, xd->depth);
927 phy_port = phy_port_from_route(route, depth);
929 if (xd->depth == depth && xd_phy_port == phy_port) {
950 xd = tb_xdomain_find_by_link_depth(tb, link, depth);
957 depth);
975 sw = tb_switch_find_by_link_depth(tb, link, depth);
978 depth);
983 depth);
1514 static int icm_ar_get_route(struct tb *tb, u8 link, u8 depth, u64 *route)
1519 .link_info = depth << ICM_LINK_INFO_DEPTH_SHIFT | link,