]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit6d256642ac09c8765051611819212871861d9185
tree8a2d366269e374c04ef14733fc285eef90378b6f
parent8578288dca354929c77cb8d75c974bbbad11a16f
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