Lines Matching full:ds
35 return dsa_tree_notify(dp->ds->dst, e, v); in dsa_port_notify()
57 struct dsa_switch *ds = dp->ds; in dsa_port_fast_age() local
59 if (!ds->ops->port_fast_age) in dsa_port_fast_age()
62 ds->ops->port_fast_age(ds, dp->index); in dsa_port_fast_age()
70 struct dsa_switch *ds = dp->ds; in dsa_port_vlan_fast_age() local
73 if (!ds->ops->port_vlan_fast_age) in dsa_port_vlan_fast_age()
76 err = ds->ops->port_vlan_fast_age(ds, dp->index, vid); in dsa_port_vlan_fast_age()
107 struct dsa_switch *ds = dp->ds; in dsa_port_can_configure_learning() local
110 if (!ds->ops->port_bridge_flags || !ds->ops->port_pre_bridge_flags) in dsa_port_can_configure_learning()
113 err = ds->ops->port_pre_bridge_flags(ds, dp->index, flags, NULL); in dsa_port_can_configure_learning()
119 struct dsa_switch *ds = dp->ds; in dsa_port_supports_hwtstamp() local
123 if (!ds->ops->port_hwtstamp_get || !ds->ops->port_hwtstamp_set) in dsa_port_supports_hwtstamp()
131 err = ds->ops->port_hwtstamp_get(ds, dp->index, &ifr); in dsa_port_supports_hwtstamp()
137 struct dsa_switch *ds = dp->ds; in dsa_port_set_state() local
140 if (!ds->ops->port_stp_state_set) in dsa_port_set_state()
143 ds->ops->port_stp_state_set(ds, port, state); in dsa_port_set_state()
171 struct dsa_switch *ds = dp->ds; in dsa_port_set_state_now() local
176 dev_err(ds->dev, "port %d failed to set STP state %u: %pe\n", in dsa_port_set_state_now()
185 struct dsa_switch *ds = dp->ds; in dsa_port_set_mst_state() local
189 if (!ds->ops->port_mst_state_set) in dsa_port_set_mst_state()
197 err = ds->ops->port_mst_state_set(ds, dp->index, state); in dsa_port_set_mst_state()
219 struct dsa_switch *ds = dp->ds; in dsa_port_enable_rt() local
223 if (ds->ops->port_enable) { in dsa_port_enable_rt()
224 err = ds->ops->port_enable(ds, port, phy); in dsa_port_enable_rt()
251 struct dsa_switch *ds = dp->ds; in dsa_port_disable_rt() local
260 if (ds->ops->port_disable) in dsa_port_disable_rt()
261 ds->ops->port_disable(ds, port); in dsa_port_disable_rt()
276 struct dsa_switch *ds = dp->ds; in dsa_port_reset_vlan_filtering() local
281 if (ds->needs_standalone_vlan_filtering && in dsa_port_reset_vlan_filtering()
285 } else if (!ds->needs_standalone_vlan_filtering && in dsa_port_reset_vlan_filtering()
299 if (change_vlan_filtering && ds->vlan_filtering_is_global) { in dsa_port_reset_vlan_filtering()
300 dsa_switch_for_each_port(other_dp, ds) { in dsa_port_reset_vlan_filtering()
315 dev_err(ds->dev, "port %d: %s\n", dp->index, in dsa_port_reset_vlan_filtering()
319 dev_err(ds->dev, in dsa_port_reset_vlan_filtering()
364 dev_err(dp->ds->dev, in dsa_port_clear_brport_flags()
428 struct dsa_switch *ds = dp->ds; in dsa_port_bridge_create() local
431 bridge = dsa_tree_bridge_find(ds->dst, br); in dsa_port_bridge_create()
446 bridge->num = dsa_bridge_num_get(br, ds->max_num_bridges); in dsa_port_bridge_create()
447 if (ds->max_num_bridges && !bridge->num) { in dsa_port_bridge_create()
477 struct dsa_switch *ds = dp->ds; in dsa_port_supports_mst() local
479 return ds->ops->vlan_msti_set && in dsa_port_supports_mst()
480 ds->ops->port_mst_state_set && in dsa_port_supports_mst()
481 ds->ops->port_vlan_fast_age && in dsa_port_supports_mst()
578 dev_err(dp->ds->dev, in dsa_port_bridge_leave()
614 struct dsa_switch *ds = dp->ds; in dsa_port_lag_create() local
617 lag = dsa_tree_lag_find(ds->dst, lag_dev); in dsa_port_lag_create()
632 dsa_lag_map(ds->dst, lag); in dsa_port_lag_create()
649 dsa_lag_unmap(dp->ds->dst, lag); in dsa_port_lag_destroy()
723 dev_err(dp->ds->dev, in dsa_port_lag_leave()
733 struct dsa_switch *ds = dp->ds; in dsa_port_can_apply_vlan_filtering() local
769 if (!ds->vlan_filtering_is_global) in dsa_port_can_apply_vlan_filtering()
777 dsa_switch_for_each_port(other_dp, ds) { in dsa_port_can_apply_vlan_filtering()
799 struct dsa_switch *ds = dp->ds; in dsa_port_vlan_filtering() local
803 if (!ds->ops->port_vlan_filtering) in dsa_port_vlan_filtering()
819 err = ds->ops->port_vlan_filtering(ds, dp->index, vlan_filtering, in dsa_port_vlan_filtering()
824 if (ds->vlan_filtering_is_global) { in dsa_port_vlan_filtering()
827 ds->vlan_filtering = vlan_filtering; in dsa_port_vlan_filtering()
829 dsa_switch_for_each_user_port(other_dp, ds) { in dsa_port_vlan_filtering()
855 ds->ops->port_vlan_filtering(ds, dp->index, old_vlan_filtering, NULL); in dsa_port_vlan_filtering()
857 if (ds->vlan_filtering_is_global) in dsa_port_vlan_filtering()
858 ds->vlan_filtering = old_vlan_filtering; in dsa_port_vlan_filtering()
871 struct dsa_switch *ds = dp->ds; in dsa_port_skip_vlan_configuration() local
876 return !ds->configure_vlan_while_not_filtering && !br_vlan_enabled(br); in dsa_port_skip_vlan_configuration()
912 struct dsa_switch *ds = dp->ds; in dsa_port_pre_bridge_flags() local
914 if (!ds->ops->port_pre_bridge_flags) in dsa_port_pre_bridge_flags()
917 return ds->ops->port_pre_bridge_flags(ds, dp->index, flags, extack); in dsa_port_pre_bridge_flags()
924 struct dsa_switch *ds = dp->ds; in dsa_port_bridge_flags() local
927 if (!ds->ops->port_bridge_flags) in dsa_port_bridge_flags()
930 err = ds->ops->port_bridge_flags(ds, dp->index, flags, extack); in dsa_port_bridge_flags()
953 struct dsa_switch *ds = dp->ds; in dsa_port_set_host_flood() local
955 if (ds->ops->port_set_host_flood) in dsa_port_set_host_flood()
956 ds->ops->port_set_host_flood(ds, dp->index, uc, mc); in dsa_port_set_host_flood()
962 struct dsa_switch *ds = dp->ds; in dsa_port_vlan_msti() local
964 if (!ds->ops->vlan_msti_set) in dsa_port_vlan_msti()
967 return ds->ops->vlan_msti_set(ds, *dp->bridge, msti); in dsa_port_vlan_msti()
997 if (!dp->ds->fdb_isolation) in dsa_port_fdb_add()
1016 if (!dp->ds->fdb_isolation) in dsa_port_fdb_del()
1057 if (!dp->ds->fdb_isolation) in dsa_port_bridge_host_fdb_add()
1108 if (!dp->ds->fdb_isolation) in dsa_port_bridge_host_fdb_del()
1133 if (!dp->ds->fdb_isolation) in dsa_port_lag_fdb_add()
1152 if (!dp->ds->fdb_isolation) in dsa_port_lag_fdb_del()
1160 struct dsa_switch *ds = dp->ds; in dsa_port_fdb_dump() local
1163 if (!ds->ops->port_fdb_dump) in dsa_port_fdb_dump()
1166 return ds->ops->port_fdb_dump(ds, port, cb, data); in dsa_port_fdb_dump()
1181 if (!dp->ds->fdb_isolation) in dsa_port_mdb_add()
1199 if (!dp->ds->fdb_isolation) in dsa_port_mdb_del()
1239 if (!dp->ds->fdb_isolation) in dsa_port_bridge_host_mdb_add()
1283 if (!dp->ds->fdb_isolation) in dsa_port_bridge_host_mdb_del()
1360 struct dsa_switch *ds = dp->ds; in dsa_port_mrp_add() local
1362 if (!ds->ops->port_mrp_add) in dsa_port_mrp_add()
1365 return ds->ops->port_mrp_add(ds, dp->index, mrp); in dsa_port_mrp_add()
1371 struct dsa_switch *ds = dp->ds; in dsa_port_mrp_del() local
1373 if (!ds->ops->port_mrp_del) in dsa_port_mrp_del()
1376 return ds->ops->port_mrp_del(ds, dp->index, mrp); in dsa_port_mrp_del()
1382 struct dsa_switch *ds = dp->ds; in dsa_port_mrp_add_ring_role() local
1384 if (!ds->ops->port_mrp_add_ring_role) in dsa_port_mrp_add_ring_role()
1387 return ds->ops->port_mrp_add_ring_role(ds, dp->index, mrp); in dsa_port_mrp_add_ring_role()
1393 struct dsa_switch *ds = dp->ds; in dsa_port_mrp_del_ring_role() local
1395 if (!ds->ops->port_mrp_del_ring_role) in dsa_port_mrp_del_ring_role()
1398 return ds->ops->port_mrp_del_ring_role(ds, dp->index, mrp); in dsa_port_mrp_del_ring_role()
1406 struct dsa_switch *ds = dp->ds; in dsa_port_assign_conduit() local
1409 err = ds->ops->port_change_conduit(ds, port, conduit, extack); in dsa_port_assign_conduit()
1411 dev_err(ds->dev, "port %d failed to assign conduit %s: %pe\n", in dsa_port_assign_conduit()
1437 struct dsa_switch *ds = dp->ds; in dsa_port_change_conduit() local
1451 * under a bridge, either due to ds->vlan_filtering_is_global or in dsa_port_change_conduit()
1452 * ds->needs_standalone_vlan_filtering. In turn this means VLANs in dsa_port_change_conduit()
1541 dev_err(ds->dev, in dsa_port_change_conduit()
1552 dev_err(ds->dev, in dsa_port_change_conduit()
1562 dev_err(ds->dev, in dsa_port_change_conduit()
1584 struct dsa_switch *ds = dp->ds; in dsa_port_phylink_mac_select_pcs() local
1586 if (ds->ops->phylink_mac_select_pcs) in dsa_port_phylink_mac_select_pcs()
1587 pcs = ds->ops->phylink_mac_select_pcs(ds, dp->index, interface); in dsa_port_phylink_mac_select_pcs()
1597 struct dsa_switch *ds = dp->ds; in dsa_port_phylink_mac_config() local
1599 if (!ds->ops->phylink_mac_config) in dsa_port_phylink_mac_config()
1602 ds->ops->phylink_mac_config(ds, dp->index, mode, state); in dsa_port_phylink_mac_config()
1610 struct dsa_switch *ds = dp->ds; in dsa_port_phylink_mac_link_down() local
1612 if (!ds->ops->phylink_mac_link_down) in dsa_port_phylink_mac_link_down()
1615 ds->ops->phylink_mac_link_down(ds, dp->index, mode, interface); in dsa_port_phylink_mac_link_down()
1626 struct dsa_switch *ds = dp->ds; in dsa_port_phylink_mac_link_up() local
1628 if (!ds->ops->phylink_mac_link_up) in dsa_port_phylink_mac_link_up()
1631 ds->ops->phylink_mac_link_up(ds, dp->index, mode, interface, phydev, in dsa_port_phylink_mac_link_up()
1645 struct dsa_switch *ds = dp->ds; in dsa_port_phylink_create() local
1654 if (ds->ops->phylink_get_caps) { in dsa_port_phylink_create()
1655 ds->ops->phylink_get_caps(ds, dp->index, &dp->pl_config); in dsa_port_phylink_create()
1669 if (ds->phylink_mac_ops) in dsa_port_phylink_create()
1670 mac_ops = ds->phylink_mac_ops; in dsa_port_phylink_create()
1692 struct dsa_switch *ds = dp->ds; in dsa_shared_port_phylink_register() local
1696 dp->pl_config.dev = ds->dev; in dsa_shared_port_phylink_register()
1723 * internal PHY located on the ds->user_mii_bus at an MDIO address equal to
1835 struct dsa_switch *ds = dp->ds; in dsa_shared_port_validate_of() local
1843 dev_err(ds->dev, in dsa_shared_port_validate_of()
1862 dev_err(ds->dev, in dsa_shared_port_validate_of()
1869 struct dsa_switch *ds = dp->ds; in dsa_shared_port_link_down() local
1871 if (ds->phylink_mac_ops && ds->phylink_mac_ops->mac_link_down) in dsa_shared_port_link_down()
1872 ds->phylink_mac_ops->mac_link_down(&dp->pl_config, MLO_AN_FIXED, in dsa_shared_port_link_down()
1874 else if (ds->ops->phylink_mac_link_down) in dsa_shared_port_link_down()
1875 ds->ops->phylink_mac_link_down(ds, dp->index, MLO_AN_FIXED, in dsa_shared_port_link_down()
1881 struct dsa_switch *ds = dp->ds; in dsa_shared_port_link_register_of() local
1889 !of_device_compatible_match(ds->dev->of_node, in dsa_shared_port_link_register_of()
1894 dev_warn(ds->dev, in dsa_shared_port_link_register_of()
1920 struct dsa_switch *ds = dp->ds; in dsa_port_hsr_join() local
1923 if (!ds->ops->port_hsr_join) in dsa_port_hsr_join()
1928 err = ds->ops->port_hsr_join(ds, dp->index, hsr, extack); in dsa_port_hsr_join()
1937 struct dsa_switch *ds = dp->ds; in dsa_port_hsr_leave() local
1942 if (ds->ops->port_hsr_leave) { in dsa_port_hsr_leave()
1943 err = ds->ops->port_hsr_leave(ds, dp->index, hsr); in dsa_port_hsr_leave()
1945 dev_err(dp->ds->dev, in dsa_port_hsr_leave()
1977 dev_err(dp->ds->dev, in dsa_port_tag_8021q_vlan_del()