@@ -47,7 +47,7 @@ static struct workqueue_struct *mlxsw_owq;
4747struct mlxsw_core_port {
4848 struct devlink_port devlink_port ;
4949 void * port_driver_priv ;
50- u8 local_port ;
50+ u16 local_port ;
5151};
5252
5353void * mlxsw_core_port_driver_priv (struct mlxsw_core_port * mlxsw_core_port )
@@ -77,7 +77,7 @@ struct mlxsw_core {
7777 bool enable_string_tlv ;
7878 } emad ;
7979 struct {
80- u8 * mapping ; /* lag_id+port_index to local_port mapping */
80+ u16 * mapping ; /* lag_id+port_index to local_port mapping */
8181 } lag ;
8282 struct mlxsw_res res ;
8383 struct mlxsw_hwmon * hwmon ;
@@ -718,7 +718,7 @@ static void mlxsw_emad_process_response(struct mlxsw_core *mlxsw_core,
718718}
719719
720720/* called with rcu read lock held */
721- static void mlxsw_emad_rx_listener_func (struct sk_buff * skb , u8 local_port ,
721+ static void mlxsw_emad_rx_listener_func (struct sk_buff * skb , u16 local_port ,
722722 void * priv )
723723{
724724 struct mlxsw_core * mlxsw_core = priv ;
@@ -1959,7 +1959,7 @@ __mlxsw_core_bus_device_register(const struct mlxsw_bus_info *mlxsw_bus_info,
19591959
19601960 if (MLXSW_CORE_RES_VALID (mlxsw_core , MAX_LAG ) &&
19611961 MLXSW_CORE_RES_VALID (mlxsw_core , MAX_LAG_MEMBERS )) {
1962- alloc_size = sizeof (u8 ) *
1962+ alloc_size = sizeof (* mlxsw_core -> lag . mapping ) *
19631963 MLXSW_CORE_RES_GET (mlxsw_core , MAX_LAG ) *
19641964 MLXSW_CORE_RES_GET (mlxsw_core , MAX_LAG_MEMBERS );
19651965 mlxsw_core -> lag .mapping = kzalloc (alloc_size , GFP_KERNEL );
@@ -2130,7 +2130,7 @@ int mlxsw_core_skb_transmit(struct mlxsw_core *mlxsw_core, struct sk_buff *skb,
21302130EXPORT_SYMBOL (mlxsw_core_skb_transmit );
21312131
21322132void mlxsw_core_ptp_transmitted (struct mlxsw_core * mlxsw_core ,
2133- struct sk_buff * skb , u8 local_port )
2133+ struct sk_buff * skb , u16 local_port )
21342134{
21352135 if (mlxsw_core -> driver -> ptp_transmitted )
21362136 mlxsw_core -> driver -> ptp_transmitted (mlxsw_core , skb ,
@@ -2208,7 +2208,7 @@ mlxsw_core_rx_listener_state_set(struct mlxsw_core *mlxsw_core,
22082208 rxl_item -> enabled = enabled ;
22092209}
22102210
2211- static void mlxsw_core_event_listener_func (struct sk_buff * skb , u8 local_port ,
2211+ static void mlxsw_core_event_listener_func (struct sk_buff * skb , u16 local_port ,
22122212 void * priv )
22132213{
22142214 struct mlxsw_event_listener_item * event_listener_item = priv ;
@@ -2641,7 +2641,7 @@ void mlxsw_core_skb_receive(struct mlxsw_core *mlxsw_core, struct sk_buff *skb,
26412641{
26422642 struct mlxsw_rx_listener_item * rxl_item ;
26432643 const struct mlxsw_rx_listener * rxl ;
2644- u8 local_port ;
2644+ u16 local_port ;
26452645 bool found = false;
26462646
26472647 if (rx_info -> is_lag ) {
@@ -2699,7 +2699,7 @@ static int mlxsw_core_lag_mapping_index(struct mlxsw_core *mlxsw_core,
26992699}
27002700
27012701void mlxsw_core_lag_mapping_set (struct mlxsw_core * mlxsw_core ,
2702- u16 lag_id , u8 port_index , u8 local_port )
2702+ u16 lag_id , u8 port_index , u16 local_port )
27032703{
27042704 int index = mlxsw_core_lag_mapping_index (mlxsw_core ,
27052705 lag_id , port_index );
@@ -2708,8 +2708,8 @@ void mlxsw_core_lag_mapping_set(struct mlxsw_core *mlxsw_core,
27082708}
27092709EXPORT_SYMBOL (mlxsw_core_lag_mapping_set );
27102710
2711- u8 mlxsw_core_lag_mapping_get (struct mlxsw_core * mlxsw_core ,
2712- u16 lag_id , u8 port_index )
2711+ u16 mlxsw_core_lag_mapping_get (struct mlxsw_core * mlxsw_core ,
2712+ u16 lag_id , u8 port_index )
27132713{
27142714 int index = mlxsw_core_lag_mapping_index (mlxsw_core ,
27152715 lag_id , port_index );
@@ -2719,7 +2719,7 @@ u8 mlxsw_core_lag_mapping_get(struct mlxsw_core *mlxsw_core,
27192719EXPORT_SYMBOL (mlxsw_core_lag_mapping_get );
27202720
27212721void mlxsw_core_lag_mapping_clear (struct mlxsw_core * mlxsw_core ,
2722- u16 lag_id , u8 local_port )
2722+ u16 lag_id , u16 local_port )
27232723{
27242724 int i ;
27252725
@@ -2747,7 +2747,7 @@ u64 mlxsw_core_res_get(struct mlxsw_core *mlxsw_core,
27472747}
27482748EXPORT_SYMBOL (mlxsw_core_res_get );
27492749
2750- static int __mlxsw_core_port_init (struct mlxsw_core * mlxsw_core , u8 local_port ,
2750+ static int __mlxsw_core_port_init (struct mlxsw_core * mlxsw_core , u16 local_port ,
27512751 enum devlink_port_flavour flavour ,
27522752 u32 port_number , bool split ,
27532753 u32 split_port_subnumber ,
@@ -2778,7 +2778,7 @@ static int __mlxsw_core_port_init(struct mlxsw_core *mlxsw_core, u8 local_port,
27782778 return err ;
27792779}
27802780
2781- static void __mlxsw_core_port_fini (struct mlxsw_core * mlxsw_core , u8 local_port )
2781+ static void __mlxsw_core_port_fini (struct mlxsw_core * mlxsw_core , u16 local_port )
27822782{
27832783 struct mlxsw_core_port * mlxsw_core_port =
27842784 & mlxsw_core -> ports [local_port ];
@@ -2788,7 +2788,7 @@ static void __mlxsw_core_port_fini(struct mlxsw_core *mlxsw_core, u8 local_port)
27882788 memset (mlxsw_core_port , 0 , sizeof (* mlxsw_core_port ));
27892789}
27902790
2791- int mlxsw_core_port_init (struct mlxsw_core * mlxsw_core , u8 local_port ,
2791+ int mlxsw_core_port_init (struct mlxsw_core * mlxsw_core , u16 local_port ,
27922792 u32 port_number , bool split ,
27932793 u32 split_port_subnumber ,
27942794 bool splittable , u32 lanes ,
@@ -2810,7 +2810,7 @@ int mlxsw_core_port_init(struct mlxsw_core *mlxsw_core, u8 local_port,
28102810}
28112811EXPORT_SYMBOL (mlxsw_core_port_init );
28122812
2813- void mlxsw_core_port_fini (struct mlxsw_core * mlxsw_core , u8 local_port )
2813+ void mlxsw_core_port_fini (struct mlxsw_core * mlxsw_core , u16 local_port )
28142814{
28152815 atomic_dec (& mlxsw_core -> active_ports_count );
28162816
@@ -2845,7 +2845,7 @@ void mlxsw_core_cpu_port_fini(struct mlxsw_core *mlxsw_core)
28452845}
28462846EXPORT_SYMBOL (mlxsw_core_cpu_port_fini );
28472847
2848- void mlxsw_core_port_eth_set (struct mlxsw_core * mlxsw_core , u8 local_port ,
2848+ void mlxsw_core_port_eth_set (struct mlxsw_core * mlxsw_core , u16 local_port ,
28492849 void * port_driver_priv , struct net_device * dev )
28502850{
28512851 struct mlxsw_core_port * mlxsw_core_port =
@@ -2857,7 +2857,7 @@ void mlxsw_core_port_eth_set(struct mlxsw_core *mlxsw_core, u8 local_port,
28572857}
28582858EXPORT_SYMBOL (mlxsw_core_port_eth_set );
28592859
2860- void mlxsw_core_port_ib_set (struct mlxsw_core * mlxsw_core , u8 local_port ,
2860+ void mlxsw_core_port_ib_set (struct mlxsw_core * mlxsw_core , u16 local_port ,
28612861 void * port_driver_priv )
28622862{
28632863 struct mlxsw_core_port * mlxsw_core_port =
@@ -2869,7 +2869,7 @@ void mlxsw_core_port_ib_set(struct mlxsw_core *mlxsw_core, u8 local_port,
28692869}
28702870EXPORT_SYMBOL (mlxsw_core_port_ib_set );
28712871
2872- void mlxsw_core_port_clear (struct mlxsw_core * mlxsw_core , u8 local_port ,
2872+ void mlxsw_core_port_clear (struct mlxsw_core * mlxsw_core , u16 local_port ,
28732873 void * port_driver_priv )
28742874{
28752875 struct mlxsw_core_port * mlxsw_core_port =
@@ -2882,7 +2882,7 @@ void mlxsw_core_port_clear(struct mlxsw_core *mlxsw_core, u8 local_port,
28822882EXPORT_SYMBOL (mlxsw_core_port_clear );
28832883
28842884enum devlink_port_type mlxsw_core_port_type_get (struct mlxsw_core * mlxsw_core ,
2885- u8 local_port )
2885+ u16 local_port )
28862886{
28872887 struct mlxsw_core_port * mlxsw_core_port =
28882888 & mlxsw_core -> ports [local_port ];
@@ -2895,7 +2895,7 @@ EXPORT_SYMBOL(mlxsw_core_port_type_get);
28952895
28962896struct devlink_port *
28972897mlxsw_core_port_devlink_port_get (struct mlxsw_core * mlxsw_core ,
2898- u8 local_port )
2898+ u16 local_port )
28992899{
29002900 struct mlxsw_core_port * mlxsw_core_port =
29012901 & mlxsw_core -> ports [local_port ];
@@ -2905,7 +2905,7 @@ mlxsw_core_port_devlink_port_get(struct mlxsw_core *mlxsw_core,
29052905}
29062906EXPORT_SYMBOL (mlxsw_core_port_devlink_port_get );
29072907
2908- bool mlxsw_core_port_is_xm (const struct mlxsw_core * mlxsw_core , u8 local_port )
2908+ bool mlxsw_core_port_is_xm (const struct mlxsw_core * mlxsw_core , u16 local_port )
29092909{
29102910 const struct mlxsw_bus_info * bus_info = mlxsw_core -> bus_info ;
29112911 int i ;
0 commit comments