OSDN Git Service

mlxsw: spectrum: Move port module mapping before core port init
authorJiri Pirko <jiri@nvidia.com>
Tue, 14 Sep 2021 06:13:24 +0000 (09:13 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Sep 2021 11:44:16 +0000 (12:44 +0100)
commit13eb056ee58ba2437c0d358cb2dff17ef9056cfb
treea45b41737c37d9f879eae138b2ec6f8e64e34b39
parent847371ce049badf6a56d7e9b8699eb44b686c55e
mlxsw: spectrum: Move port module mapping before core port init

During port creation, mlxsw_core_port_init() is called with the front
panel port number and the split port sub-number. Currently, this
information is determined by the driver without firmware assistance.

Subsequent patches are going to query this information from firmware,
but this requires the port to be mapped to a module.

Therefore, move port mapping before mlxsw_core_port_init().

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c