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_conduit(ds, port, conduit, extack);
1411 dev_err(ds->dev, "port %d failed to assign conduit %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,
1563 struct dsa_switch *ds = dp->ds;
1565 if (ds->ops->phylink_mac_select_pcs)
1566 pcs = ds->ops->phylink_mac_select_pcs(ds, dp->index, interface);
1576 struct dsa_switch *ds = dp->ds;
1579 if (ds->ops->phylink_mac_prepare)
1580 err = ds->ops->phylink_mac_prepare(ds, dp->index, mode,
1591 struct dsa_switch *ds = dp->ds;
1593 if (!ds->ops->phylink_mac_config)
1596 ds->ops->phylink_mac_config(ds, dp->index, mode, state);
1604 struct dsa_switch *ds = dp->ds;
1607 if (ds->ops->phylink_mac_finish)
1608 err = ds->ops->phylink_mac_finish(ds, dp->index, mode,
1620 struct dsa_switch *ds = dp->ds;
1625 if (!ds->ops->phylink_mac_link_down) {
1626 if (ds->ops->adjust_link && phydev)
1627 ds->ops->adjust_link(ds, dp->index, phydev);
1631 ds->ops->phylink_mac_link_down(ds, dp->index, mode, interface);
1642 struct dsa_switch *ds = dp->ds;
1644 if (!ds->ops->phylink_mac_link_up) {
1645 if (ds->ops->adjust_link && phydev)
1646 ds->ops->adjust_link(ds, dp->index, phydev);
1650 ds->ops->phylink_mac_link_up(ds, dp->index, mode, interface, phydev,
1665 struct dsa_switch *ds = dp->ds;
1674 if (ds->ops->phylink_get_caps) {
1675 ds->ops->phylink_get_caps(ds, dp->index, &dp->pl_config);
1708 struct dsa_switch *ds = dp->ds;
1734 if (ds->ops->adjust_link)
1735 ds->ops->adjust_link(ds, port, phydev);
1737 dev_dbg(ds->dev, "enabled port's phy: %s", phydev_name(phydev));
1747 struct dsa_switch *ds = dp->ds;
1755 dev_err(ds->dev,
1770 if (ds->ops->adjust_link)
1771 ds->ops->adjust_link(ds, port, phydev);
1780 struct dsa_switch *ds = dp->ds;
1784 dp->pl_config.dev = ds->dev;
1811 * internal PHY located on the ds->user_mii_bus at an MDIO address equal to
1923 struct dsa_switch *ds = dp->ds;
1931 dev_err(ds->dev,
1950 dev_err(ds->dev,
1957 struct dsa_switch *ds = dp->ds;
1966 !of_device_compatible_match(ds->dev->of_node,
1970 if (!ds->ops->adjust_link) {
1972 dev_warn(ds->dev,
1976 if (ds->ops->phylink_mac_link_down)
1977 ds->ops->phylink_mac_link_down(ds, port,
1985 dev_warn(ds->dev,
1996 struct dsa_switch *ds = dp->ds;
1998 if (!ds->ops->adjust_link && dp->pl) {
2015 struct dsa_switch *ds = dp->ds;
2018 if (!ds->ops->port_hsr_join)
2023 err = ds->ops->port_hsr_join(ds, dp->index, hsr, extack);
2032 struct dsa_switch *ds = dp->ds;
2037 if (ds->ops->port_hsr_leave) {
2038 err = ds->ops->port_hsr_leave(ds, dp->index, hsr);
2040 dev_err(dp->ds->dev,
2072 dev_err(dp->ds->dev,