]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Added fw version query command
authorShay Agroskin <shayag@mellanox.com>
Tue, 2 Jul 2019 23:55:09 +0000 (23:55 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 4 Jul 2019 20:43:15 +0000 (16:43 -0400)
commit8e8b9d7ac518edb7e3f3cc33e4f7140427653ac5
tree8193ee82225147b8f4ddfe066f03d8d9f4fe3a8e
parenta9fb358166136869a3c6bb5ed6294147075ddf57
net/mlx5: Added fw version query command

Using the MCQI and MCQS registers, we query the running and pending
fw version of the HCA.
The MCQS is queried with sequentially increasing component index, until
a component of type BOOT_IMG is found. Querying this component's version
using the MCQI register yields the running and pending fw version of the
HCA.

Querying MCQI for the pending fw version should be done only after
validating that such fw version exists. This is done my checking
'component update state' field in MCQS output.

Signed-off-by: Shay Agroskin <shayag@mellanox.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/fw.c
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h