]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Add a temporary variable to indicate bridge model
authorAmit Cohen <amcohen@nvidia.com>
Mon, 27 Jun 2022 07:06:09 +0000 (10:06 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 28 Jun 2022 12:31:36 +0000 (14:31 +0200)
commit1f54017b2fa8225746b54de2c4a316b82fdd1249
tree37fbe2721c79dc4a7bff093236c5fa77972504f4
parent47daa64c18a82cee2822ee704a099daa9c285f76
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 <amcohen@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h