@@ -47,7 +47,7 @@ static struct workqueue_struct *mlxsw_owq;
47
47
struct mlxsw_core_port {
48
48
struct devlink_port devlink_port ;
49
49
void * port_driver_priv ;
50
- u8 local_port ;
50
+ u16 local_port ;
51
51
};
52
52
53
53
void * mlxsw_core_port_driver_priv (struct mlxsw_core_port * mlxsw_core_port )
@@ -77,7 +77,7 @@ struct mlxsw_core {
77
77
bool enable_string_tlv ;
78
78
} emad ;
79
79
struct {
80
- u8 * mapping ; /* lag_id+port_index to local_port mapping */
80
+ u16 * mapping ; /* lag_id+port_index to local_port mapping */
81
81
} lag ;
82
82
struct mlxsw_res res ;
83
83
struct mlxsw_hwmon * hwmon ;
@@ -718,7 +718,7 @@ static void mlxsw_emad_process_response(struct mlxsw_core *mlxsw_core,
718
718
}
719
719
720
720
/* 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 ,
722
722
void * priv )
723
723
{
724
724
struct mlxsw_core * mlxsw_core = priv ;
@@ -1959,7 +1959,7 @@ __mlxsw_core_bus_device_register(const struct mlxsw_bus_info *mlxsw_bus_info,
1959
1959
1960
1960
if (MLXSW_CORE_RES_VALID (mlxsw_core , MAX_LAG ) &&
1961
1961
MLXSW_CORE_RES_VALID (mlxsw_core , MAX_LAG_MEMBERS )) {
1962
- alloc_size = sizeof (u8 ) *
1962
+ alloc_size = sizeof (* mlxsw_core -> lag . mapping ) *
1963
1963
MLXSW_CORE_RES_GET (mlxsw_core , MAX_LAG ) *
1964
1964
MLXSW_CORE_RES_GET (mlxsw_core , MAX_LAG_MEMBERS );
1965
1965
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,
2130
2130
EXPORT_SYMBOL (mlxsw_core_skb_transmit );
2131
2131
2132
2132
void 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 )
2134
2134
{
2135
2135
if (mlxsw_core -> driver -> ptp_transmitted )
2136
2136
mlxsw_core -> driver -> ptp_transmitted (mlxsw_core , skb ,
@@ -2208,7 +2208,7 @@ mlxsw_core_rx_listener_state_set(struct mlxsw_core *mlxsw_core,
2208
2208
rxl_item -> enabled = enabled ;
2209
2209
}
2210
2210
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 ,
2212
2212
void * priv )
2213
2213
{
2214
2214
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,
2641
2641
{
2642
2642
struct mlxsw_rx_listener_item * rxl_item ;
2643
2643
const struct mlxsw_rx_listener * rxl ;
2644
- u8 local_port ;
2644
+ u16 local_port ;
2645
2645
bool found = false;
2646
2646
2647
2647
if (rx_info -> is_lag ) {
@@ -2699,7 +2699,7 @@ static int mlxsw_core_lag_mapping_index(struct mlxsw_core *mlxsw_core,
2699
2699
}
2700
2700
2701
2701
void 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 )
2703
2703
{
2704
2704
int index = mlxsw_core_lag_mapping_index (mlxsw_core ,
2705
2705
lag_id , port_index );
@@ -2708,8 +2708,8 @@ void mlxsw_core_lag_mapping_set(struct mlxsw_core *mlxsw_core,
2708
2708
}
2709
2709
EXPORT_SYMBOL (mlxsw_core_lag_mapping_set );
2710
2710
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 )
2713
2713
{
2714
2714
int index = mlxsw_core_lag_mapping_index (mlxsw_core ,
2715
2715
lag_id , port_index );
@@ -2719,7 +2719,7 @@ u8 mlxsw_core_lag_mapping_get(struct mlxsw_core *mlxsw_core,
2719
2719
EXPORT_SYMBOL (mlxsw_core_lag_mapping_get );
2720
2720
2721
2721
void mlxsw_core_lag_mapping_clear (struct mlxsw_core * mlxsw_core ,
2722
- u16 lag_id , u8 local_port )
2722
+ u16 lag_id , u16 local_port )
2723
2723
{
2724
2724
int i ;
2725
2725
@@ -2747,7 +2747,7 @@ u64 mlxsw_core_res_get(struct mlxsw_core *mlxsw_core,
2747
2747
}
2748
2748
EXPORT_SYMBOL (mlxsw_core_res_get );
2749
2749
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 ,
2751
2751
enum devlink_port_flavour flavour ,
2752
2752
u32 port_number , bool split ,
2753
2753
u32 split_port_subnumber ,
@@ -2778,7 +2778,7 @@ static int __mlxsw_core_port_init(struct mlxsw_core *mlxsw_core, u8 local_port,
2778
2778
return err ;
2779
2779
}
2780
2780
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 )
2782
2782
{
2783
2783
struct mlxsw_core_port * mlxsw_core_port =
2784
2784
& mlxsw_core -> ports [local_port ];
@@ -2788,7 +2788,7 @@ static void __mlxsw_core_port_fini(struct mlxsw_core *mlxsw_core, u8 local_port)
2788
2788
memset (mlxsw_core_port , 0 , sizeof (* mlxsw_core_port ));
2789
2789
}
2790
2790
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 ,
2792
2792
u32 port_number , bool split ,
2793
2793
u32 split_port_subnumber ,
2794
2794
bool splittable , u32 lanes ,
@@ -2810,7 +2810,7 @@ int mlxsw_core_port_init(struct mlxsw_core *mlxsw_core, u8 local_port,
2810
2810
}
2811
2811
EXPORT_SYMBOL (mlxsw_core_port_init );
2812
2812
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 )
2814
2814
{
2815
2815
atomic_dec (& mlxsw_core -> active_ports_count );
2816
2816
@@ -2845,7 +2845,7 @@ void mlxsw_core_cpu_port_fini(struct mlxsw_core *mlxsw_core)
2845
2845
}
2846
2846
EXPORT_SYMBOL (mlxsw_core_cpu_port_fini );
2847
2847
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 ,
2849
2849
void * port_driver_priv , struct net_device * dev )
2850
2850
{
2851
2851
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,
2857
2857
}
2858
2858
EXPORT_SYMBOL (mlxsw_core_port_eth_set );
2859
2859
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 ,
2861
2861
void * port_driver_priv )
2862
2862
{
2863
2863
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,
2869
2869
}
2870
2870
EXPORT_SYMBOL (mlxsw_core_port_ib_set );
2871
2871
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 ,
2873
2873
void * port_driver_priv )
2874
2874
{
2875
2875
struct mlxsw_core_port * mlxsw_core_port =
@@ -2882,7 +2882,7 @@ void mlxsw_core_port_clear(struct mlxsw_core *mlxsw_core, u8 local_port,
2882
2882
EXPORT_SYMBOL (mlxsw_core_port_clear );
2883
2883
2884
2884
enum devlink_port_type mlxsw_core_port_type_get (struct mlxsw_core * mlxsw_core ,
2885
- u8 local_port )
2885
+ u16 local_port )
2886
2886
{
2887
2887
struct mlxsw_core_port * mlxsw_core_port =
2888
2888
& mlxsw_core -> ports [local_port ];
@@ -2895,7 +2895,7 @@ EXPORT_SYMBOL(mlxsw_core_port_type_get);
2895
2895
2896
2896
struct devlink_port *
2897
2897
mlxsw_core_port_devlink_port_get (struct mlxsw_core * mlxsw_core ,
2898
- u8 local_port )
2898
+ u16 local_port )
2899
2899
{
2900
2900
struct mlxsw_core_port * mlxsw_core_port =
2901
2901
& mlxsw_core -> ports [local_port ];
@@ -2905,7 +2905,7 @@ mlxsw_core_port_devlink_port_get(struct mlxsw_core *mlxsw_core,
2905
2905
}
2906
2906
EXPORT_SYMBOL (mlxsw_core_port_devlink_port_get );
2907
2907
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 )
2909
2909
{
2910
2910
const struct mlxsw_bus_info * bus_info = mlxsw_core -> bus_info ;
2911
2911
int i ;
0 commit comments