• Home
  • Raw
  • Download

Lines Matching refs:ds

207 	struct dsa_switch	*ds;  member
339 static inline struct dsa_port *dsa_to_port(struct dsa_switch *ds, int p) in dsa_to_port() argument
341 struct dsa_switch_tree *dst = ds->dst; in dsa_to_port()
345 if (dp->ds == ds && dp->index == p) in dsa_to_port()
351 static inline bool dsa_is_unused_port(struct dsa_switch *ds, int p) in dsa_is_unused_port() argument
353 return dsa_to_port(ds, p)->type == DSA_PORT_TYPE_UNUSED; in dsa_is_unused_port()
356 static inline bool dsa_is_cpu_port(struct dsa_switch *ds, int p) in dsa_is_cpu_port() argument
358 return dsa_to_port(ds, p)->type == DSA_PORT_TYPE_CPU; in dsa_is_cpu_port()
361 static inline bool dsa_is_dsa_port(struct dsa_switch *ds, int p) in dsa_is_dsa_port() argument
363 return dsa_to_port(ds, p)->type == DSA_PORT_TYPE_DSA; in dsa_is_dsa_port()
366 static inline bool dsa_is_user_port(struct dsa_switch *ds, int p) in dsa_is_user_port() argument
368 return dsa_to_port(ds, p)->type == DSA_PORT_TYPE_USER; in dsa_is_user_port()
371 static inline u32 dsa_user_ports(struct dsa_switch *ds) in dsa_user_ports() argument
376 for (p = 0; p < ds->num_ports; p++) in dsa_user_ports()
377 if (dsa_is_user_port(ds, p)) in dsa_user_ports()
384 static inline unsigned int dsa_routing_port(struct dsa_switch *ds, int device) in dsa_routing_port() argument
386 struct dsa_switch_tree *dst = ds->dst; in dsa_routing_port()
390 if (dl->dp->ds == ds && dl->link_dp->ds->index == device) in dsa_routing_port()
393 return ds->num_ports; in dsa_routing_port()
397 static inline unsigned int dsa_towards_port(struct dsa_switch *ds, int device, in dsa_towards_port() argument
400 if (device == ds->index) in dsa_towards_port()
403 return dsa_routing_port(ds, device); in dsa_towards_port()
407 static inline unsigned int dsa_upstream_port(struct dsa_switch *ds, int port) in dsa_upstream_port() argument
409 const struct dsa_port *dp = dsa_to_port(ds, port); in dsa_upstream_port()
415 return dsa_towards_port(ds, cpu_dp->ds->index, cpu_dp->index); in dsa_upstream_port()
420 const struct dsa_switch *ds = dp->ds; in dsa_port_is_vlan_filtering() local
422 if (ds->vlan_filtering_is_global) in dsa_port_is_vlan_filtering()
423 return ds->vlan_filtering; in dsa_port_is_vlan_filtering()
431 enum dsa_tag_protocol (*get_tag_protocol)(struct dsa_switch *ds,
435 int (*setup)(struct dsa_switch *ds);
436 void (*teardown)(struct dsa_switch *ds);
437 u32 (*get_phy_flags)(struct dsa_switch *ds, int port);
442 int (*phy_read)(struct dsa_switch *ds, int port, int regnum);
443 int (*phy_write)(struct dsa_switch *ds, int port,
449 void (*adjust_link)(struct dsa_switch *ds, int port,
451 void (*fixed_link_update)(struct dsa_switch *ds, int port,
457 void (*phylink_validate)(struct dsa_switch *ds, int port,
460 int (*phylink_mac_link_state)(struct dsa_switch *ds, int port,
462 void (*phylink_mac_config)(struct dsa_switch *ds, int port,
465 void (*phylink_mac_an_restart)(struct dsa_switch *ds, int port);
466 void (*phylink_mac_link_down)(struct dsa_switch *ds, int port,
469 void (*phylink_mac_link_up)(struct dsa_switch *ds, int port,
475 void (*phylink_fixed_state)(struct dsa_switch *ds, int port,
480 void (*get_strings)(struct dsa_switch *ds, int port,
482 void (*get_ethtool_stats)(struct dsa_switch *ds,
484 int (*get_sset_count)(struct dsa_switch *ds, int port, int sset);
485 void (*get_ethtool_phy_stats)(struct dsa_switch *ds,
491 void (*get_wol)(struct dsa_switch *ds, int port,
493 int (*set_wol)(struct dsa_switch *ds, int port,
499 int (*get_ts_info)(struct dsa_switch *ds, int port,
505 int (*suspend)(struct dsa_switch *ds);
506 int (*resume)(struct dsa_switch *ds);
511 int (*port_enable)(struct dsa_switch *ds, int port,
513 void (*port_disable)(struct dsa_switch *ds, int port);
518 int (*set_mac_eee)(struct dsa_switch *ds, int port,
520 int (*get_mac_eee)(struct dsa_switch *ds, int port,
524 int (*get_eeprom_len)(struct dsa_switch *ds);
525 int (*get_eeprom)(struct dsa_switch *ds,
527 int (*set_eeprom)(struct dsa_switch *ds,
533 int (*get_regs_len)(struct dsa_switch *ds, int port);
534 void (*get_regs)(struct dsa_switch *ds, int port,
540 int (*set_ageing_time)(struct dsa_switch *ds, unsigned int msecs);
541 int (*port_bridge_join)(struct dsa_switch *ds, int port,
543 void (*port_bridge_leave)(struct dsa_switch *ds, int port,
545 void (*port_stp_state_set)(struct dsa_switch *ds, int port,
547 void (*port_fast_age)(struct dsa_switch *ds, int port);
548 int (*port_egress_floods)(struct dsa_switch *ds, int port,
554 int (*port_vlan_filtering)(struct dsa_switch *ds, int port,
557 int (*port_vlan_prepare)(struct dsa_switch *ds, int port,
559 void (*port_vlan_add)(struct dsa_switch *ds, int port,
561 int (*port_vlan_del)(struct dsa_switch *ds, int port,
566 int (*port_fdb_add)(struct dsa_switch *ds, int port,
568 int (*port_fdb_del)(struct dsa_switch *ds, int port,
570 int (*port_fdb_dump)(struct dsa_switch *ds, int port,
576 int (*port_mdb_prepare)(struct dsa_switch *ds, int port,
578 void (*port_mdb_add)(struct dsa_switch *ds, int port,
580 int (*port_mdb_del)(struct dsa_switch *ds, int port,
585 int (*get_rxnfc)(struct dsa_switch *ds, int port,
587 int (*set_rxnfc)(struct dsa_switch *ds, int port,
593 int (*cls_flower_add)(struct dsa_switch *ds, int port,
595 int (*cls_flower_del)(struct dsa_switch *ds, int port,
597 int (*cls_flower_stats)(struct dsa_switch *ds, int port,
599 int (*port_mirror_add)(struct dsa_switch *ds, int port,
602 void (*port_mirror_del)(struct dsa_switch *ds, int port,
604 int (*port_policer_add)(struct dsa_switch *ds, int port,
606 void (*port_policer_del)(struct dsa_switch *ds, int port);
607 int (*port_setup_tc)(struct dsa_switch *ds, int port,
613 int (*crosschip_bridge_join)(struct dsa_switch *ds, int tree_index,
616 void (*crosschip_bridge_leave)(struct dsa_switch *ds, int tree_index,
623 int (*port_hwtstamp_get)(struct dsa_switch *ds, int port,
625 int (*port_hwtstamp_set)(struct dsa_switch *ds, int port,
627 bool (*port_txtstamp)(struct dsa_switch *ds, int port,
629 bool (*port_rxtstamp)(struct dsa_switch *ds, int port,
633 int (*devlink_param_get)(struct dsa_switch *ds, u32 id,
635 int (*devlink_param_set)(struct dsa_switch *ds, u32 id,
637 int (*devlink_info_get)(struct dsa_switch *ds,
647 int (*port_change_mtu)(struct dsa_switch *ds, int port,
649 int (*port_max_mtu)(struct dsa_switch *ds, int port);
660 int dsa_devlink_params_register(struct dsa_switch *ds,
663 void dsa_devlink_params_unregister(struct dsa_switch *ds,
666 int dsa_devlink_resource_register(struct dsa_switch *ds,
673 void dsa_devlink_resources_unregister(struct dsa_switch *ds);
675 void dsa_devlink_resource_occ_get_register(struct dsa_switch *ds,
679 void dsa_devlink_resource_occ_get_unregister(struct dsa_switch *ds,
682 dsa_devlink_region_create(struct dsa_switch *ds,
686 dsa_devlink_port_region_create(struct dsa_switch *ds,
695 struct dsa_switch *ds; member
702 return dl_priv->ds; in dsa_devlink_to_ds()
711 return dl_priv->ds; in dsa_devlink_port_to_ds()
806 void dsa_unregister_switch(struct dsa_switch *ds);
807 int dsa_register_switch(struct dsa_switch *ds);
810 int dsa_switch_suspend(struct dsa_switch *ds);
811 int dsa_switch_resume(struct dsa_switch *ds);
813 static inline int dsa_switch_suspend(struct dsa_switch *ds) in dsa_switch_suspend() argument
817 static inline int dsa_switch_resume(struct dsa_switch *ds) in dsa_switch_resume() argument
878 void dsa_port_phylink_mac_change(struct dsa_switch *ds, int port, bool up);