Lines Matching refs:ds
45 static int felix_cpu_port_for_master(struct dsa_switch *ds, in felix_cpu_port_for_master() argument
48 struct ocelot *ocelot = ds->priv; in felix_cpu_port_for_master()
67 static int felix_tag_8021q_vlan_add_rx(struct dsa_switch *ds, int port, in felix_tag_8021q_vlan_add_rx() argument
71 struct ocelot *ocelot = ds->priv; in felix_tag_8021q_vlan_add_rx()
107 static int felix_tag_8021q_vlan_del_rx(struct dsa_switch *ds, int port, in felix_tag_8021q_vlan_del_rx() argument
112 struct ocelot *ocelot = ds->priv; in felix_tag_8021q_vlan_del_rx()
129 static int felix_tag_8021q_vlan_add_tx(struct dsa_switch *ds, int port, in felix_tag_8021q_vlan_add_tx() argument
133 unsigned long cpu_ports = dsa_cpu_ports(ds); in felix_tag_8021q_vlan_add_tx()
134 struct ocelot *ocelot = ds->priv; in felix_tag_8021q_vlan_add_tx()
196 static int felix_tag_8021q_vlan_del_tx(struct dsa_switch *ds, int port, u16 vid) in felix_tag_8021q_vlan_del_tx() argument
201 struct ocelot *ocelot = ds->priv; in felix_tag_8021q_vlan_del_tx()
227 static int felix_tag_8021q_vlan_add(struct dsa_switch *ds, int port, u16 vid, in felix_tag_8021q_vlan_add() argument
237 if (!dsa_is_user_port(ds, port)) in felix_tag_8021q_vlan_add()
240 dsa_switch_for_each_cpu_port(cpu_dp, ds) { in felix_tag_8021q_vlan_add()
241 err = felix_tag_8021q_vlan_add_rx(ds, port, cpu_dp->index, vid); in felix_tag_8021q_vlan_add()
246 err = felix_tag_8021q_vlan_add_tx(ds, port, vid); in felix_tag_8021q_vlan_add()
253 dsa_switch_for_each_cpu_port(cpu_dp, ds) in felix_tag_8021q_vlan_add()
254 felix_tag_8021q_vlan_del_rx(ds, port, cpu_dp->index, vid); in felix_tag_8021q_vlan_add()
259 static int felix_tag_8021q_vlan_del(struct dsa_switch *ds, int port, u16 vid) in felix_tag_8021q_vlan_del() argument
264 if (!dsa_is_user_port(ds, port)) in felix_tag_8021q_vlan_del()
267 dsa_switch_for_each_cpu_port(cpu_dp, ds) { in felix_tag_8021q_vlan_del()
268 err = felix_tag_8021q_vlan_del_rx(ds, port, cpu_dp->index, vid); in felix_tag_8021q_vlan_del()
273 err = felix_tag_8021q_vlan_del_tx(ds, port, vid); in felix_tag_8021q_vlan_del()
280 dsa_switch_for_each_cpu_port(cpu_dp, ds) in felix_tag_8021q_vlan_del()
281 felix_tag_8021q_vlan_add_rx(ds, port, cpu_dp->index, vid); in felix_tag_8021q_vlan_del()
286 static int felix_trap_get_cpu_port(struct dsa_switch *ds, in felix_trap_get_cpu_port() argument
296 dp = dsa_to_port(ds, first_port); in felix_trap_get_cpu_port()
305 static int felix_update_trapping_destinations(struct dsa_switch *ds, in felix_update_trapping_destinations() argument
308 struct ocelot *ocelot = ds->priv; in felix_update_trapping_destinations()
337 port_mask = BIT(felix_trap_get_cpu_port(ds, trap)); in felix_update_trapping_destinations()
408 static int felix_tag_npi_setup(struct dsa_switch *ds) in felix_tag_npi_setup() argument
411 struct ocelot *ocelot = ds->priv; in felix_tag_npi_setup()
413 dsa_switch_for_each_user_port(dp, ds) { in felix_tag_npi_setup()
415 dev_err(ds->dev, "Multiple NPI ports not supported\n"); in felix_tag_npi_setup()
430 static void felix_tag_npi_teardown(struct dsa_switch *ds) in felix_tag_npi_teardown() argument
432 struct ocelot *ocelot = ds->priv; in felix_tag_npi_teardown()
437 static unsigned long felix_tag_npi_get_host_fwd_mask(struct dsa_switch *ds) in felix_tag_npi_get_host_fwd_mask() argument
439 struct ocelot *ocelot = ds->priv; in felix_tag_npi_get_host_fwd_mask()
444 static int felix_tag_npi_change_master(struct dsa_switch *ds, int port, in felix_tag_npi_change_master() argument
448 struct dsa_port *dp = dsa_to_port(ds, port), *other_dp; in felix_tag_npi_change_master()
449 struct ocelot *ocelot = ds->priv; in felix_tag_npi_change_master()
461 dsa_switch_for_each_user_port(other_dp, ds) { in felix_tag_npi_change_master()
473 felix_npi_port_init(ocelot, felix_cpu_port_for_master(ds, master)); in felix_tag_npi_change_master()
492 static int felix_tag_8021q_setup(struct dsa_switch *ds) in felix_tag_8021q_setup() argument
494 struct ocelot *ocelot = ds->priv; in felix_tag_8021q_setup()
498 err = dsa_tag_8021q_register(ds, htons(ETH_P_8021AD)); in felix_tag_8021q_setup()
502 dsa_switch_for_each_cpu_port(dp, ds) in felix_tag_8021q_setup()
505 dsa_switch_for_each_user_port(dp, ds) in felix_tag_8021q_setup()
509 dsa_switch_for_each_available_port(dp, ds) in felix_tag_8021q_setup()
536 static void felix_tag_8021q_teardown(struct dsa_switch *ds) in felix_tag_8021q_teardown() argument
538 struct ocelot *ocelot = ds->priv; in felix_tag_8021q_teardown()
541 dsa_switch_for_each_available_port(dp, ds) in felix_tag_8021q_teardown()
550 dsa_switch_for_each_user_port(dp, ds) in felix_tag_8021q_teardown()
553 dsa_switch_for_each_cpu_port(dp, ds) in felix_tag_8021q_teardown()
556 dsa_tag_8021q_unregister(ds); in felix_tag_8021q_teardown()
559 static unsigned long felix_tag_8021q_get_host_fwd_mask(struct dsa_switch *ds) in felix_tag_8021q_get_host_fwd_mask() argument
561 return dsa_cpu_ports(ds); in felix_tag_8021q_get_host_fwd_mask()
564 static int felix_tag_8021q_change_master(struct dsa_switch *ds, int port, in felix_tag_8021q_change_master() argument
568 int cpu = felix_cpu_port_for_master(ds, master); in felix_tag_8021q_change_master()
569 struct ocelot *ocelot = ds->priv; in felix_tag_8021q_change_master()
574 return felix_update_trapping_destinations(ds, true); in felix_tag_8021q_change_master()
584 static void felix_set_host_flood(struct dsa_switch *ds, unsigned long mask, in felix_set_host_flood() argument
587 struct ocelot *ocelot = ds->priv; in felix_set_host_flood()
603 felix_migrate_host_flood(struct dsa_switch *ds, in felix_migrate_host_flood() argument
607 struct ocelot *ocelot = ds->priv; in felix_migrate_host_flood()
612 mask = old_proto_ops->get_host_fwd_mask(ds); in felix_migrate_host_flood()
613 felix_set_host_flood(ds, mask, false, false, false); in felix_migrate_host_flood()
616 mask = proto_ops->get_host_fwd_mask(ds); in felix_migrate_host_flood()
617 felix_set_host_flood(ds, mask, !!felix->host_flood_uc_mask, in felix_migrate_host_flood()
621 static int felix_migrate_mdbs(struct dsa_switch *ds, in felix_migrate_mdbs() argument
625 struct ocelot *ocelot = ds->priv; in felix_migrate_mdbs()
631 from = old_proto_ops->get_host_fwd_mask(ds); in felix_migrate_mdbs()
632 to = proto_ops->get_host_fwd_mask(ds); in felix_migrate_mdbs()
643 felix_tag_proto_setup_shared(struct dsa_switch *ds, in felix_tag_proto_setup_shared() argument
650 err = felix_migrate_mdbs(ds, proto_ops, old_proto_ops); in felix_tag_proto_setup_shared()
654 felix_update_trapping_destinations(ds, using_tag_8021q); in felix_tag_proto_setup_shared()
656 felix_migrate_host_flood(ds, proto_ops, old_proto_ops); in felix_tag_proto_setup_shared()
665 static int felix_change_tag_protocol(struct dsa_switch *ds, in felix_change_tag_protocol() argument
669 struct ocelot *ocelot = ds->priv; in felix_change_tag_protocol()
690 err = proto_ops->setup(ds); in felix_change_tag_protocol()
694 err = felix_tag_proto_setup_shared(ds, proto_ops, old_proto_ops); in felix_change_tag_protocol()
699 old_proto_ops->teardown(ds); in felix_change_tag_protocol()
707 proto_ops->teardown(ds); in felix_change_tag_protocol()
712 static enum dsa_tag_protocol felix_get_tag_protocol(struct dsa_switch *ds, in felix_get_tag_protocol() argument
716 struct ocelot *ocelot = ds->priv; in felix_get_tag_protocol()
722 static void felix_port_set_host_flood(struct dsa_switch *ds, int port, in felix_port_set_host_flood() argument
725 struct ocelot *ocelot = ds->priv; in felix_port_set_host_flood()
739 mask = felix->tag_proto_ops->get_host_fwd_mask(ds); in felix_port_set_host_flood()
740 felix_set_host_flood(ds, mask, !!felix->host_flood_uc_mask, in felix_port_set_host_flood()
744 static int felix_port_change_master(struct dsa_switch *ds, int port, in felix_port_change_master() argument
748 struct ocelot *ocelot = ds->priv; in felix_port_change_master()
751 return felix->tag_proto_ops->change_master(ds, port, master, extack); in felix_port_change_master()
754 static int felix_set_ageing_time(struct dsa_switch *ds, in felix_set_ageing_time() argument
757 struct ocelot *ocelot = ds->priv; in felix_set_ageing_time()
764 static void felix_port_fast_age(struct dsa_switch *ds, int port) in felix_port_fast_age() argument
766 struct ocelot *ocelot = ds->priv; in felix_port_fast_age()
771 dev_err(ds->dev, "Flushing MAC table on port %d returned %pe\n", in felix_port_fast_age()
775 static int felix_fdb_dump(struct dsa_switch *ds, int port, in felix_fdb_dump() argument
778 struct ocelot *ocelot = ds->priv; in felix_fdb_dump()
783 static int felix_fdb_add(struct dsa_switch *ds, int port, in felix_fdb_add() argument
788 struct dsa_port *dp = dsa_to_port(ds, port); in felix_fdb_add()
789 struct ocelot *ocelot = ds->priv; in felix_fdb_add()
795 dsa_fdb_present_in_other_db(ds, port, addr, vid, db)) in felix_fdb_add()
804 static int felix_fdb_del(struct dsa_switch *ds, int port, in felix_fdb_del() argument
809 struct dsa_port *dp = dsa_to_port(ds, port); in felix_fdb_del()
810 struct ocelot *ocelot = ds->priv; in felix_fdb_del()
816 dsa_fdb_present_in_other_db(ds, port, addr, vid, db)) in felix_fdb_del()
825 static int felix_lag_fdb_add(struct dsa_switch *ds, struct dsa_lag lag, in felix_lag_fdb_add() argument
830 struct ocelot *ocelot = ds->priv; in felix_lag_fdb_add()
838 static int felix_lag_fdb_del(struct dsa_switch *ds, struct dsa_lag lag, in felix_lag_fdb_del() argument
843 struct ocelot *ocelot = ds->priv; in felix_lag_fdb_del()
851 static int felix_mdb_add(struct dsa_switch *ds, int port, in felix_mdb_add() argument
856 struct ocelot *ocelot = ds->priv; in felix_mdb_add()
861 if (dsa_is_cpu_port(ds, port) && !bridge_dev && in felix_mdb_add()
862 dsa_mdb_present_in_other_db(ds, port, mdb, db)) in felix_mdb_add()
871 static int felix_mdb_del(struct dsa_switch *ds, int port, in felix_mdb_del() argument
876 struct ocelot *ocelot = ds->priv; in felix_mdb_del()
881 if (dsa_is_cpu_port(ds, port) && !bridge_dev && in felix_mdb_del()
882 dsa_mdb_present_in_other_db(ds, port, mdb, db)) in felix_mdb_del()
891 static void felix_bridge_stp_state_set(struct dsa_switch *ds, int port, in felix_bridge_stp_state_set() argument
894 struct ocelot *ocelot = ds->priv; in felix_bridge_stp_state_set()
899 static int felix_pre_bridge_flags(struct dsa_switch *ds, int port, in felix_pre_bridge_flags() argument
903 struct ocelot *ocelot = ds->priv; in felix_pre_bridge_flags()
908 static int felix_bridge_flags(struct dsa_switch *ds, int port, in felix_bridge_flags() argument
912 struct ocelot *ocelot = ds->priv; in felix_bridge_flags()
922 static int felix_bridge_join(struct dsa_switch *ds, int port, in felix_bridge_join() argument
926 struct ocelot *ocelot = ds->priv; in felix_bridge_join()
932 static void felix_bridge_leave(struct dsa_switch *ds, int port, in felix_bridge_leave() argument
935 struct ocelot *ocelot = ds->priv; in felix_bridge_leave()
940 static int felix_lag_join(struct dsa_switch *ds, int port, in felix_lag_join() argument
945 struct ocelot *ocelot = ds->priv; in felix_lag_join()
953 if (!dsa_is_cpu_port(ds, port)) in felix_lag_join()
956 return felix_port_change_master(ds, port, lag.dev, extack); in felix_lag_join()
959 static int felix_lag_leave(struct dsa_switch *ds, int port, in felix_lag_leave() argument
962 struct ocelot *ocelot = ds->priv; in felix_lag_leave()
967 if (!dsa_is_cpu_port(ds, port)) in felix_lag_leave()
970 return felix_port_change_master(ds, port, lag.dev, NULL); in felix_lag_leave()
973 static int felix_lag_change(struct dsa_switch *ds, int port) in felix_lag_change() argument
975 struct dsa_port *dp = dsa_to_port(ds, port); in felix_lag_change()
976 struct ocelot *ocelot = ds->priv; in felix_lag_change()
983 static int felix_vlan_prepare(struct dsa_switch *ds, int port, in felix_vlan_prepare() argument
987 struct ocelot *ocelot = ds->priv; in felix_vlan_prepare()
1007 static int felix_vlan_filtering(struct dsa_switch *ds, int port, bool enabled, in felix_vlan_filtering() argument
1010 struct ocelot *ocelot = ds->priv; in felix_vlan_filtering()
1015 static int felix_vlan_add(struct dsa_switch *ds, int port, in felix_vlan_add() argument
1019 struct ocelot *ocelot = ds->priv; in felix_vlan_add()
1023 err = felix_vlan_prepare(ds, port, vlan, extack); in felix_vlan_add()
1032 static int felix_vlan_del(struct dsa_switch *ds, int port, in felix_vlan_del() argument
1035 struct ocelot *ocelot = ds->priv; in felix_vlan_del()
1040 static void felix_phylink_get_caps(struct dsa_switch *ds, int port, in felix_phylink_get_caps() argument
1043 struct ocelot *ocelot = ds->priv; in felix_phylink_get_caps()
1055 static void felix_phylink_validate(struct dsa_switch *ds, int port, in felix_phylink_validate() argument
1059 struct ocelot *ocelot = ds->priv; in felix_phylink_validate()
1066 static struct phylink_pcs *felix_phylink_mac_select_pcs(struct dsa_switch *ds, in felix_phylink_mac_select_pcs() argument
1070 struct ocelot *ocelot = ds->priv; in felix_phylink_mac_select_pcs()
1080 static void felix_phylink_mac_link_down(struct dsa_switch *ds, int port, in felix_phylink_mac_link_down() argument
1084 struct ocelot *ocelot = ds->priv; in felix_phylink_mac_link_down()
1090 static void felix_phylink_mac_link_up(struct dsa_switch *ds, int port, in felix_phylink_mac_link_up() argument
1097 struct ocelot *ocelot = ds->priv; in felix_phylink_mac_link_up()
1108 static int felix_port_enable(struct dsa_switch *ds, int port, in felix_port_enable() argument
1111 struct dsa_port *dp = dsa_to_port(ds, port); in felix_port_enable()
1112 struct ocelot *ocelot = ds->priv; in felix_port_enable()
1120 if (felix_cpu_port_for_master(ds, master) != ocelot->npi) { in felix_port_enable()
1121 dev_err(ds->dev, "Multiple masters are not allowed\n"); in felix_port_enable()
1150 static void felix_get_stats64(struct dsa_switch *ds, int port, in felix_get_stats64() argument
1153 struct ocelot *ocelot = ds->priv; in felix_get_stats64()
1158 static void felix_get_pause_stats(struct dsa_switch *ds, int port, in felix_get_pause_stats() argument
1161 struct ocelot *ocelot = ds->priv; in felix_get_pause_stats()
1166 static void felix_get_rmon_stats(struct dsa_switch *ds, int port, in felix_get_rmon_stats() argument
1170 struct ocelot *ocelot = ds->priv; in felix_get_rmon_stats()
1175 static void felix_get_eth_ctrl_stats(struct dsa_switch *ds, int port, in felix_get_eth_ctrl_stats() argument
1178 struct ocelot *ocelot = ds->priv; in felix_get_eth_ctrl_stats()
1183 static void felix_get_eth_mac_stats(struct dsa_switch *ds, int port, in felix_get_eth_mac_stats() argument
1186 struct ocelot *ocelot = ds->priv; in felix_get_eth_mac_stats()
1191 static void felix_get_eth_phy_stats(struct dsa_switch *ds, int port, in felix_get_eth_phy_stats() argument
1194 struct ocelot *ocelot = ds->priv; in felix_get_eth_phy_stats()
1199 static void felix_get_strings(struct dsa_switch *ds, int port, in felix_get_strings() argument
1202 struct ocelot *ocelot = ds->priv; in felix_get_strings()
1207 static void felix_get_ethtool_stats(struct dsa_switch *ds, int port, u64 *data) in felix_get_ethtool_stats() argument
1209 struct ocelot *ocelot = ds->priv; in felix_get_ethtool_stats()
1214 static int felix_get_sset_count(struct dsa_switch *ds, int port, int sset) in felix_get_sset_count() argument
1216 struct ocelot *ocelot = ds->priv; in felix_get_sset_count()
1221 static int felix_get_ts_info(struct dsa_switch *ds, int port, in felix_get_ts_info() argument
1224 struct ocelot *ocelot = ds->priv; in felix_get_ts_info()
1383 ocelot->devlink = felix->ds->devlink; in felix_init_structs()
1489 struct dsa_switch *ds = xmit_work->dp->ds; in felix_port_deferred_xmit() local
1492 struct ocelot *ocelot = ds->priv; in felix_port_deferred_xmit()
1517 static int felix_connect_tag_protocol(struct dsa_switch *ds, in felix_connect_tag_protocol() argument
1524 tagger_data = ocelot_8021q_tagger_data(ds); in felix_connect_tag_protocol()
1540 static int felix_setup(struct dsa_switch *ds) in felix_setup() argument
1542 struct ocelot *ocelot = ds->priv; in felix_setup()
1547 err = felix_init_structs(felix, ds->num_ports); in felix_setup()
1564 dsa_switch_for_each_available_port(dp, ds) { in felix_setup()
1580 felix_change_tag_protocol(ds, felix->tag_proto); in felix_setup()
1582 ds->mtu_enforcement_ingress = true; in felix_setup()
1583 ds->assisted_learning_on_cpu_port = true; in felix_setup()
1584 ds->fdb_isolation = true; in felix_setup()
1585 ds->max_num_bridges = ds->num_ports; in felix_setup()
1590 dsa_switch_for_each_available_port(dp, ds) in felix_setup()
1603 static void felix_teardown(struct dsa_switch *ds) in felix_teardown() argument
1605 struct ocelot *ocelot = ds->priv; in felix_teardown()
1610 felix->tag_proto_ops->teardown(ds); in felix_teardown()
1612 dsa_switch_for_each_available_port(dp, ds) in felix_teardown()
1623 static int felix_hwtstamp_get(struct dsa_switch *ds, int port, in felix_hwtstamp_get() argument
1626 struct ocelot *ocelot = ds->priv; in felix_hwtstamp_get()
1631 static int felix_hwtstamp_set(struct dsa_switch *ds, int port, in felix_hwtstamp_set() argument
1634 struct ocelot *ocelot = ds->priv; in felix_hwtstamp_set()
1645 return felix_update_trapping_destinations(ds, using_tag_8021q); in felix_hwtstamp_set()
1698 static bool felix_rxtstamp(struct dsa_switch *ds, int port, in felix_rxtstamp() argument
1703 struct ocelot *ocelot = ds->priv; in felix_rxtstamp()
1733 static void felix_txtstamp(struct dsa_switch *ds, int port, in felix_txtstamp() argument
1736 struct ocelot *ocelot = ds->priv; in felix_txtstamp()
1743 dev_err_ratelimited(ds->dev, in felix_txtstamp()
1753 static int felix_change_mtu(struct dsa_switch *ds, int port, int new_mtu) in felix_change_mtu() argument
1755 struct ocelot *ocelot = ds->priv; in felix_change_mtu()
1771 static int felix_get_max_mtu(struct dsa_switch *ds, int port) in felix_get_max_mtu() argument
1773 struct ocelot *ocelot = ds->priv; in felix_get_max_mtu()
1778 static int felix_cls_flower_add(struct dsa_switch *ds, int port, in felix_cls_flower_add() argument
1781 struct ocelot *ocelot = ds->priv; in felix_cls_flower_add()
1792 return felix_update_trapping_destinations(ds, using_tag_8021q); in felix_cls_flower_add()
1795 static int felix_cls_flower_del(struct dsa_switch *ds, int port, in felix_cls_flower_del() argument
1798 struct ocelot *ocelot = ds->priv; in felix_cls_flower_del()
1803 static int felix_cls_flower_stats(struct dsa_switch *ds, int port, in felix_cls_flower_stats() argument
1806 struct ocelot *ocelot = ds->priv; in felix_cls_flower_stats()
1811 static int felix_port_policer_add(struct dsa_switch *ds, int port, in felix_port_policer_add() argument
1814 struct ocelot *ocelot = ds->priv; in felix_port_policer_add()
1823 static void felix_port_policer_del(struct dsa_switch *ds, int port) in felix_port_policer_del() argument
1825 struct ocelot *ocelot = ds->priv; in felix_port_policer_del()
1830 static int felix_port_mirror_add(struct dsa_switch *ds, int port, in felix_port_mirror_add() argument
1834 struct ocelot *ocelot = ds->priv; in felix_port_mirror_add()
1840 static void felix_port_mirror_del(struct dsa_switch *ds, int port, in felix_port_mirror_del() argument
1843 struct ocelot *ocelot = ds->priv; in felix_port_mirror_del()
1848 static int felix_port_setup_tc(struct dsa_switch *ds, int port, in felix_port_setup_tc() argument
1852 struct ocelot *ocelot = ds->priv; in felix_port_setup_tc()
1856 return felix->info->port_setup_tc(ds, port, type, type_data); in felix_port_setup_tc()
1861 static int felix_sb_pool_get(struct dsa_switch *ds, unsigned int sb_index, in felix_sb_pool_get() argument
1865 struct ocelot *ocelot = ds->priv; in felix_sb_pool_get()
1870 static int felix_sb_pool_set(struct dsa_switch *ds, unsigned int sb_index, in felix_sb_pool_set() argument
1875 struct ocelot *ocelot = ds->priv; in felix_sb_pool_set()
1881 static int felix_sb_port_pool_get(struct dsa_switch *ds, int port, in felix_sb_port_pool_get() argument
1885 struct ocelot *ocelot = ds->priv; in felix_sb_port_pool_get()
1891 static int felix_sb_port_pool_set(struct dsa_switch *ds, int port, in felix_sb_port_pool_set() argument
1895 struct ocelot *ocelot = ds->priv; in felix_sb_port_pool_set()
1901 static int felix_sb_tc_pool_bind_get(struct dsa_switch *ds, int port, in felix_sb_tc_pool_bind_get() argument
1906 struct ocelot *ocelot = ds->priv; in felix_sb_tc_pool_bind_get()
1913 static int felix_sb_tc_pool_bind_set(struct dsa_switch *ds, int port, in felix_sb_tc_pool_bind_set() argument
1919 struct ocelot *ocelot = ds->priv; in felix_sb_tc_pool_bind_set()
1926 static int felix_sb_occ_snapshot(struct dsa_switch *ds, in felix_sb_occ_snapshot() argument
1929 struct ocelot *ocelot = ds->priv; in felix_sb_occ_snapshot()
1934 static int felix_sb_occ_max_clear(struct dsa_switch *ds, in felix_sb_occ_max_clear() argument
1937 struct ocelot *ocelot = ds->priv; in felix_sb_occ_max_clear()
1942 static int felix_sb_occ_port_pool_get(struct dsa_switch *ds, int port, in felix_sb_occ_port_pool_get() argument
1946 struct ocelot *ocelot = ds->priv; in felix_sb_occ_port_pool_get()
1952 static int felix_sb_occ_tc_port_bind_get(struct dsa_switch *ds, int port, in felix_sb_occ_tc_port_bind_get() argument
1957 struct ocelot *ocelot = ds->priv; in felix_sb_occ_tc_port_bind_get()
1963 static int felix_mrp_add(struct dsa_switch *ds, int port, in felix_mrp_add() argument
1966 struct ocelot *ocelot = ds->priv; in felix_mrp_add()
1971 static int felix_mrp_del(struct dsa_switch *ds, int port, in felix_mrp_del() argument
1974 struct ocelot *ocelot = ds->priv; in felix_mrp_del()
1980 felix_mrp_add_ring_role(struct dsa_switch *ds, int port, in felix_mrp_add_ring_role() argument
1983 struct ocelot *ocelot = ds->priv; in felix_mrp_add_ring_role()
1989 felix_mrp_del_ring_role(struct dsa_switch *ds, int port, in felix_mrp_del_ring_role() argument
1992 struct ocelot *ocelot = ds->priv; in felix_mrp_del_ring_role()
1997 static int felix_port_get_default_prio(struct dsa_switch *ds, int port) in felix_port_get_default_prio() argument
1999 struct ocelot *ocelot = ds->priv; in felix_port_get_default_prio()
2004 static int felix_port_set_default_prio(struct dsa_switch *ds, int port, in felix_port_set_default_prio() argument
2007 struct ocelot *ocelot = ds->priv; in felix_port_set_default_prio()
2012 static int felix_port_get_dscp_prio(struct dsa_switch *ds, int port, u8 dscp) in felix_port_get_dscp_prio() argument
2014 struct ocelot *ocelot = ds->priv; in felix_port_get_dscp_prio()
2019 static int felix_port_add_dscp_prio(struct dsa_switch *ds, int port, u8 dscp, in felix_port_add_dscp_prio() argument
2022 struct ocelot *ocelot = ds->priv; in felix_port_add_dscp_prio()
2027 static int felix_port_del_dscp_prio(struct dsa_switch *ds, int port, u8 dscp, in felix_port_del_dscp_prio() argument
2030 struct ocelot *ocelot = ds->priv; in felix_port_del_dscp_prio()
2119 struct dsa_switch *ds = felix->ds; in felix_port_to_netdev() local
2121 if (!dsa_is_user_port(ds, port)) in felix_port_to_netdev()
2124 return dsa_to_port(ds, port)->slave; in felix_port_to_netdev()