Lines Matching full:ds
165 struct dsa_switch *ds; member
242 static int mt7628_setup_internal_mdio(struct dsa_switch *ds) in mt7628_setup_internal_mdio() argument
244 struct mt7628_esw *esw = ds->priv; in mt7628_setup_internal_mdio()
245 struct device *dev = ds->dev; in mt7628_setup_internal_mdio()
259 ds->user_mii_bus = bus; in mt7628_setup_internal_mdio()
260 bus->phy_mask = ~ds->phys_mii_mask; in mt7628_setup_internal_mdio()
265 static void mt7628_switch_init(struct dsa_switch *ds) in mt7628_switch_init() argument
267 struct mt7628_esw *esw = ds->priv; in mt7628_switch_init()
386 static void mt7628_vlan_sync(struct dsa_switch *ds) in mt7628_vlan_sync() argument
388 struct mt7628_esw *esw = ds->priv; in mt7628_vlan_sync()
399 for (i = 0; i < ds->num_ports; i++) in mt7628_vlan_sync()
403 static int mt7628_setup(struct dsa_switch *ds) in mt7628_setup() argument
405 struct mt7628_esw *esw = ds->priv; in mt7628_setup()
422 mt7628_switch_init(ds); in mt7628_setup()
424 ret = mt7628_setup_internal_mdio(ds); in mt7628_setup()
429 ret = dsa_tag_8021q_register(ds, htons(ETH_P_8021Q)); in mt7628_setup()
435 static int mt7628_port_enable(struct dsa_switch *ds, int port, in mt7628_port_enable() argument
438 struct mt7628_esw *esw = ds->priv; in mt7628_port_enable()
448 static void mt7628_port_disable(struct dsa_switch *ds, int port) in mt7628_port_disable() argument
450 struct mt7628_esw *esw = ds->priv; in mt7628_port_disable()
457 mt7628_get_tag_proto(struct dsa_switch *ds, int port, enum dsa_tag_protocol mp) in mt7628_get_tag_proto() argument
462 static void mt7628_phylink_get_caps(struct dsa_switch *ds, int port, in mt7628_phylink_get_caps() argument
479 static int mt7628_dsa_8021q_vlan_add(struct dsa_switch *ds, int port, in mt7628_dsa_8021q_vlan_add() argument
482 struct mt7628_esw *esw = ds->priv; in mt7628_dsa_8021q_vlan_add()
511 mt7628_vlan_sync(ds); in mt7628_dsa_8021q_vlan_add()
515 static int mt7628_dsa_8021q_vlan_del(struct dsa_switch *ds, int port, u16 vid) in mt7628_dsa_8021q_vlan_del() argument
517 struct mt7628_esw *esw = ds->priv; in mt7628_dsa_8021q_vlan_del()
543 mt7628_vlan_sync(ds); in mt7628_dsa_8021q_vlan_del()
547 static void mt7628_teardown(struct dsa_switch *ds) in mt7628_teardown() argument
550 dsa_tag_8021q_unregister(ds); in mt7628_teardown()
569 struct dsa_switch *ds; in mt7628_probe() local
572 ds = devm_kzalloc(&pdev->dev, sizeof(*ds), GFP_KERNEL); in mt7628_probe()
573 if (!ds) in mt7628_probe()
599 ds->dev = dev; in mt7628_probe()
600 ds->num_ports = MT7628_ESW_NUM_PORTS; in mt7628_probe()
601 ds->ops = &mt7628_switch_ops; in mt7628_probe()
602 ds->priv = esw; in mt7628_probe()
603 esw->ds = ds; in mt7628_probe()
607 return dsa_register_switch(ds); in mt7628_probe()
617 dsa_unregister_switch(esw->ds); in mt7628_remove()
627 dsa_switch_shutdown(esw->ds); in mt7628_shutdown()