]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: minimal: Extend module to port mapping with slot index
authorVadim Pasternak <vadimp@nvidia.com>
Sun, 21 Aug 2022 16:20:17 +0000 (18:20 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 24 Aug 2022 00:22:00 +0000 (17:22 -0700)
commit9e8d36b8dc1e7af148964af60fd103b9109177a5
tree75d6677c1f5672020464efc58f3363017d36092d
parent215c38c24a7bba625cdb8a8cd812d5397aed952c
mlxsw: minimal: Extend module to port mapping with slot index

The interfaces for ports found on line card are created and removed
dynamically after line card is getting active or inactive.

Introduce per line card array with module to port mapping.
For each port get 'slot_index' through PMLP register and set port
mapping for the relevant [slot_index][module] entry.

Split module and port allocation into separate routines.

Split per line card port creation and removing into separate routines.
Motivation to re-use these routines for line card operations.

Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/minimal.c