mlxsw: spectrum: Move port SWID set before core port init
authorJiri Pirko <jiri@nvidia.com>
Tue, 14 Sep 2021 06:13:25 +0000 (09:13 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Sep 2021 11:44:16 +0000 (12:44 +0100)
commitfec2386162d1625ef4a436e1dced27e235d5c181
tree8a2d366269e374c04ef14733fc285eef90378b6f
parent13eb056ee58ba2437c0d358cb2dff17ef9056cfb
mlxsw: spectrum: Move port SWID set 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 assigned to SWID.

Therefore, move port SWID assignment 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