Lines Matching refs:ds
30 return dsa_tree_notify(dp->ds->dst, e, v); in dsa_port_notify()
53 struct dsa_switch *ds = dp->ds; in dsa_port_fast_age() local
55 if (!ds->ops->port_fast_age) in dsa_port_fast_age()
58 ds->ops->port_fast_age(ds, dp->index); in dsa_port_fast_age()
68 struct dsa_switch *ds = dp->ds; in dsa_port_can_configure_learning() local
71 if (!ds->ops->port_bridge_flags || !ds->ops->port_pre_bridge_flags) in dsa_port_can_configure_learning()
74 err = ds->ops->port_pre_bridge_flags(ds, dp->index, flags, NULL); in dsa_port_can_configure_learning()
80 struct dsa_switch *ds = dp->ds; in dsa_port_set_state() local
83 if (!ds->ops->port_stp_state_set) in dsa_port_set_state()
86 ds->ops->port_stp_state_set(ds, port, state); in dsa_port_set_state()
123 struct dsa_switch *ds = dp->ds; in dsa_port_enable_rt() local
127 if (ds->ops->port_enable) { in dsa_port_enable_rt()
128 err = ds->ops->port_enable(ds, port, phy); in dsa_port_enable_rt()
155 struct dsa_switch *ds = dp->ds; in dsa_port_disable_rt() local
164 if (ds->ops->port_disable) in dsa_port_disable_rt()
165 ds->ops->port_disable(ds, port); in dsa_port_disable_rt()
214 dev_err(dp->ds->dev, in dsa_port_clear_brport_flags()
277 struct dsa_switch *ds = dp->ds; in dsa_port_bridge_tx_fwd_unoffload() local
280 if (!ds->ops->port_bridge_tx_fwd_unoffload || dp->bridge_num == -1) in dsa_port_bridge_tx_fwd_unoffload()
290 ds->ops->port_bridge_tx_fwd_unoffload(ds, dp->index, bridge_dev, in dsa_port_bridge_tx_fwd_unoffload()
297 struct dsa_switch *ds = dp->ds; in dsa_port_bridge_tx_fwd_offload() local
300 if (!ds->ops->port_bridge_tx_fwd_offload) in dsa_port_bridge_tx_fwd_offload()
304 ds->num_fwd_offloading_bridges); in dsa_port_bridge_tx_fwd_offload()
311 err = ds->ops->port_bridge_tx_fwd_offload(ds, dp->index, bridge_dev, in dsa_port_bridge_tx_fwd_offload()
325 .tree_index = dp->ds->dst->index, in dsa_port_bridge_join()
326 .sw_index = dp->ds->index, in dsa_port_bridge_join()
390 .tree_index = dp->ds->dst->index, in dsa_port_bridge_leave()
391 .sw_index = dp->ds->index, in dsa_port_bridge_leave()
406 dev_err(dp->ds->dev, in dsa_port_bridge_leave()
417 .sw_index = dp->ds->index, in dsa_port_lag_change()
445 .sw_index = dp->ds->index, in dsa_port_lag_join()
453 dsa_lag_map(dp->ds->dst, lag); in dsa_port_lag_join()
474 dsa_lag_unmap(dp->ds->dst, lag); in dsa_port_lag_join()
487 .sw_index = dp->ds->index, in dsa_port_lag_leave()
507 dev_err(dp->ds->dev, in dsa_port_lag_leave()
511 dsa_lag_unmap(dp->ds->dst, lag); in dsa_port_lag_leave()
519 struct dsa_switch *ds = dp->ds; in dsa_port_can_apply_vlan_filtering() local
555 if (!ds->vlan_filtering_is_global) in dsa_port_can_apply_vlan_filtering()
563 dsa_switch_for_each_port(other_dp, ds) { in dsa_port_can_apply_vlan_filtering()
587 struct dsa_switch *ds = dp->ds; in dsa_port_vlan_filtering() local
591 if (!ds->ops->port_vlan_filtering) in dsa_port_vlan_filtering()
607 err = ds->ops->port_vlan_filtering(ds, dp->index, vlan_filtering, in dsa_port_vlan_filtering()
612 if (ds->vlan_filtering_is_global) { in dsa_port_vlan_filtering()
615 ds->vlan_filtering = vlan_filtering; in dsa_port_vlan_filtering()
617 dsa_switch_for_each_user_port(other_dp, ds) { in dsa_port_vlan_filtering()
643 ds->ops->port_vlan_filtering(ds, dp->index, old_vlan_filtering, NULL); in dsa_port_vlan_filtering()
645 if (ds->vlan_filtering_is_global) in dsa_port_vlan_filtering()
646 ds->vlan_filtering = old_vlan_filtering; in dsa_port_vlan_filtering()
658 struct dsa_switch *ds = dp->ds; in dsa_port_skip_vlan_configuration() local
663 return (!ds->configure_vlan_while_not_filtering && in dsa_port_skip_vlan_configuration()
689 struct dsa_switch *ds = dp->ds; in dsa_port_pre_bridge_flags() local
691 if (!ds->ops->port_pre_bridge_flags) in dsa_port_pre_bridge_flags()
694 return ds->ops->port_pre_bridge_flags(ds, dp->index, flags, extack); in dsa_port_pre_bridge_flags()
701 struct dsa_switch *ds = dp->ds; in dsa_port_bridge_flags() local
704 if (!ds->ops->port_bridge_flags) in dsa_port_bridge_flags()
707 err = ds->ops->port_bridge_flags(ds, dp->index, flags, extack); in dsa_port_bridge_flags()
732 .sw_index = dp->ds->index, in dsa_port_mtu_change()
745 .sw_index = dp->ds->index, in dsa_port_fdb_add()
758 .sw_index = dp->ds->index, in dsa_port_fdb_del()
772 .sw_index = dp->ds->index, in dsa_port_host_fdb_add()
791 .sw_index = dp->ds->index, in dsa_port_host_fdb_del()
808 struct dsa_switch *ds = dp->ds; in dsa_port_fdb_dump() local
811 if (!ds->ops->port_fdb_dump) in dsa_port_fdb_dump()
814 return ds->ops->port_fdb_dump(ds, port, cb, data); in dsa_port_fdb_dump()
821 .sw_index = dp->ds->index, in dsa_port_mdb_add()
833 .sw_index = dp->ds->index, in dsa_port_mdb_del()
845 .sw_index = dp->ds->index, in dsa_port_host_mdb_add()
863 .sw_index = dp->ds->index, in dsa_port_host_mdb_del()
882 .sw_index = dp->ds->index, in dsa_port_vlan_add()
895 .sw_index = dp->ds->index, in dsa_port_vlan_del()
907 .sw_index = dp->ds->index, in dsa_port_mrp_add()
919 .sw_index = dp->ds->index, in dsa_port_mrp_del()
931 .sw_index = dp->ds->index, in dsa_port_mrp_add_ring_role()
943 .sw_index = dp->ds->index, in dsa_port_mrp_del_ring_role()
982 struct dsa_switch *ds = dp->ds; in dsa_port_phylink_validate() local
984 if (!ds->ops->phylink_validate) in dsa_port_phylink_validate()
987 ds->ops->phylink_validate(ds, dp->index, supported, state); in dsa_port_phylink_validate()
994 struct dsa_switch *ds = dp->ds; in dsa_port_phylink_mac_pcs_get_state() local
998 if (!ds->ops->phylink_mac_link_state) { in dsa_port_phylink_mac_pcs_get_state()
1003 err = ds->ops->phylink_mac_link_state(ds, dp->index, state); in dsa_port_phylink_mac_pcs_get_state()
1005 dev_err(ds->dev, "p%d: phylink_mac_link_state() failed: %d\n", in dsa_port_phylink_mac_pcs_get_state()
1016 struct dsa_switch *ds = dp->ds; in dsa_port_phylink_mac_config() local
1018 if (!ds->ops->phylink_mac_config) in dsa_port_phylink_mac_config()
1021 ds->ops->phylink_mac_config(ds, dp->index, mode, state); in dsa_port_phylink_mac_config()
1027 struct dsa_switch *ds = dp->ds; in dsa_port_phylink_mac_an_restart() local
1029 if (!ds->ops->phylink_mac_an_restart) in dsa_port_phylink_mac_an_restart()
1032 ds->ops->phylink_mac_an_restart(ds, dp->index); in dsa_port_phylink_mac_an_restart()
1041 struct dsa_switch *ds = dp->ds; in dsa_port_phylink_mac_link_down() local
1046 if (!ds->ops->phylink_mac_link_down) { in dsa_port_phylink_mac_link_down()
1047 if (ds->ops->adjust_link && phydev) in dsa_port_phylink_mac_link_down()
1048 ds->ops->adjust_link(ds, dp->index, phydev); in dsa_port_phylink_mac_link_down()
1052 ds->ops->phylink_mac_link_down(ds, dp->index, mode, interface); in dsa_port_phylink_mac_link_down()
1063 struct dsa_switch *ds = dp->ds; in dsa_port_phylink_mac_link_up() local
1065 if (!ds->ops->phylink_mac_link_up) { in dsa_port_phylink_mac_link_up()
1066 if (ds->ops->adjust_link && phydev) in dsa_port_phylink_mac_link_up()
1067 ds->ops->adjust_link(ds, dp->index, phydev); in dsa_port_phylink_mac_link_up()
1071 ds->ops->phylink_mac_link_up(ds, dp->index, mode, interface, phydev, in dsa_port_phylink_mac_link_up()
1086 struct dsa_switch *ds = dp->ds; in dsa_port_setup_phy_of() local
1112 if (ds->ops->adjust_link) in dsa_port_setup_phy_of()
1113 ds->ops->adjust_link(ds, port, phydev); in dsa_port_setup_phy_of()
1115 dev_dbg(ds->dev, "enabled port's phy: %s", phydev_name(phydev)); in dsa_port_setup_phy_of()
1125 struct dsa_switch *ds = dp->ds; in dsa_port_fixed_link_register_of() local
1133 dev_err(ds->dev, in dsa_port_fixed_link_register_of()
1148 if (ds->ops->adjust_link) in dsa_port_fixed_link_register_of()
1149 ds->ops->adjust_link(ds, port, phydev); in dsa_port_fixed_link_register_of()
1158 struct dsa_switch *ds = dp->ds; in dsa_port_phylink_register() local
1167 dp->pl_config.dev = ds->dev; in dsa_port_phylink_register()
1169 dp->pl_config.pcs_poll = ds->pcs_poll; in dsa_port_phylink_register()
1171 if (ds->ops->phylink_get_interfaces) in dsa_port_phylink_register()
1172 ds->ops->phylink_get_interfaces(ds, dp->index, in dsa_port_phylink_register()
1197 struct dsa_switch *ds = dp->ds; in dsa_port_link_register_of() local
1201 if (!ds->ops->adjust_link) { in dsa_port_link_register_of()
1204 if (ds->ops->phylink_mac_link_down) in dsa_port_link_register_of()
1205 ds->ops->phylink_mac_link_down(ds, port, in dsa_port_link_register_of()
1212 dev_warn(ds->dev, in dsa_port_link_register_of()
1223 struct dsa_switch *ds = dp->ds; in dsa_port_link_unregister_of() local
1225 if (!ds->ops->adjust_link && dp->pl) { in dsa_port_link_unregister_of()
1300 .sw_index = dp->ds->index, in dsa_port_hsr_join()
1318 .sw_index = dp->ds->index, in dsa_port_hsr_leave()
1328 dev_err(dp->ds->dev, in dsa_port_hsr_leave()
1336 .tree_index = dp->ds->dst->index, in dsa_port_tag_8021q_vlan_add()
1337 .sw_index = dp->ds->index, in dsa_port_tag_8021q_vlan_add()
1351 .tree_index = dp->ds->dst->index, in dsa_port_tag_8021q_vlan_del()
1352 .sw_index = dp->ds->index, in dsa_port_tag_8021q_vlan_del()
1363 dev_err(dp->ds->dev, in dsa_port_tag_8021q_vlan_del()