Lines Matching full:ds
240 static enum dsa_tag_protocol hellcreek_get_tag_protocol(struct dsa_switch *ds, in hellcreek_get_tag_protocol() argument
247 static int hellcreek_port_enable(struct dsa_switch *ds, int port, in hellcreek_port_enable() argument
250 struct hellcreek *hellcreek = ds->priv; in hellcreek_port_enable()
271 static void hellcreek_port_disable(struct dsa_switch *ds, int port) in hellcreek_port_disable() argument
273 struct hellcreek *hellcreek = ds->priv; in hellcreek_port_disable()
292 static void hellcreek_get_strings(struct dsa_switch *ds, int port, in hellcreek_get_strings() argument
301 static int hellcreek_get_sset_count(struct dsa_switch *ds, int port, int sset) in hellcreek_get_sset_count() argument
309 static void hellcreek_get_ethtool_stats(struct dsa_switch *ds, int port, in hellcreek_get_ethtool_stats() argument
312 struct hellcreek *hellcreek = ds->priv; in hellcreek_get_ethtool_stats()
348 static int hellcreek_vlan_prepare(struct dsa_switch *ds, int port, in hellcreek_vlan_prepare() argument
352 struct hellcreek *hellcreek = ds->priv; in hellcreek_vlan_prepare()
364 if (!dsa_is_user_port(ds, i)) in hellcreek_vlan_prepare()
455 static int hellcreek_vlan_add(struct dsa_switch *ds, int port, in hellcreek_vlan_add() argument
461 struct hellcreek *hellcreek = ds->priv; in hellcreek_vlan_add()
464 err = hellcreek_vlan_prepare(ds, port, vlan, extack); in hellcreek_vlan_add()
477 static int hellcreek_vlan_del(struct dsa_switch *ds, int port, in hellcreek_vlan_del() argument
480 struct hellcreek *hellcreek = ds->priv; in hellcreek_vlan_del()
489 static void hellcreek_port_stp_state_set(struct dsa_switch *ds, int port, in hellcreek_port_stp_state_set() argument
492 struct hellcreek *hellcreek = ds->priv; in hellcreek_port_stp_state_set()
584 static void hellcreek_setup_vlan_membership(struct dsa_switch *ds, int port, in hellcreek_setup_vlan_membership() argument
588 int upstream = dsa_upstream_port(ds, port); in hellcreek_setup_vlan_membership()
589 struct hellcreek *hellcreek = ds->priv; in hellcreek_setup_vlan_membership()
654 static int hellcreek_pre_bridge_flags(struct dsa_switch *ds, int port, in hellcreek_pre_bridge_flags() argument
664 static int hellcreek_bridge_flags(struct dsa_switch *ds, int port, in hellcreek_bridge_flags() argument
668 struct hellcreek *hellcreek = ds->priv; in hellcreek_bridge_flags()
681 static int hellcreek_port_bridge_join(struct dsa_switch *ds, int port, in hellcreek_port_bridge_join() argument
686 struct hellcreek *hellcreek = ds->priv; in hellcreek_port_bridge_join()
691 if (!ds->vlan_filtering) in hellcreek_port_bridge_join()
695 hellcreek_setup_vlan_membership(ds, port, false); in hellcreek_port_bridge_join()
700 static void hellcreek_port_bridge_leave(struct dsa_switch *ds, int port, in hellcreek_port_bridge_leave() argument
703 struct hellcreek *hellcreek = ds->priv; in hellcreek_port_bridge_leave()
711 hellcreek_setup_vlan_membership(ds, port, true); in hellcreek_port_bridge_leave()
835 static int hellcreek_fdb_add(struct dsa_switch *ds, int port, in hellcreek_fdb_add() argument
840 struct hellcreek *hellcreek = ds->priv; in hellcreek_fdb_add()
881 static int hellcreek_fdb_del(struct dsa_switch *ds, int port, in hellcreek_fdb_del() argument
886 struct hellcreek *hellcreek = ds->priv; in hellcreek_fdb_del()
922 static int hellcreek_fdb_dump(struct dsa_switch *ds, int port, in hellcreek_fdb_dump() argument
925 struct hellcreek *hellcreek = ds->priv; in hellcreek_fdb_dump()
969 static int hellcreek_vlan_filtering(struct dsa_switch *ds, int port, in hellcreek_vlan_filtering() argument
973 struct hellcreek *hellcreek = ds->priv; in hellcreek_vlan_filtering()
982 * ds->vlan_filtering_is_global. in hellcreek_vlan_filtering()
1169 static int hellcreek_devlink_info_get(struct dsa_switch *ds, in hellcreek_devlink_info_get() argument
1173 struct hellcreek *hellcreek = ds->priv; in hellcreek_devlink_info_get()
1210 static int hellcreek_setup_devlink_resources(struct dsa_switch *ds) in hellcreek_setup_devlink_resources() argument
1214 struct hellcreek *hellcreek = ds->priv; in hellcreek_setup_devlink_resources()
1226 err = dsa_devlink_resource_register(ds, "VLAN", VLAN_N_VID, in hellcreek_setup_devlink_resources()
1233 err = dsa_devlink_resource_register(ds, "FDB", hellcreek->fdb_entries, in hellcreek_setup_devlink_resources()
1240 dsa_devlink_resource_occ_get_register(ds, in hellcreek_setup_devlink_resources()
1245 dsa_devlink_resource_occ_get_register(ds, in hellcreek_setup_devlink_resources()
1253 dsa_devlink_resources_unregister(ds); in hellcreek_setup_devlink_resources()
1264 struct dsa_switch *ds = dsa_devlink_to_ds(dl); in hellcreek_devlink_region_vlan_snapshot() local
1265 struct hellcreek *hellcreek = ds->priv; in hellcreek_devlink_region_vlan_snapshot()
1291 struct dsa_switch *ds = dsa_devlink_to_ds(dl); in hellcreek_devlink_region_fdb_snapshot() local
1293 struct hellcreek *hellcreek = ds->priv; in hellcreek_devlink_region_fdb_snapshot()
1335 static int hellcreek_setup_devlink_regions(struct dsa_switch *ds) in hellcreek_setup_devlink_regions() argument
1337 struct hellcreek *hellcreek = ds->priv; in hellcreek_setup_devlink_regions()
1347 region = dsa_devlink_region_create(ds, ops, 1, size); in hellcreek_setup_devlink_regions()
1357 region = dsa_devlink_region_create(ds, ops, 1, size); in hellcreek_setup_devlink_regions()
1373 static void hellcreek_teardown_devlink_regions(struct dsa_switch *ds) in hellcreek_teardown_devlink_regions() argument
1375 struct hellcreek *hellcreek = ds->priv; in hellcreek_teardown_devlink_regions()
1381 static int hellcreek_setup(struct dsa_switch *ds) in hellcreek_setup() argument
1383 struct hellcreek *hellcreek = ds->priv; in hellcreek_setup()
1411 for (i = 0; i < ds->num_ports; ++i) { in hellcreek_setup()
1412 if (!dsa_is_user_port(ds, i)) in hellcreek_setup()
1415 hellcreek_setup_vlan_membership(ds, i, true); in hellcreek_setup()
1424 ds->vlan_filtering_is_global = true; in hellcreek_setup()
1425 ds->needs_standalone_vlan_filtering = true; in hellcreek_setup()
1436 ret = hellcreek_setup_devlink_resources(ds); in hellcreek_setup()
1443 ret = hellcreek_setup_devlink_regions(ds); in hellcreek_setup()
1453 dsa_devlink_resources_unregister(ds); in hellcreek_setup()
1458 static void hellcreek_teardown(struct dsa_switch *ds) in hellcreek_teardown() argument
1460 hellcreek_teardown_devlink_regions(ds); in hellcreek_teardown()
1461 dsa_devlink_resources_unregister(ds); in hellcreek_teardown()
1464 static void hellcreek_phylink_get_caps(struct dsa_switch *ds, int port, in hellcreek_phylink_get_caps() argument
1467 struct hellcreek *hellcreek = ds->priv; in hellcreek_phylink_get_caps()
1490 hellcreek_port_prechangeupper(struct dsa_switch *ds, int port, in hellcreek_port_prechangeupper() argument
1493 struct hellcreek *hellcreek = ds->priv; in hellcreek_port_prechangeupper()
1517 if (!dsa_is_user_port(ds, i)) in hellcreek_port_prechangeupper()
1738 static int hellcreek_port_set_schedule(struct dsa_switch *ds, int port, in hellcreek_port_set_schedule() argument
1741 struct hellcreek *hellcreek = ds->priv; in hellcreek_port_set_schedule()
1798 static int hellcreek_port_del_schedule(struct dsa_switch *ds, int port) in hellcreek_port_del_schedule() argument
1800 struct hellcreek *hellcreek = ds->priv; in hellcreek_port_del_schedule()
1872 static int hellcreek_port_setup_tc(struct dsa_switch *ds, int port, in hellcreek_port_setup_tc() argument
1875 struct hellcreek *hellcreek = ds->priv; in hellcreek_port_setup_tc()
1888 return hellcreek_port_set_schedule(ds, port, taprio); in hellcreek_port_setup_tc()
1890 return hellcreek_port_del_schedule(ds, port); in hellcreek_port_setup_tc()
2019 hellcreek->ds = devm_kzalloc(dev, sizeof(*hellcreek->ds), GFP_KERNEL); in hellcreek_probe()
2020 if (!hellcreek->ds) in hellcreek_probe()
2023 hellcreek->ds->dev = dev; in hellcreek_probe()
2024 hellcreek->ds->priv = hellcreek; in hellcreek_probe()
2025 hellcreek->ds->ops = &hellcreek_ds_ops; in hellcreek_probe()
2026 hellcreek->ds->num_ports = hellcreek->pdata->num_ports; in hellcreek_probe()
2027 hellcreek->ds->num_tx_queues = HELLCREEK_NUM_EGRESS_QUEUES; in hellcreek_probe()
2029 ret = dsa_register_switch(hellcreek->ds); in hellcreek_probe()
2054 dsa_unregister_switch(hellcreek->ds); in hellcreek_probe()
2068 dsa_unregister_switch(hellcreek->ds); in hellcreek_remove()
2078 dsa_switch_shutdown(hellcreek->ds); in hellcreek_shutdown()