Lines Matching refs:ds
35 struct raw_notifier_head *nh = &dp->ds->dst->nh;
46 struct dsa_switch *ds = dp->ds;
50 return ds->ops->port_stp_state_set ? 0 : -EOPNOTSUPP;
52 if (ds->ops->port_stp_state_set)
53 ds->ops->port_stp_state_set(ds, port, state);
55 if (ds->ops->port_fast_age) {
66 ds->ops->port_fast_age(ds, port);
85 struct dsa_switch *ds = dp->ds;
89 if (ds->ops->port_enable) {
90 err = ds->ops->port_enable(ds, port, phy);
117 struct dsa_switch *ds = dp->ds;
126 if (ds->ops->port_disable)
127 ds->ops->port_disable(ds, port);
140 .tree_index = dp->ds->dst->index,
141 .sw_index = dp->ds->index,
171 .tree_index = dp->ds->dst->index,
172 .sw_index = dp->ds->index,
200 struct dsa_switch *ds = dp->ds;
208 if (vlan_filtering && dsa_is_user_port(ds, dp->index)) {
228 dev_err(ds->dev, "Must remove upper %s first\n",
235 if (!ds->vlan_filtering_is_global)
243 for (i = 0; i < ds->num_ports; i++) {
246 other_bridge = dsa_to_port(ds, i)->bridge_dev;
255 dev_err(ds->dev, "VLAN filtering is a global setting\n");
265 struct dsa_switch *ds = dp->ds;
271 if (!ds->ops->port_vlan_filtering)
288 err = ds->ops->port_vlan_filtering(ds, dp->index, vlan_filtering,
294 if (ds->vlan_filtering_is_global)
295 ds->vlan_filtering = vlan_filtering;
308 struct dsa_switch *ds = dp->ds;
313 return (!ds->configure_vlan_while_not_filtering &&
338 struct dsa_switch *ds = dp->ds;
340 if (!ds->ops->port_egress_floods ||
350 struct dsa_switch *ds = dp->ds;
357 if (ds->ops->port_egress_floods)
358 err = ds->ops->port_egress_floods(ds, port, flags & BR_FLOOD,
367 struct dsa_switch *ds = dp->ds;
371 return ds->ops->port_egress_floods ? 0 : -EOPNOTSUPP;
373 return ds->ops->port_egress_floods(ds, port, true, mrouter);
380 .sw_index = dp->ds->index,
393 .sw_index = dp->ds->index,
406 .sw_index = dp->ds->index,
418 struct dsa_switch *ds = dp->ds;
421 if (!ds->ops->port_fdb_dump)
424 return ds->ops->port_fdb_dump(ds, port, cb, data);
432 .sw_index = dp->ds->index,
445 .sw_index = dp->ds->index,
458 .sw_index = dp->ds->index,
471 .sw_index = dp->ds->index,
503 struct dsa_switch *ds = dp->ds;
505 if (!ds->ops->phylink_validate)
508 ds->ops->phylink_validate(ds, dp->index, supported, state);
515 struct dsa_switch *ds = dp->ds;
519 if (!ds->ops->phylink_mac_link_state) {
524 err = ds->ops->phylink_mac_link_state(ds, dp->index, state);
526 dev_err(ds->dev, "p%d: phylink_mac_link_state() failed: %d\n",
537 struct dsa_switch *ds = dp->ds;
539 if (!ds->ops->phylink_mac_config)
542 ds->ops->phylink_mac_config(ds, dp->index, mode, state);
548 struct dsa_switch *ds = dp->ds;
550 if (!ds->ops->phylink_mac_an_restart)
553 ds->ops->phylink_mac_an_restart(ds, dp->index);
562 struct dsa_switch *ds = dp->ds;
564 if (dsa_is_user_port(ds, dp->index))
567 if (!ds->ops->phylink_mac_link_down) {
568 if (ds->ops->adjust_link && phydev)
569 ds->ops->adjust_link(ds, dp->index, phydev);
573 ds->ops->phylink_mac_link_down(ds, dp->index, mode, interface);
584 struct dsa_switch *ds = dp->ds;
586 if (!ds->ops->phylink_mac_link_up) {
587 if (ds->ops->adjust_link && phydev)
588 ds->ops->adjust_link(ds, dp->index, phydev);
592 ds->ops->phylink_mac_link_up(ds, dp->index, mode, interface, phydev,
607 struct dsa_switch *ds = dp->ds;
633 if (ds->ops->adjust_link)
634 ds->ops->adjust_link(ds, port, phydev);
636 dev_dbg(ds->dev, "enabled port's phy: %s", phydev_name(phydev));
646 struct dsa_switch *ds = dp->ds;
654 dev_err(ds->dev,
669 if (ds->ops->adjust_link)
670 ds->ops->adjust_link(ds, port, phydev);
679 struct dsa_switch *ds = dp->ds;
688 dp->pl_config.dev = ds->dev;
690 dp->pl_config.pcs_poll = ds->pcs_poll;
714 struct dsa_switch *ds = dp->ds;
718 if (!ds->ops->adjust_link) {
721 if (ds->ops->phylink_mac_link_down)
722 ds->ops->phylink_mac_link_down(ds, port,
731 dev_warn(ds->dev,
742 struct dsa_switch *ds = dp->ds;
744 if (!ds->ops->adjust_link && dp->pl) {