Skip to content

Commit d6d9026

Browse files
Amit CohenPaolo Abeni
authored andcommitted
mlxsw: spectrum: Add a temporary variable to indicate bridge model
As part of transition to unified bridge model, many different firmware configurations are done. Some of the configuration that needs to be done for the unified bridge model is not valid under the legacy model, and would be rejected by the firmware. At the same time, the driver cannot switch to the unified bridge model until all of the code has been converted. To allow breaking the change into patches, and to not break driver behavior during the transition, add a boolean variable to indicate bridge model. Then, forbidden configurations will be skipped using the check - "if (!mlxsw_sp->ubridge)". The new variable is temporary for several sets, it will be removed when firmware will be configured to work with unified bridge model. Signed-off-by: Amit Cohen <[email protected]> Reviewed-by: Petr Machata <[email protected]> Signed-off-by: Ido Schimmel <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent 778964f commit d6d9026

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

drivers/net/ethernet/mellanox/mlxsw/spectrum.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3155,6 +3155,7 @@ static int mlxsw_sp_init(struct mlxsw_core *mlxsw_core,
31553155
goto err_ports_create;
31563156
}
31573157

3158+
mlxsw_sp->ubridge = false;
31583159
return 0;
31593160

31603161
err_ports_create:

drivers/net/ethernet/mellanox/mlxsw/spectrum.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ struct mlxsw_sp {
216216
u32 lowest_shaper_bs;
217217
struct rhashtable ipv6_addr_ht;
218218
struct mutex ipv6_addr_ht_lock; /* Protects ipv6_addr_ht */
219+
bool ubridge;
219220
};
220221

221222
struct mlxsw_sp_ptp_ops {

0 commit comments

Comments
 (0)