Lines Matching refs:ds

240 static enum dsa_tag_protocol hellcreek_get_tag_protocol(struct dsa_switch *ds,
247 static int hellcreek_port_enable(struct dsa_switch *ds, int port,
250 struct hellcreek *hellcreek = ds->priv;
271 static void hellcreek_port_disable(struct dsa_switch *ds, int port)
273 struct hellcreek *hellcreek = ds->priv;
292 static void hellcreek_get_strings(struct dsa_switch *ds, int port,
305 static int hellcreek_get_sset_count(struct dsa_switch *ds, int port, int sset)
313 static void hellcreek_get_ethtool_stats(struct dsa_switch *ds, int port,
316 struct hellcreek *hellcreek = ds->priv;
352 static int hellcreek_vlan_prepare(struct dsa_switch *ds, int port,
356 struct hellcreek *hellcreek = ds->priv;
368 if (!dsa_is_user_port(ds, i))
459 static int hellcreek_vlan_add(struct dsa_switch *ds, int port,
465 struct hellcreek *hellcreek = ds->priv;
468 err = hellcreek_vlan_prepare(ds, port, vlan, extack);
481 static int hellcreek_vlan_del(struct dsa_switch *ds, int port,
484 struct hellcreek *hellcreek = ds->priv;
493 static void hellcreek_port_stp_state_set(struct dsa_switch *ds, int port,
496 struct hellcreek *hellcreek = ds->priv;
588 static void hellcreek_setup_vlan_membership(struct dsa_switch *ds, int port,
592 int upstream = dsa_upstream_port(ds, port);
593 struct hellcreek *hellcreek = ds->priv;
658 static int hellcreek_pre_bridge_flags(struct dsa_switch *ds, int port,
668 static int hellcreek_bridge_flags(struct dsa_switch *ds, int port,
672 struct hellcreek *hellcreek = ds->priv;
685 static int hellcreek_port_bridge_join(struct dsa_switch *ds, int port,
690 struct hellcreek *hellcreek = ds->priv;
695 if (!ds->vlan_filtering)
699 hellcreek_setup_vlan_membership(ds, port, false);
704 static void hellcreek_port_bridge_leave(struct dsa_switch *ds, int port,
707 struct hellcreek *hellcreek = ds->priv;
715 hellcreek_setup_vlan_membership(ds, port, true);
839 static int hellcreek_fdb_add(struct dsa_switch *ds, int port,
844 struct hellcreek *hellcreek = ds->priv;
885 static int hellcreek_fdb_del(struct dsa_switch *ds, int port,
890 struct hellcreek *hellcreek = ds->priv;
926 static int hellcreek_fdb_dump(struct dsa_switch *ds, int port,
929 struct hellcreek *hellcreek = ds->priv;
973 static int hellcreek_vlan_filtering(struct dsa_switch *ds, int port,
977 struct hellcreek *hellcreek = ds->priv;
986 * ds->vlan_filtering_is_global.
1173 static int hellcreek_devlink_info_get(struct dsa_switch *ds,
1177 struct hellcreek *hellcreek = ds->priv;
1214 static int hellcreek_setup_devlink_resources(struct dsa_switch *ds)
1218 struct hellcreek *hellcreek = ds->priv;
1230 err = dsa_devlink_resource_register(ds, "VLAN", VLAN_N_VID,
1237 err = dsa_devlink_resource_register(ds, "FDB", hellcreek->fdb_entries,
1244 dsa_devlink_resource_occ_get_register(ds,
1249 dsa_devlink_resource_occ_get_register(ds,
1257 dsa_devlink_resources_unregister(ds);
1268 struct dsa_switch *ds = dsa_devlink_to_ds(dl);
1269 struct hellcreek *hellcreek = ds->priv;
1295 struct dsa_switch *ds = dsa_devlink_to_ds(dl);
1297 struct hellcreek *hellcreek = ds->priv;
1339 static int hellcreek_setup_devlink_regions(struct dsa_switch *ds)
1341 struct hellcreek *hellcreek = ds->priv;
1351 region = dsa_devlink_region_create(ds, ops, 1, size);
1361 region = dsa_devlink_region_create(ds, ops, 1, size);
1377 static void hellcreek_teardown_devlink_regions(struct dsa_switch *ds)
1379 struct hellcreek *hellcreek = ds->priv;
1385 static int hellcreek_setup(struct dsa_switch *ds)
1387 struct hellcreek *hellcreek = ds->priv;
1415 for (i = 0; i < ds->num_ports; ++i) {
1416 if (!dsa_is_user_port(ds, i))
1419 hellcreek_setup_vlan_membership(ds, i, true);
1428 ds->vlan_filtering_is_global = true;
1429 ds->needs_standalone_vlan_filtering = true;
1440 ret = hellcreek_setup_devlink_resources(ds);
1447 ret = hellcreek_setup_devlink_regions(ds);
1457 dsa_devlink_resources_unregister(ds);
1462 static void hellcreek_teardown(struct dsa_switch *ds)
1464 hellcreek_teardown_devlink_regions(ds);
1465 dsa_devlink_resources_unregister(ds);
1468 static void hellcreek_phylink_get_caps(struct dsa_switch *ds, int port,
1471 struct hellcreek *hellcreek = ds->priv;
1494 hellcreek_port_prechangeupper(struct dsa_switch *ds, int port,
1497 struct hellcreek *hellcreek = ds->priv;
1521 if (!dsa_is_user_port(ds, i))
1742 static int hellcreek_port_set_schedule(struct dsa_switch *ds, int port,
1745 struct hellcreek *hellcreek = ds->priv;
1802 static int hellcreek_port_del_schedule(struct dsa_switch *ds, int port)
1804 struct hellcreek *hellcreek = ds->priv;
1876 static int hellcreek_port_setup_tc(struct dsa_switch *ds, int port,
1879 struct hellcreek *hellcreek = ds->priv;
1892 return hellcreek_port_set_schedule(ds, port, taprio);
1894 return hellcreek_port_del_schedule(ds, port);
2023 hellcreek->ds = devm_kzalloc(dev, sizeof(*hellcreek->ds), GFP_KERNEL);
2024 if (!hellcreek->ds)
2027 hellcreek->ds->dev = dev;
2028 hellcreek->ds->priv = hellcreek;
2029 hellcreek->ds->ops = &hellcreek_ds_ops;
2030 hellcreek->ds->num_ports = hellcreek->pdata->num_ports;
2031 hellcreek->ds->num_tx_queues = HELLCREEK_NUM_EGRESS_QUEUES;
2033 ret = dsa_register_switch(hellcreek->ds);
2058 dsa_unregister_switch(hellcreek->ds);
2072 dsa_unregister_switch(hellcreek->ds);
2082 dsa_switch_shutdown(hellcreek->ds);