H A D | ocelot.c | 3 * Microsemi Ocelot Switch driver 7 #include <linux/dsa/ocelot.h> 14 #include "ocelot.h" 30 /* Caller must hold &ocelot->mact_lock */ 31 static inline u32 ocelot_mact_read_macaccess(struct ocelot *ocelot) in ocelot_mact_read_macaccess() argument 33 return ocelot_read(ocelot, ANA_TABLES_MACACCESS); in ocelot_mact_read_macaccess() 36 /* Caller must hold &ocelot->mact_lock */ 37 static inline int ocelot_mact_wait_for_completion(struct ocelot *ocelot) in ocelot_mact_wait_for_completion() argument 49 ocelot_mact_select(struct ocelot * ocelot,const unsigned char mac[ETH_ALEN],unsigned int vid) ocelot_mact_select() argument 71 __ocelot_mact_learn(struct ocelot * ocelot,int port,const unsigned char mac[ETH_ALEN],unsigned int vid,enum macaccess_entry_type type) __ocelot_mact_learn() argument 103 ocelot_mact_learn(struct ocelot * ocelot,int port,const unsigned char mac[ETH_ALEN],unsigned int vid,enum macaccess_entry_type type) ocelot_mact_learn() argument 117 ocelot_mact_forget(struct ocelot * ocelot,const unsigned char mac[ETH_ALEN],unsigned int vid) ocelot_mact_forget() argument 139 ocelot_mact_lookup(struct ocelot * ocelot,int * dst_idx,const unsigned char mac[ETH_ALEN],unsigned int vid,enum macaccess_entry_type * type) ocelot_mact_lookup() argument 174 ocelot_mact_learn_streamdata(struct ocelot * ocelot,int dst_idx,const unsigned char mac[ETH_ALEN],unsigned int vid,enum macaccess_entry_type type,int sfid,int ssid) ocelot_mact_learn_streamdata() argument 199 ocelot_mact_init(struct ocelot * ocelot) ocelot_mact_init() argument 217 ocelot_pll5_init(struct ocelot * ocelot) ocelot_pll5_init() argument 247 ocelot_vcap_enable(struct ocelot * ocelot,int port) ocelot_vcap_enable() argument 261 ocelot_single_vlan_aware_bridge(struct ocelot * ocelot,struct netlink_ext_ack * extack) ocelot_single_vlan_aware_bridge() argument 290 ocelot_vlant_read_vlanaccess(struct ocelot * ocelot) ocelot_vlant_read_vlanaccess() argument 295 ocelot_vlant_wait_for_completion(struct ocelot * ocelot) ocelot_vlant_wait_for_completion() argument 307 ocelot_vlant_set_mask(struct ocelot * ocelot,u16 vid,u32 mask) ocelot_vlant_set_mask() argument 320 ocelot_port_num_untagged_vlans(struct ocelot * ocelot,int port) ocelot_port_num_untagged_vlans() argument 343 ocelot_port_num_tagged_vlans(struct ocelot * ocelot,int port) ocelot_port_num_tagged_vlans() argument 362 ocelot_port_uses_native_vlan(struct ocelot * ocelot,int port) ocelot_port_uses_native_vlan() argument 369 ocelot_port_find_native_vlan(struct ocelot * ocelot,int port) ocelot_port_find_native_vlan() argument 384 ocelot_port_manage_port_tag(struct ocelot * ocelot,int port) ocelot_port_manage_port_tag() argument 423 ocelot_bridge_num_find(struct ocelot * ocelot,const struct net_device * bridge) ocelot_bridge_num_find() argument 439 ocelot_vlan_unaware_pvid(struct ocelot * ocelot,const struct net_device * bridge) ocelot_vlan_unaware_pvid() argument 457 ocelot_port_set_pvid(struct ocelot * ocelot,int port,const struct ocelot_bridge_vlan * pvid_vlan) ocelot_port_set_pvid() argument 489 ocelot_bridge_vlan_find(struct ocelot * ocelot,u16 vid) ocelot_bridge_vlan_find() argument 501 ocelot_vlan_member_add(struct ocelot * ocelot,int port,u16 vid,bool untagged) ocelot_vlan_member_add() argument 550 ocelot_vlan_member_del(struct ocelot * ocelot,int port,u16 vid) ocelot_vlan_member_del() argument 575 ocelot_add_vlan_unaware_pvid(struct ocelot * ocelot,int port,const struct net_device * bridge) ocelot_add_vlan_unaware_pvid() argument 583 ocelot_del_vlan_unaware_pvid(struct ocelot * ocelot,int port,const struct net_device * bridge) ocelot_del_vlan_unaware_pvid() argument 591 ocelot_port_vlan_filtering(struct ocelot * ocelot,int port,bool vlan_aware,struct netlink_ext_ack * extack) ocelot_port_vlan_filtering() argument 641 ocelot_vlan_prepare(struct ocelot * ocelot,int port,u16 vid,bool pvid,bool untagged,struct netlink_ext_ack * extack) ocelot_vlan_prepare() argument 670 ocelot_vlan_add(struct ocelot * ocelot,int port,u16 vid,bool pvid,bool untagged) ocelot_vlan_add() argument 698 ocelot_vlan_del(struct ocelot * ocelot,int port,u16 vid) ocelot_vlan_del() argument 725 ocelot_vlan_init(struct ocelot * ocelot) ocelot_vlan_init() argument 756 ocelot_read_eq_avail(struct ocelot * ocelot,int port) ocelot_read_eq_avail() argument 761 ocelot_port_flush(struct ocelot * ocelot,int port) ocelot_port_flush() argument 814 ocelot_port_configure_serdes(struct ocelot * ocelot,int port,struct device_node * portnp) ocelot_port_configure_serdes() argument 853 ocelot_phylink_mac_config(struct ocelot * ocelot,int port,unsigned int link_an_mode,const struct phylink_link_state * state) ocelot_phylink_mac_config() argument 879 ocelot_phylink_mac_link_down(struct ocelot * ocelot,int port,unsigned int link_an_mode,phy_interface_t interface,unsigned long quirks) ocelot_phylink_mac_link_down() argument 917 ocelot_phylink_mac_link_up(struct ocelot * ocelot,int port,struct phy_device * phydev,unsigned int link_an_mode,phy_interface_t interface,int speed,int duplex,bool tx_pause,bool rx_pause,unsigned long quirks) ocelot_phylink_mac_link_up() argument 1024 ocelot_rx_frame_word(struct ocelot * ocelot,u8 grp,bool ifh,u32 * rval) ocelot_rx_frame_word() argument 1066 ocelot_xtr_poll_xfh(struct ocelot * ocelot,int grp,u32 * xfh) ocelot_xtr_poll_xfh() argument 1079 ocelot_ptp_rx_timestamp(struct ocelot * ocelot,struct sk_buff * skb,u64 timestamp) ocelot_ptp_rx_timestamp() argument 1102 ocelot_lock_inj_grp(struct ocelot * ocelot,int grp) ocelot_lock_inj_grp() argument 1109 ocelot_unlock_inj_grp(struct ocelot * ocelot,int grp) ocelot_unlock_inj_grp() argument 1116 ocelot_lock_xtr_grp(struct ocelot * ocelot,int grp) ocelot_lock_xtr_grp() argument 1123 ocelot_unlock_xtr_grp(struct ocelot * ocelot,int grp) ocelot_unlock_xtr_grp() argument 1130 ocelot_lock_xtr_grp_bh(struct ocelot * ocelot,int grp) ocelot_lock_xtr_grp_bh() argument 1137 ocelot_unlock_xtr_grp_bh(struct ocelot * ocelot,int grp) ocelot_unlock_xtr_grp_bh() argument 1144 ocelot_xtr_poll_frame(struct ocelot * ocelot,int grp,struct sk_buff ** nskb) ocelot_xtr_poll_frame() argument 1227 ocelot_can_inject(struct ocelot * ocelot,int grp) ocelot_can_inject() argument 1253 ocelot_ifh_set_basic(void * ifh,struct ocelot * ocelot,int port,u32 rew_op,struct sk_buff * skb) ocelot_ifh_set_basic() argument 1279 ocelot_port_inject_frame(struct ocelot * ocelot,int port,int grp,u32 rew_op,struct sk_buff * skb) ocelot_port_inject_frame() argument 1321 ocelot_drain_cpu_queue(struct ocelot * ocelot,int grp) ocelot_drain_cpu_queue() argument 1330 ocelot_fdb_add(struct ocelot * ocelot,int port,const unsigned char * addr,u16 vid,const struct net_device * bridge) ocelot_fdb_add() argument 1340 ocelot_fdb_del(struct ocelot * ocelot,int port,const unsigned char * addr,u16 vid,const struct net_device * bridge) ocelot_fdb_del() argument 1351 ocelot_mact_read(struct ocelot * ocelot,int port,int row,int col,struct ocelot_mact_entry * entry) ocelot_mact_read() argument 1398 ocelot_mact_flush(struct ocelot * ocelot,int port) ocelot_mact_flush() argument 1435 ocelot_fdb_dump(struct ocelot * ocelot,int port,dsa_fdb_dump_cb_t * cb,void * data) ocelot_fdb_dump() argument 1481 ocelot_trap_add(struct ocelot * ocelot,int port,unsigned long cookie,bool take_ts,void (* populate)(struct ocelot_vcap_filter * f)) ocelot_trap_add() argument 1530 ocelot_trap_del(struct ocelot * ocelot,int port,unsigned long cookie) ocelot_trap_del() argument 1549 ocelot_get_bond_mask(struct ocelot * ocelot,struct net_device * bond) ocelot_get_bond_mask() argument 1572 ocelot_bond_get_id(struct ocelot * ocelot,struct net_device * bond) ocelot_bond_get_id() argument 1593 ocelot_dsa_8021q_cpu_assigned_ports(struct ocelot * ocelot,struct ocelot_port * cpu) ocelot_dsa_8021q_cpu_assigned_ports() argument 1618 ocelot_port_assigned_dsa_8021q_cpu_mask(struct ocelot * ocelot,int port) ocelot_port_assigned_dsa_8021q_cpu_mask() argument 1633 ocelot_get_bridge_fwd_mask(struct ocelot * ocelot,int src_port) ocelot_get_bridge_fwd_mask() argument 1662 ocelot_apply_bridge_fwd_mask(struct ocelot * ocelot,bool joining) ocelot_apply_bridge_fwd_mask() argument 1732 ocelot_update_pgid_cpu(struct ocelot * ocelot) ocelot_update_pgid_cpu() argument 1752 ocelot_port_setup_dsa_8021q_cpu(struct ocelot * ocelot,int cpu) ocelot_port_setup_dsa_8021q_cpu() argument 1770 ocelot_port_teardown_dsa_8021q_cpu(struct ocelot * ocelot,int cpu) ocelot_port_teardown_dsa_8021q_cpu() argument 1788 ocelot_port_assign_dsa_8021q_cpu(struct ocelot * ocelot,int port,int cpu) ocelot_port_assign_dsa_8021q_cpu() argument 1802 ocelot_port_unassign_dsa_8021q_cpu(struct ocelot * ocelot,int port) ocelot_port_unassign_dsa_8021q_cpu() argument 1813 ocelot_bridge_stp_state_set(struct ocelot * ocelot,int port,u8 state) ocelot_bridge_stp_state_set() argument 1835 ocelot_set_ageing_time(struct ocelot * ocelot,unsigned int msecs) ocelot_set_ageing_time() argument 1849 ocelot_multicast_get(struct ocelot * ocelot,const unsigned char * addr,u16 vid) ocelot_multicast_get() argument 1872 ocelot_pgid_alloc(struct ocelot * ocelot,int index,unsigned long ports) ocelot_pgid_alloc() argument 1889 ocelot_pgid_free(struct ocelot * ocelot,struct ocelot_pgid * pgid) ocelot_pgid_free() argument 1898 ocelot_mdb_get_pgid(struct ocelot * ocelot,const struct ocelot_multicast * mc) ocelot_mdb_get_pgid() argument 1956 ocelot_port_mdb_add(struct ocelot * ocelot,int port,const struct switchdev_obj_port_mdb * mdb,const struct net_device * bridge) ocelot_port_mdb_add() argument 2013 ocelot_port_mdb_del(struct ocelot * ocelot,int port,const struct switchdev_obj_port_mdb * mdb,const struct net_device * bridge) ocelot_port_mdb_del() argument 2058 ocelot_port_bridge_join(struct ocelot * ocelot,int port,struct net_device * bridge,int bridge_num,struct netlink_ext_ack * extack) ocelot_port_bridge_join() argument 2085 ocelot_port_bridge_leave(struct ocelot * ocelot,int port,struct net_device * bridge) ocelot_port_bridge_leave() argument 2106 ocelot_set_aggr_pgids(struct ocelot * ocelot) ocelot_set_aggr_pgids() argument 2192 ocelot_setup_logical_port_ids(struct ocelot * ocelot) ocelot_setup_logical_port_ids() argument 2220 ocelot_migrate_mc(struct ocelot * ocelot,struct ocelot_multicast * mc,unsigned long from_mask,unsigned long to_mask) ocelot_migrate_mc() argument 2262 ocelot_migrate_mdbs(struct ocelot * ocelot,unsigned long from_mask,unsigned long to_mask) ocelot_migrate_mdbs() argument 2291 ocelot_migrate_lag_fdbs(struct ocelot * ocelot,struct net_device * bond,int lag) ocelot_migrate_lag_fdbs() argument 2321 ocelot_port_lag_join(struct ocelot * ocelot,int port,struct net_device * bond,struct netdev_lag_upper_info * info,struct netlink_ext_ack * extack) ocelot_port_lag_join() argument 2346 ocelot_port_lag_leave(struct ocelot * ocelot,int port,struct net_device * bond) ocelot_port_lag_leave() argument 2370 ocelot_port_lag_change(struct ocelot * ocelot,int port,bool lag_tx_active) ocelot_port_lag_change() argument 2385 ocelot_lag_fdb_add(struct ocelot * ocelot,struct net_device * bond,const unsigned char * addr,u16 vid,const struct net_device * bridge) ocelot_lag_fdb_add() argument 2421 ocelot_lag_fdb_del(struct ocelot * ocelot,struct net_device * bond,const unsigned char * addr,u16 vid,const struct net_device * bridge) ocelot_lag_fdb_del() argument 2457 ocelot_port_set_maxlen(struct ocelot * ocelot,int port,size_t sdu) ocelot_port_set_maxlen() argument 2492 ocelot_get_max_mtu(struct ocelot * ocelot,int port) ocelot_get_max_mtu() argument 2509 ocelot_port_set_learning(struct ocelot * ocelot,int port,bool enabled) ocelot_port_set_learning() argument 2524 ocelot_port_set_ucast_flood(struct ocelot * ocelot,int port,bool enabled) ocelot_port_set_ucast_flood() argument 2535 ocelot_port_set_mcast_flood(struct ocelot * ocelot,int port,bool enabled) ocelot_port_set_mcast_flood() argument 2548 ocelot_port_set_bcast_flood(struct ocelot * ocelot,int port,bool enabled) ocelot_port_set_bcast_flood() argument 2559 ocelot_port_pre_bridge_flags(struct ocelot * ocelot,int port,struct switchdev_brport_flags flags) ocelot_port_pre_bridge_flags() argument 2570 ocelot_port_bridge_flags(struct ocelot * ocelot,int port,struct switchdev_brport_flags flags) ocelot_port_bridge_flags() argument 2591 ocelot_port_get_default_prio(struct ocelot * ocelot,int port) ocelot_port_get_default_prio() argument 2599 ocelot_port_set_default_prio(struct ocelot * ocelot,int port,u8 prio) ocelot_port_set_default_prio() argument 2614 ocelot_port_get_dscp_prio(struct ocelot * ocelot,int port,u8 dscp) ocelot_port_get_dscp_prio() argument 2639 ocelot_port_add_dscp_prio(struct ocelot * ocelot,int port,u8 dscp,u8 prio) ocelot_port_add_dscp_prio() argument 2666 ocelot_port_del_dscp_prio(struct ocelot * ocelot,int port,u8 dscp,u8 prio) ocelot_port_del_dscp_prio() argument 2707 ocelot_mirror_get(struct ocelot * ocelot,int to,struct netlink_ext_ack * extack) ocelot_mirror_get() argument 2737 ocelot_mirror_put(struct ocelot * ocelot) ocelot_mirror_put() argument 2749 ocelot_port_mirror_add(struct ocelot * ocelot,int from,int to,bool ingress,struct netlink_ext_ack * extack) ocelot_port_mirror_add() argument 2770 ocelot_port_mirror_del(struct ocelot * ocelot,int from,bool ingress) ocelot_port_mirror_del() argument 2783 ocelot_port_reset_mqprio(struct ocelot * ocelot,int port) ocelot_port_reset_mqprio() argument 2791 ocelot_port_mqprio(struct ocelot * ocelot,int port,struct tc_mqprio_qopt_offload * mqprio) ocelot_port_mqprio() argument 2835 ocelot_init_port(struct ocelot * ocelot,int port) ocelot_init_port() argument 2904 ocelot_cpu_port_init(struct ocelot * ocelot) ocelot_cpu_port_init() argument 2935 ocelot_detect_features(struct ocelot * ocelot) ocelot_detect_features() argument 2950 ocelot_mem_init_status(struct ocelot * ocelot) ocelot_mem_init_status() argument 2961 ocelot_reset(struct ocelot * ocelot) ocelot_reset() argument 2990 ocelot_init(struct ocelot * ocelot) ocelot_init() argument 3143 ocelot_deinit(struct ocelot * ocelot) ocelot_deinit() argument 3150 ocelot_deinit_port(struct ocelot * ocelot,int port) ocelot_deinit_port() argument [all...] |