diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2018-08-28 13:20:47 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-08-28 16:01:47 -0700 |
commit | 4152e58cb8c5cd390989f1e96092bce92c27c67a (patch) | |
tree | 4e9848030e25d532b9930fded15d134a25c24fa4 /drivers/net/ethernet/netronome/nfp/nfp_main.c | |
parent | 640917dd81b622ac1c6e66b80be6a4174cbe3710 (diff) | |
download | linux-stable-4152e58cb8c5cd390989f1e96092bce92c27c67a.tar.gz linux-stable-4152e58cb8c5cd390989f1e96092bce92c27c67a.tar.bz2 linux-stable-4152e58cb8c5cd390989f1e96092bce92c27c67a.zip |
nfp: make RTsym users handle absolute symbols correctly
Make the RTsym users access the size via the helper, which
takes care of special handling of absolute symbols.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Francois H. Theron <francois.theron@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/nfp_main.c')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfp_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_main.c b/drivers/net/ethernet/netronome/nfp/nfp_main.c index 61b4b2055784..9474a4eed8ce 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_main.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_main.c @@ -124,7 +124,7 @@ int nfp_mbox_cmd(struct nfp_pf *pf, u32 cmd, void *in_data, u64 in_length, if (!pf->mbox) return -EOPNOTSUPP; - max_data_sz = pf->mbox->size - NFP_MBOX_SYM_MIN_SIZE; + max_data_sz = nfp_rtsym_size(pf->mbox) - NFP_MBOX_SYM_MIN_SIZE; /* Check if cmd field is clear */ err = nfp_rtsym_readl(pf->cpp, pf->mbox, NFP_MBOX_CMD, &val); @@ -566,9 +566,9 @@ static int nfp_pf_find_rtsyms(struct nfp_pf *pf) /* Optional per-PCI PF mailbox */ snprintf(pf_symbol, sizeof(pf_symbol), NFP_MBOX_SYM_NAME, pf_id); pf->mbox = nfp_rtsym_lookup(pf->rtbl, pf_symbol); - if (pf->mbox && pf->mbox->size < NFP_MBOX_SYM_MIN_SIZE) { + if (pf->mbox && nfp_rtsym_size(pf->mbox) < NFP_MBOX_SYM_MIN_SIZE) { nfp_err(pf->cpp, "PF mailbox symbol too small: %llu < %d\n", - pf->mbox->size, NFP_MBOX_SYM_MIN_SIZE); + nfp_rtsym_size(pf->mbox), NFP_MBOX_SYM_MIN_SIZE); return -EINVAL; } |