Lines Matching defs:index
186 if (dst->index != tree_index)
190 if (dp->ds->index != sw_index)
201 static struct dsa_switch_tree *dsa_tree_find(int index)
206 if (dst->index == index)
212 static struct dsa_switch_tree *dsa_tree_alloc(int index)
220 dst->index = index;
250 static struct dsa_switch_tree *dsa_tree_touch(int index)
254 dst = dsa_tree_find(index);
258 return dsa_tree_alloc(index);
391 pr_err("DSA: tree %d has no CPU port\n", dst->index);
491 dp->index);
509 dp->index);
877 dst->index);
907 pr_info("DSA: tree %d setup\n", dst->index);
945 pr_info("DSA: tree %d torn down\n", dst->index);
1089 static struct dsa_port *dsa_port_touch(struct dsa_switch *ds, int index)
1095 if (dp->index == index)
1103 dp->index = index;
1146 mdp_upstream = dsa_upstream_port(mds, mdp->index);
1154 return ds->ops->get_tag_protocol(ds, dp->index, tag_protocol);
1295 dev_err(ds->dev, "port %pOF index %u exceeds num_ports (%u)\n",
1327 ds->index = m[1];
1333 if (dsa_switch_find(ds->dst->index, ds->index)) {
1335 "A DSA switch with index %d already exists in tree %d\n",
1336 ds->index, ds->dst->index);
1340 if (ds->dst->last_switch < ds->index)
1341 ds->dst->last_switch = ds->index;
1472 ds->index = 0;