diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2017-02-19 11:58:11 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-02-20 11:18:49 -0500 |
commit | bd5ca062ba7d24bcc28f637aa90056f642a35dfa (patch) | |
tree | dce35e08b46c1febb9944f4a783f126d0ad0d301 /drivers/net/ethernet/netronome/nfp/nfpcore | |
parent | 368b1d1c49f651ba513090623f2891a695fe9fbb (diff) | |
download | lwn-bd5ca062ba7d24bcc28f637aa90056f642a35dfa.tar.gz lwn-bd5ca062ba7d24bcc28f637aa90056f642a35dfa.zip |
nfp: report NSP ABI version in ethtool FW version
ethtool_drvinfo->fw_version can cantain multiple FW strings.
We already report NFD ABI version there, add NSP ABI version
if available (i.e. on PF) with 'sp:' prefix.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/nfpcore')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfpcore/nfp.h | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp.h b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp.h index 3d70a8578a98..540027973a74 100644 --- a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp.h +++ b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp.h @@ -40,6 +40,7 @@ #define __NFP_H__ #include <linux/device.h> +#include <linux/types.h> #include "nfp_cpp.h" @@ -54,6 +55,8 @@ struct firmware; struct nfp_nsp *nfp_nsp_open(struct nfp_cpp *cpp); void nfp_nsp_close(struct nfp_nsp *state); +u16 nfp_nsp_get_abi_ver_major(struct nfp_nsp *state); +u16 nfp_nsp_get_abi_ver_minor(struct nfp_nsp *state); int nfp_nsp_wait(struct nfp_nsp *state); int nfp_nsp_device_soft_reset(struct nfp_nsp *state); int nfp_nsp_load_fw(struct nfp_nsp *state, const struct firmware *fw); diff --git a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c index f2d737c3d1df..34c50987c377 100644 --- a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c +++ b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c @@ -182,6 +182,16 @@ void nfp_nsp_close(struct nfp_nsp *state) kfree(state); } +u16 nfp_nsp_get_abi_ver_major(struct nfp_nsp *state) +{ + return state->ver.major; +} + +u16 nfp_nsp_get_abi_ver_minor(struct nfp_nsp *state) +{ + return state->ver.minor; +} + static int nfp_nsp_wait_reg(struct nfp_cpp *cpp, u64 *reg, u32 nsp_cpp, u64 addr, u64 mask, u64 val) |