]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: core: Initialize switch driver last
authorIdo Schimmel <idosch@nvidia.com>
Wed, 15 Sep 2021 10:13:05 +0000 (13:13 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Sep 2021 15:17:15 +0000 (16:17 +0100)
commit43280a132c5bf6fe9e4f921f934212b78971efba
tree6f33d77c48fed232a1587ae86f80e75baf30bea1
parentd83c5cc45c9d15b25cd754d9a68390fea6d87538
mlxsw: core: Initialize switch driver last

Commit f02d435cfc55 ("mlxsw: core: Re-order initialization sequence")
changed the initialization sequence so that the switch driver (e.g.,
mlxsw_spectrum) is initialized before registration with the hwmon and
thermal subsystems.

This was done in order to avoid situations where hwmon/thermal code uses
features not supported by current firmware version, which is only
validated as part of switch driver initialization.

Later, commit 8c9962a8f90c ("mlxsw: Move fw flashing code into core.c")
moved firmware validation and flashing code from the switch driver to
mlxsw_core so that it is performed before driver initialization.

Therefore, change the initialization sequence back to its original form.

In addition to being more straightforward, it will allow us to simplify
parts of the code in subsequent patches and future patchsets.

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