]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf4c8b8affbe29f006797c8473d6d00e3f310db3d
treea45b41737c37d9f879eae138b2ec6f8e64e34b39
parent950a4d3744e95019aa75d8f883fee845c528b444
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