mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 01:51:34 +00:00
mlxsw: spectrum: Do not enforce same firmware version for multiple ASICs
In commita72afb6879
("mlxsw: Enforce firmware version for Spectrum-2") I added a required firmware version for Spectrum-2, but missed the fact that mlxsw_sp2_init() is used by both Spectrum-2 and Spectrum-3. This means that the same firmware version will be used for both, which is wrong. Fix this by creating a new init() callback for Spectrum-3. Fixes:a72afb6879
("mlxsw: Enforce firmware version for Spectrum-2") Signed-off-by: Ido Schimmel <idosch@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Tested-by: Shalom Toledo <shalomt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
eb507906fe
commit
d58c35ca52
@ -5132,6 +5132,27 @@ static int mlxsw_sp2_init(struct mlxsw_core *mlxsw_core,
|
||||
return mlxsw_sp_init(mlxsw_core, mlxsw_bus_info, extack);
|
||||
}
|
||||
|
||||
static int mlxsw_sp3_init(struct mlxsw_core *mlxsw_core,
|
||||
const struct mlxsw_bus_info *mlxsw_bus_info,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core);
|
||||
|
||||
mlxsw_sp->kvdl_ops = &mlxsw_sp2_kvdl_ops;
|
||||
mlxsw_sp->afa_ops = &mlxsw_sp2_act_afa_ops;
|
||||
mlxsw_sp->afk_ops = &mlxsw_sp2_afk_ops;
|
||||
mlxsw_sp->mr_tcam_ops = &mlxsw_sp2_mr_tcam_ops;
|
||||
mlxsw_sp->acl_tcam_ops = &mlxsw_sp2_acl_tcam_ops;
|
||||
mlxsw_sp->nve_ops_arr = mlxsw_sp2_nve_ops_arr;
|
||||
mlxsw_sp->mac_mask = mlxsw_sp2_mac_mask;
|
||||
mlxsw_sp->rif_ops_arr = mlxsw_sp2_rif_ops_arr;
|
||||
mlxsw_sp->sb_vals = &mlxsw_sp2_sb_vals;
|
||||
mlxsw_sp->port_type_speed_ops = &mlxsw_sp2_port_type_speed_ops;
|
||||
mlxsw_sp->ptp_ops = &mlxsw_sp2_ptp_ops;
|
||||
|
||||
return mlxsw_sp_init(mlxsw_core, mlxsw_bus_info, extack);
|
||||
}
|
||||
|
||||
static void mlxsw_sp_fini(struct mlxsw_core *mlxsw_core)
|
||||
{
|
||||
struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core);
|
||||
@ -5634,7 +5655,7 @@ static struct mlxsw_driver mlxsw_sp2_driver = {
|
||||
static struct mlxsw_driver mlxsw_sp3_driver = {
|
||||
.kind = mlxsw_sp3_driver_name,
|
||||
.priv_size = sizeof(struct mlxsw_sp),
|
||||
.init = mlxsw_sp2_init,
|
||||
.init = mlxsw_sp3_init,
|
||||
.fini = mlxsw_sp_fini,
|
||||
.basic_trap_groups_set = mlxsw_sp_basic_trap_groups_set,
|
||||
.port_split = mlxsw_sp_port_split,
|
||||
|
Loading…
Reference in New Issue
Block a user