Lines Matching full:lan966x

7 static void lan966x_lag_set_aggr_pgids(struct lan966x *lan966x)  in lan966x_lag_set_aggr_pgids()  argument
9 u32 visited = GENMASK(lan966x->num_phys_ports - 1, 0); in lan966x_lag_set_aggr_pgids()
13 for (p = 0; p < lan966x->num_phys_ports; ++p) in lan966x_lag_set_aggr_pgids()
15 lan966x, ANA_PGID(p)); in lan966x_lag_set_aggr_pgids()
19 lan966x, ANA_PGID(p)); in lan966x_lag_set_aggr_pgids()
29 for (p = 0; p < lan966x->num_phys_ports; ++p) { in lan966x_lag_set_aggr_pgids()
30 struct lan966x_port *port = lan966x->ports[p]; in lan966x_lag_set_aggr_pgids()
39 for (lag = 0; lag < lan966x->num_phys_ports; ++lag) { in lan966x_lag_set_aggr_pgids()
40 struct lan966x_port *port = lan966x->ports[lag]; in lan966x_lag_set_aggr_pgids()
50 bond_mask = lan966x_lag_get_mask(lan966x, bond); in lan966x_lag_set_aggr_pgids()
52 for_each_set_bit(p, &bond_mask, lan966x->num_phys_ports) { in lan966x_lag_set_aggr_pgids()
53 struct lan966x_port *port = lan966x->ports[p]; in lan966x_lag_set_aggr_pgids()
59 lan966x, ANA_PGID(p)); in lan966x_lag_set_aggr_pgids()
67 ac = lan_rd(lan966x, ANA_PGID(i)); in lan966x_lag_set_aggr_pgids()
75 lan966x, ANA_PGID(i)); in lan966x_lag_set_aggr_pgids()
81 for (p = lag; p < lan966x->num_phys_ports; p++) { in lan966x_lag_set_aggr_pgids()
82 struct lan966x_port *port = lan966x->ports[p]; in lan966x_lag_set_aggr_pgids()
93 static void lan966x_lag_set_port_ids(struct lan966x *lan966x) in lan966x_lag_set_port_ids() argument
100 for (p = 0; p < lan966x->num_phys_ports; ++p) { in lan966x_lag_set_port_ids()
101 port = lan966x->ports[p]; in lan966x_lag_set_port_ids()
107 bond_mask = lan966x_lag_get_mask(lan966x, port->bond); in lan966x_lag_set_port_ids()
113 lan966x, ANA_PORT_CFG(port->chip_port)); in lan966x_lag_set_port_ids()
117 static void lan966x_lag_update_ids(struct lan966x *lan966x) in lan966x_lag_update_ids() argument
119 lan966x_lag_set_port_ids(lan966x); in lan966x_lag_update_ids()
120 lan966x_update_fwd_mask(lan966x); in lan966x_lag_update_ids()
121 lan966x_lag_set_aggr_pgids(lan966x); in lan966x_lag_update_ids()
129 struct lan966x *lan966x = port->lan966x; in lan966x_lag_port_join() local
135 bond_mask = lan966x_lag_get_mask(lan966x, bond); in lan966x_lag_port_join()
140 lan966x_lag_update_ids(lan966x); in lan966x_lag_port_join()
153 lan966x_mac_lag_replace_port_entry(lan966x, in lan966x_lag_port_join()
154 lan966x->ports[lag_id], in lan966x_lag_port_join()
161 lan966x_lag_update_ids(lan966x); in lan966x_lag_port_join()
168 struct lan966x *lan966x = port->lan966x; in lan966x_lag_port_leave() local
173 bond_mask = lan966x_lag_get_mask(lan966x, port->bond); in lan966x_lag_port_leave()
177 lan966x_mac_lag_replace_port_entry(lan966x, port, in lan966x_lag_port_leave()
178 lan966x->ports[lag_id]); in lan966x_lag_port_leave()
180 lan966x_mac_lag_remove_port_entry(lan966x, port); in lan966x_lag_port_leave()
185 lan966x_lag_update_ids(lan966x); in lan966x_lag_port_leave()
189 static bool lan966x_lag_port_check_hash_types(struct lan966x *lan966x, in lan966x_lag_port_check_hash_types() argument
194 for (p = 0; p < lan966x->num_phys_ports; ++p) { in lan966x_lag_port_check_hash_types()
195 struct lan966x_port *port = lan966x->ports[p]; in lan966x_lag_port_check_hash_types()
211 struct lan966x *lan966x = port->lan966x; in lan966x_lag_port_prechangeupper() local
228 if (!lan966x_lag_port_check_hash_types(lan966x, lui->hash_type)) { in lan966x_lag_port_prechangeupper()
238 lan966x, ANA_AGGR_CFG); in lan966x_lag_port_prechangeupper()
244 lan966x, ANA_AGGR_CFG); in lan966x_lag_port_prechangeupper()
251 lan966x, ANA_AGGR_CFG); in lan966x_lag_port_prechangeupper()
269 struct lan966x *lan966x = port->lan966x; in lan966x_lag_port_changelowerstate() local
280 lan966x_lag_set_aggr_pgids(lan966x); in lan966x_lag_port_changelowerstate()
336 struct lan966x *lan966x = port->lan966x; in lan966x_lag_first_port() local
342 bond_mask = lan966x_lag_get_mask(lan966x, lag); in lan966x_lag_first_port()
349 u32 lan966x_lag_get_mask(struct lan966x *lan966x, struct net_device *bond) in lan966x_lag_get_mask() argument
358 for (p = 0; p < lan966x->num_phys_ports; p++) { in lan966x_lag_get_mask()
359 port = lan966x->ports[p]; in lan966x_lag_get_mask()