Lines Matching refs:ds
27 static enum dsa_tag_protocol felix_get_tag_protocol(struct dsa_switch *ds,
34 static int felix_set_ageing_time(struct dsa_switch *ds,
37 struct ocelot *ocelot = ds->priv;
44 static int felix_fdb_dump(struct dsa_switch *ds, int port,
47 struct ocelot *ocelot = ds->priv;
52 static int felix_fdb_add(struct dsa_switch *ds, int port,
55 struct ocelot *ocelot = ds->priv;
60 static int felix_fdb_del(struct dsa_switch *ds, int port,
63 struct ocelot *ocelot = ds->priv;
69 static int felix_mdb_prepare(struct dsa_switch *ds, int port,
75 static void felix_mdb_add(struct dsa_switch *ds, int port,
78 struct ocelot *ocelot = ds->priv;
83 static int felix_mdb_del(struct dsa_switch *ds, int port,
86 struct ocelot *ocelot = ds->priv;
91 static void felix_bridge_stp_state_set(struct dsa_switch *ds, int port,
94 struct ocelot *ocelot = ds->priv;
99 static int felix_bridge_join(struct dsa_switch *ds, int port,
102 struct ocelot *ocelot = ds->priv;
107 static void felix_bridge_leave(struct dsa_switch *ds, int port,
110 struct ocelot *ocelot = ds->priv;
116 static int felix_vlan_prepare(struct dsa_switch *ds, int port,
122 static int felix_vlan_filtering(struct dsa_switch *ds, int port, bool enabled,
125 struct ocelot *ocelot = ds->priv;
130 static void felix_vlan_add(struct dsa_switch *ds, int port,
133 struct ocelot *ocelot = ds->priv;
138 if (dsa_is_cpu_port(ds, port))
146 dev_err(ds->dev, "Failed to add VLAN %d to port %d: %d\n",
153 static int felix_vlan_del(struct dsa_switch *ds, int port,
156 struct ocelot *ocelot = ds->priv;
163 dev_err(ds->dev, "Failed to remove VLAN %d from port %d: %d\n",
171 static int felix_port_enable(struct dsa_switch *ds, int port,
174 struct ocelot *ocelot = ds->priv;
181 static void felix_port_disable(struct dsa_switch *ds, int port)
183 struct ocelot *ocelot = ds->priv;
188 static void felix_phylink_validate(struct dsa_switch *ds, int port,
192 struct ocelot *ocelot = ds->priv;
199 static void felix_phylink_mac_config(struct dsa_switch *ds, int port,
203 struct ocelot *ocelot = ds->priv;
205 struct dsa_port *dp = dsa_to_port(ds, port);
211 static void felix_phylink_mac_link_down(struct dsa_switch *ds, int port,
215 struct ocelot *ocelot = ds->priv;
237 static void felix_phylink_mac_link_up(struct dsa_switch *ds, int port,
244 struct ocelot *ocelot = ds->priv;
338 static void felix_get_strings(struct dsa_switch *ds, int port,
341 struct ocelot *ocelot = ds->priv;
346 static void felix_get_ethtool_stats(struct dsa_switch *ds, int port, u64 *data)
348 struct ocelot *ocelot = ds->priv;
353 static int felix_get_sset_count(struct dsa_switch *ds, int port, int sset)
355 struct ocelot *ocelot = ds->priv;
360 static int felix_get_ts_info(struct dsa_switch *ds, int port,
363 struct ocelot *ocelot = ds->priv;
582 static int felix_setup(struct dsa_switch *ds)
584 struct ocelot *ocelot = ds->priv;
588 err = felix_init_structs(felix, ds->num_ports);
605 for (port = 0; port < ds->num_ports; port++) {
608 if (dsa_is_cpu_port(ds, port))
626 ds->mtu_enforcement_ingress = true;
627 ds->configure_vlan_while_not_filtering = true;
632 static void felix_teardown(struct dsa_switch *ds)
634 struct ocelot *ocelot = ds->priv;
642 if (dsa_is_unused_port(ds, port))
652 static int felix_hwtstamp_get(struct dsa_switch *ds, int port,
655 struct ocelot *ocelot = ds->priv;
660 static int felix_hwtstamp_set(struct dsa_switch *ds, int port,
663 struct ocelot *ocelot = ds->priv;
668 static bool felix_rxtstamp(struct dsa_switch *ds, int port,
672 struct ocelot *ocelot = ds->priv;
696 static bool felix_txtstamp(struct dsa_switch *ds, int port,
699 struct ocelot *ocelot = ds->priv;
711 static int felix_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
713 struct ocelot *ocelot = ds->priv;
720 static int felix_get_max_mtu(struct dsa_switch *ds, int port)
722 struct ocelot *ocelot = ds->priv;
727 static int felix_cls_flower_add(struct dsa_switch *ds, int port,
730 struct ocelot *ocelot = ds->priv;
735 static int felix_cls_flower_del(struct dsa_switch *ds, int port,
738 struct ocelot *ocelot = ds->priv;
743 static int felix_cls_flower_stats(struct dsa_switch *ds, int port,
746 struct ocelot *ocelot = ds->priv;
751 static int felix_port_policer_add(struct dsa_switch *ds, int port,
754 struct ocelot *ocelot = ds->priv;
763 static void felix_port_policer_del(struct dsa_switch *ds, int port)
765 struct ocelot *ocelot = ds->priv;
770 static int felix_port_setup_tc(struct dsa_switch *ds, int port,
774 struct ocelot *ocelot = ds->priv;
778 return felix->info->port_setup_tc(ds, port, type, type_data);
828 struct dsa_switch *ds = felix->ds;
830 if (!dsa_is_user_port(ds, port))
833 return dsa_to_port(ds, port)->slave;