]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: interpret extended FW load result codes
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 28 Aug 2018 20:20:35 +0000 (13:20 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Aug 2018 23:01:46 +0000 (16:01 -0700)
commitacfac8d2b5c52c632fc9c54bc0bb9099586f7fb1
treee5c8cb63704da2a7cb0dcc086599d4ffca41e479
parent88f6ecc656a7457c31e5c55084a9c5884201b55d
nfp: interpret extended FW load result codes

To enable easier FW distribution NFP can now automatically
select between FW stored on the flash and loaded from the
kernel.

If FW loading policy is set to auto it will compare the
versions of FW from the host and from the flash and load
the newer one.  If FW type doesn't match (e.g. one advanced
application vs another) the FW from the host takes precedence,
unless one of them is the basic NIC firmware, in which case
the non-basic-NIC FW is selected.

This automatic selection mechanism requires we inform user
what the verdict was.  Print a message to the logs explaining
the decision and the reason.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c