mlxsw: core_linecards: Probe active line cards for devices and expose FW version
authorJiri Pirko <jiri@nvidia.com>
Mon, 25 Jul 2022 08:29:20 +0000 (10:29 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 26 Jul 2022 20:56:10 +0000 (13:56 -0700)
commit4da0eb2a75eb14a474a94d9249255f97a9175a3c
treea3462eb0153e283de3d54f1e80b7a9dd1d9492bf
parent4ea07cf638dbd6260664b69b0f69cc951934194d
mlxsw: core_linecards: Probe active line cards for devices and expose FW version

In case the line card is active, go over all possible existing
devices (gearboxes) on it and expose FW version of the flashable one.

Example:

$ devlink dev info auxiliary/mlxsw_core.lc.0
auxiliary/mlxsw_core.lc.0:
  versions:
      fixed:
        hw.revision 0
      running:
        ini.version 4
        fw 19.2010.1312

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/networking/devlink/mlxsw.rst
drivers/net/ethernet/mellanox/mlxsw/core.h
drivers/net/ethernet/mellanox/mlxsw/core_linecards.c