return err;
}
+ err = dsa_cpu_port_ethtool_setup(dst->ds[0]);
+ if (err)
+ return err;
+
/* If we use a tagging format that doesn't have an ethertype
* field, make sure that all packets from this point on get
* sent to the tag format's receive function.
dsa_ds_unapply(dst, ds);
}
+ dsa_cpu_port_ethtool_restore(dst->ds[0]);
+
pr_info("DSA: tree %d unapplied\n", dst->tree);
dst->applied = false;
}
struct device_node *ports = dsa_get_ports(ds, np);
struct dsa_switch_tree *dst;
u32 tree, index;
- int err;
+ int i, err;
err = dsa_parse_member(np, &tree, &index);
if (err)
ds->dst = dst;
ds->index = index;
+
+ /* Initialize the routing table */
+ for (i = 0; i < DSA_MAX_SWITCHES; ++i)
+ ds->rtable[i] = DSA_RTABLE_NONE;
+
dsa_dst_add_ds(dst, ds, index);
err = dsa_dst_complete(dst);
}
EXPORT_SYMBOL_GPL(dsa_register_switch);
-void _dsa_unregister_switch(struct dsa_switch *ds)
+static void _dsa_unregister_switch(struct dsa_switch *ds)
{
struct dsa_switch_tree *dst = ds->dst;