]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Validate firmware revision on init
authorYotam Gigi <yotamg@mellanox.com>
Tue, 23 May 2017 19:56:29 +0000 (21:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 May 2017 21:46:17 +0000 (17:46 -0400)
commit1cc36f949b028c408aeb8c944c482edf6f51b33b
tree21e534caccff6347b07a62910258b00155414781
parenta61e52e9083a5623848b83c2eb4c46d30e39834f
mlxsw: spectrum: Validate firmware revision on init

Make the spectrum module check the current device firmware version, and if
it is below the supported version, use the libfirmware API to request a
firmware file with the supported firmware version and flash it to the
device using the mlxfw module.

The firmware file names are expected to be of Mellanox Firmware Archive
version 2 (MFA2) format and their name are expected to be in the following
pattern: "mlxsw_spectrum-<major>.<minor>.<sub-minor>.mfa2".

Signed-off-by: Yotam Gigi <yotamg@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/Kconfig
drivers/net/ethernet/mellanox/mlxsw/spectrum.c