Lines Matching refs:ds

35 	return dsa_tree_notify(dp->ds->dst, e, v);
57 struct dsa_switch *ds = dp->ds;
59 if (!ds->ops->port_fast_age)
62 ds->ops->port_fast_age(ds, dp->index);
70 struct dsa_switch *ds = dp->ds;
73 if (!ds->ops->port_vlan_fast_age)
76 err = ds->ops->port_vlan_fast_age(ds, dp->index, vid);
107 struct dsa_switch *ds = dp->ds;
110 if (!ds->ops->port_bridge_flags || !ds->ops->port_pre_bridge_flags)
113 err = ds->ops->port_pre_bridge_flags(ds, dp->index, flags, NULL);
119 struct dsa_switch *ds = dp->ds;
123 if (!ds->ops->port_hwtstamp_get || !ds->ops->port_hwtstamp_set)
131 err = ds->ops->port_hwtstamp_get(ds, dp->index, &ifr);
137 struct dsa_switch *ds = dp->ds;
140 if (!ds->ops->port_stp_state_set)
143 ds->ops->port_stp_state_set(ds, port, state);
171 struct dsa_switch *ds = dp->ds;
176 dev_err(ds->dev, "port %d failed to set STP state %u: %pe\n",
185 struct dsa_switch *ds = dp->ds;
189 if (!ds->ops->port_mst_state_set)
197 err = ds->ops->port_mst_state_set(ds, dp->index, state);
219 struct dsa_switch *ds = dp->ds;
223 if (ds->ops->port_enable) {
224 err = ds->ops->port_enable(ds, port, phy);
251 struct dsa_switch *ds = dp->ds;
260 if (ds->ops->port_disable)
261 ds->ops->port_disable(ds, port);
276 struct dsa_switch *ds = dp->ds;
281 if (ds->needs_standalone_vlan_filtering &&
285 } else if (!ds->needs_standalone_vlan_filtering &&
299 if (change_vlan_filtering && ds->vlan_filtering_is_global) {
300 dsa_switch_for_each_port(other_dp, ds) {
315 dev_err(ds->dev, "port %d: %s\n", dp->index,
319 dev_err(ds->dev,
364 dev_err(dp->ds->dev,
428 struct dsa_switch *ds = dp->ds;
431 bridge = dsa_tree_bridge_find(ds->dst, br);
446 bridge->num = dsa_bridge_num_get(br, ds->max_num_bridges);
447 if (ds->max_num_bridges && !bridge->num) {
477 struct dsa_switch *ds = dp->ds;
479 return ds->ops->vlan_msti_set &&
480 ds->ops->port_mst_state_set &&
481 ds->ops->port_vlan_fast_age &&
578 dev_err(dp->ds->dev,
614 struct dsa_switch *ds = dp->ds;
617 lag = dsa_tree_lag_find(ds->dst, lag_dev);
632 dsa_lag_map(ds->dst, lag);
649 dsa_lag_unmap(dp->ds->dst, lag);
723 dev_err(dp->ds->dev,
733 struct dsa_switch *ds = dp->ds;
769 if (!ds->vlan_filtering_is_global)
777 dsa_switch_for_each_port(other_dp, ds) {
799 struct dsa_switch *ds = dp->ds;
803 if (!ds->ops->port_vlan_filtering)
819 err = ds->ops->port_vlan_filtering(ds, dp->index, vlan_filtering,
824 if (ds->vlan_filtering_is_global) {
827 ds->vlan_filtering = vlan_filtering;
829 dsa_switch_for_each_user_port(other_dp, ds) {
855 ds->ops->port_vlan_filtering(ds, dp->index, old_vlan_filtering, NULL);
857 if (ds->vlan_filtering_is_global)
858 ds->vlan_filtering = old_vlan_filtering;
871 struct dsa_switch *ds = dp->ds;
876 return !ds->configure_vlan_while_not_filtering && !br_vlan_enabled(br);
912 struct dsa_switch *ds = dp->ds;
914 if (!ds->ops->port_pre_bridge_flags)
917 return ds->ops->port_pre_bridge_flags(ds, dp->index, flags, extack);
924 struct dsa_switch *ds = dp->ds;
927 if (!ds->ops->port_bridge_flags)
930 err = ds->ops->port_bridge_flags(ds, dp->index, flags, extack);
953 struct dsa_switch *ds = dp->ds;
955 if (ds->ops->port_set_host_flood)
956 ds->ops->port_set_host_flood(ds, dp->index, uc, mc);
962 struct dsa_switch *ds = dp->ds;
964 if (!ds->ops->vlan_msti_set)
967 return ds->ops->vlan_msti_set(ds, *dp->bridge, msti);
997 if (!dp->ds->fdb_isolation)
1016 if (!dp->ds->fdb_isolation)
1057 if (!dp->ds->fdb_isolation)
1108 if (!dp->ds->fdb_isolation)
1133 if (!dp->ds->fdb_isolation)
1152 if (!dp->ds->fdb_isolation)
1160 struct dsa_switch *ds = dp->ds;
1163 if (!ds->ops->port_fdb_dump)
1166 return ds->ops->port_fdb_dump(ds, port, cb, data);
1181 if (!dp->ds->fdb_isolation)
1199 if (!dp->ds->fdb_isolation)
1239 if (!dp->ds->fdb_isolation)
1283 if (!dp->ds->fdb_isolation)
1360 struct dsa_switch *ds = dp->ds;
1362 if (!ds->ops->port_mrp_add)
1365 return ds->ops->port_mrp_add(ds, dp->index, mrp);
1371 struct dsa_switch *ds = dp->ds;
1373 if (!ds->ops->port_mrp_del)
1376 return ds->ops->port_mrp_del(ds, dp->index, mrp);
1382 struct dsa_switch *ds = dp->ds;
1384 if (!ds->ops->port_mrp_add_ring_role)
1387 return ds->ops->port_mrp_add_ring_role(ds, dp->index, mrp);
1393 struct dsa_switch *ds = dp->ds;
1395 if (!ds->ops->port_mrp_del_ring_role)
1398 return ds->ops->port_mrp_del_ring_role(ds, dp->index, mrp);
1406 struct dsa_switch *ds = dp->ds;
1409 err = ds->ops->port_change_master(ds, port, master, extack);
1411 dev_err(ds->dev, "port %d failed to assign master %s: %pe\n",
1437 struct dsa_switch *ds = dp->ds;
1451 * under a bridge, either due to ds->vlan_filtering_is_global or
1452 * ds->needs_standalone_vlan_filtering. In turn this means VLANs
1512 dev_err(ds->dev,
1522 dev_err(ds->dev,
1577 struct dsa_switch *ds = dp->ds;
1579 if (ds->ops->phylink_mac_select_pcs)
1580 pcs = ds->ops->phylink_mac_select_pcs(ds, dp->index, interface);
1590 struct dsa_switch *ds = dp->ds;
1593 if (ds->ops->phylink_mac_prepare)
1594 err = ds->ops->phylink_mac_prepare(ds, dp->index, mode,
1605 struct dsa_switch *ds = dp->ds;
1607 if (!ds->ops->phylink_mac_config)
1610 ds->ops->phylink_mac_config(ds, dp->index, mode, state);
1618 struct dsa_switch *ds = dp->ds;
1621 if (ds->ops->phylink_mac_finish)
1622 err = ds->ops->phylink_mac_finish(ds, dp->index, mode,
1634 struct dsa_switch *ds = dp->ds;
1639 if (!ds->ops->phylink_mac_link_down) {
1640 if (ds->ops->adjust_link && phydev)
1641 ds->ops->adjust_link(ds, dp->index, phydev);
1645 ds->ops->phylink_mac_link_down(ds, dp->index, mode, interface);
1656 struct dsa_switch *ds = dp->ds;
1658 if (!ds->ops->phylink_mac_link_up) {
1659 if (ds->ops->adjust_link && phydev)
1660 ds->ops->adjust_link(ds, dp->index, phydev);
1664 ds->ops->phylink_mac_link_up(ds, dp->index, mode, interface, phydev,
1680 struct dsa_switch *ds = dp->ds;
1689 if (ds->ops->phylink_get_caps) {
1690 ds->ops->phylink_get_caps(ds, dp->index, &dp->pl_config);
1723 struct dsa_switch *ds = dp->ds;
1749 if (ds->ops->adjust_link)
1750 ds->ops->adjust_link(ds, port, phydev);
1752 dev_dbg(ds->dev, "enabled port's phy: %s", phydev_name(phydev));
1762 struct dsa_switch *ds = dp->ds;
1770 dev_err(ds->dev,
1785 if (ds->ops->adjust_link)
1786 ds->ops->adjust_link(ds, port, phydev);
1795 struct dsa_switch *ds = dp->ds;
1799 dp->pl_config.dev = ds->dev;
1826 * internal PHY located on the ds->slave_mii_bus at an MDIO address equal to
1938 struct dsa_switch *ds = dp->ds;
1946 dev_err(ds->dev,
1965 dev_err(ds->dev,
1972 struct dsa_switch *ds = dp->ds;
1981 !of_device_compatible_match(ds->dev->of_node,
1985 if (!ds->ops->adjust_link) {
1987 dev_warn(ds->dev,
1991 if (ds->ops->phylink_mac_link_down)
1992 ds->ops->phylink_mac_link_down(ds, port,
2000 dev_warn(ds->dev,
2011 struct dsa_switch *ds = dp->ds;
2013 if (!ds->ops->adjust_link && dp->pl) {
2029 struct dsa_switch *ds = dp->ds;
2032 if (!ds->ops->port_hsr_join)
2037 err = ds->ops->port_hsr_join(ds, dp->index, hsr);
2046 struct dsa_switch *ds = dp->ds;
2051 if (ds->ops->port_hsr_leave) {
2052 err = ds->ops->port_hsr_leave(ds, dp->index, hsr);
2054 dev_err(dp->ds->dev,
2086 dev_err(dp->ds->dev,